ONWAN Script

Hi,
I want to try the onwan scripting as below
image
but it didnt print anything on BASIC IDE.

My ewon flexy is connected through WIFI Card, and when it powered up, it supposed to print “ONLINE”.
Is that “ONWAN” can be used for wifi connection?
Thanks

Hi Jun,

Try this:

ONVPN “@WANcheck()”

Function WANcheck()

I% = Getsys PRG, “EVTINFO”
If I% = 1 Then
Print “WAN online with address” ; Getsys prg, “Wanip”
else
print “WAN offline”
endif

Endfn

Hi,
I tried this code, but the problem stills the same. It didnt print anything

Hi Jun,

Here’s a good way to test this for each connection type.

  • Go to the Programming section and run the code above

For Ethernet

  • Remove the cable going into your FLX3101 card and watch the programming section. After about 30 seconds you should see it print out “WAN offline”. Then when you plug it back in, after about 30 seconds you should see “WAN online with address xxx.xxx.xxx.xxx”

For Wifi/3G/4G

  • Similar to the steps above, only in this case try just removing the antenna and then reattaching it
1 Like