How to tell if connected to the internet

58 views
Skip to first unread message

Louis LaBrunda

unread,
Sep 24, 2020, 9:44:59 AM9/24/20
to VA Smalltalk
Hi,

I'm working on an IoT project with VA Smalltalk v9.2.2 and Seaside on Raspberry OS lite.  There will be no keyboard or monitor, the only access is via a web browser or the DOS formatted /boot folder.  I would like a simple test to see if the system is connected to the internet.  I'm not sure what I will do if not connected, probably log something.  All ideas welcome.  Thanks.

Lou

Norbert Schlemmer

unread,
Sep 24, 2020, 11:39:28 AM9/24/20
to VA Smalltalk
Hi Lou
do you mean a "simple test" like this: SciSocketManager>>#ping:at: ?
Norbert

Louis LaBrunda

unread,
Sep 24, 2020, 2:37:54 PM9/24/20
to VA Smalltalk
Hi  Norbert,

I don't think so as that seems like a test one would use from outside the program to see if the server (my program) was available.  I'm looking for a way for the server, my Seaside program, to see if IT has access to the internet and therefor the outside world has access to it.

Lou 

Totally Objects

unread,
Sep 24, 2020, 3:15:42 PM9/24/20
to VA Smalltalk
Hi Lou. I am working on a similare checker. I use

WSHttp new wsGet: 'http://www.totallyobjects.com'

which uses 

WinHttpSession submitGetRequest: aDataRequest which is in WinHttpClientApp

Does that help?

David

Richard Sargent

unread,
Sep 24, 2020, 3:18:27 PM9/24/20
to VA Smalltalk
On Thursday, September 24, 2020 at 11:37:54 AM UTC-7, Louis LaBrunda wrote:
Hi  Norbert,

I don't think so as that seems like a test one would use from outside the program to see if the server (my program) was available.  I'm looking for a way for the server, my Seaside program, to see if IT has access to the internet and therefor the outside world has access to it.

I don't think you can conclude that. Outbound access is often permitted even though inbound is blocked.

Perhaps, something like trying to access your external facing service via TOR would do it. (I've never tried anything like that, so I have no idea how to do it.)

Norbert Schlemmer

unread,
Sep 24, 2020, 4:22:26 PM9/24/20
to VA Smalltalk
do you have a block diagram ? you want to monitor your server application running on RPi ? Maybe your server application send heartbeat messages using MQTT to a MQTT broker running outside of the site.

Louis LaBrunda

unread,
Sep 24, 2020, 5:51:41 PM9/24/20
to VA Smalltalk
Hi All,

Maybe a little more of the big picture will help.  I am making an IoT device, that will hopefully run on a Raspberry Pi Zero W.  The user needs to somehow connect it to the internet.  Probably to their local WiFi.  Mine will control my sprinkler system and probably my garage door.  The Seaside part is how the settings are changed.  The setting control which pins/relays control the zones of the sprinkler system and the  garage door.  I will connect into the device as one would connect to any web site (with IP address and post) with a web browser.

Because everyone's local WiFi has its own IP address and password, the user needs to supply that kind of info.  I will be in files in the DOS formatted /boot/... folder.  If that information isn't correct the Seaside part can't function as desired.  I would like to know if things are setup correctly and if not do something that I haven't quite decided yet.

Lou

Richard Sargent

unread,
Sep 24, 2020, 10:11:06 PM9/24/20
to VA Smalltalk
On Thu, Sep 24, 2020, 14:51 Louis LaBrunda <L...@keystone-software.com> wrote:
Hi All,

Maybe a little more of the big picture will help.  I am making an IoT device, that will hopefully run on a Raspberry Pi Zero W.  The user needs to somehow connect it to the internet.  Probably to their local WiFi.  Mine will control my sprinkler system and probably my garage door.  The Seaside part is how the settings are changed.  The setting control which pins/relays control the zones of the sprinkler system and the  garage door.  I will connect into the device as one would connect to any web site (with IP address and post) with a web browser.

Because everyone's local WiFi has its own IP address and password, the user needs to supply that kind of info.  I will be in files in the DOS formatted /boot/... folder.  If that information isn't correct the Seaside part can't function as desired.  I would like to know if things are setup correctly and if not do something that I haven't quite decided yet.

Your device is likely going to be behind a firewall or at least a NAT router. The problem is one of making your router forward requests to your device, coupled with protecting an exposed device from malicious actors.

[There was an article just a day or two past about how 90% of all IoT traffic was malicious. The risk is real.]


Lou
On Thursday, September 24, 2020 at 4:22:26 PM UTC-4 Norbert Schlemmer wrote:
do you have a block diagram ? you want to monitor your server application running on RPi ? Maybe your server application send heartbeat messages using MQTT to a MQTT broker running outside of the site.

L...@Keystone-Software.com schrieb am Donnerstag, 24. September 2020 um 20:37:54 UTC+2:
Hi  Norbert,

I don't think so as that seems like a test one would use from outside the program to see if the server (my program) was available.  I'm looking for a way for the server, my Seaside program, to see if IT has access to the internet and therefor the outside world has access to it.

Lou 

On Thursday, September 24, 2020 at 11:39:28 AM UTC-4 Norbert Schlemmer wrote:
Hi Lou
do you mean a "simple test" like this: SciSocketManager>>#ping:at: ?
Norbert

L...@Keystone-Software.com schrieb am Donnerstag, 24. September 2020 um 15:44:59 UTC+2:
Hi,

I'm working on an IoT project with VA Smalltalk v9.2.2 and Seaside on Raspberry OS lite.  There will be no keyboard or monitor, the only access is via a web browser or the DOS formatted /boot folder.  I would like a simple test to see if the system is connected to the internet.  I'm not sure what I will do if not connected, probably log something.  All ideas welcome.  Thanks.

Lou

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/va-smalltalk/LXz0zz_YclU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to va-smalltalk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/3f5a7d52-2447-45d6-8c62-709b9412e3f3n%40googlegroups.com.

Louis LaBrunda

unread,
Sep 25, 2020, 9:10:23 AM9/25/20
to VA Smalltalk
Hi  Richard,

You are of course correct about having to punch a hole in one's local firewall to allow access from the outside world.  I was leaving that out to keep the discussion simple or at least simpler.  If one want's to control the device from their home only, that hole isn't needed.

My concern right now is setting the device up to allow access from the local network (I have been calling this access to the internet but I think that has led to confusion).  I don't want users to need to have a keyboard and monitor and to hook the device and do a lot in the Raspberry OS (Linux).  I do think they can plug the SD card into a reader on a Window or Linux machine and change a few files in the /boot/... folder which should be accessible.

I want to test if that setup is working and if not write some log information to a file in /boot/... so the user can fix the problem.

I'm trying to decide how to test if the setup is working.  Thanks to everyone for their ideas.

Lou

Reply all
Reply to author
Forward
0 new messages