cforth icon indicating copy to clipboard operation
cforth copied to clipboard

Connect to Wifi ?

Open TRiXER88 opened this issue 5 years ago • 6 comments

If I type wifi-sta-on it says it needs a SSID when I type wifi-sta-ssid "SSID" then it says again it needs a SSID. I tried all combinations. maybe you can help me.

Greetings Lukas

TRiXER88 avatar Mar 18 '19 14:03 TRiXER88

wifi-sta-ssid is a defer, a vectored execution, analogous to a callback. You might do this before wifi-sta-on;

:noname  " SSID" ;  to wifi-sta-ssid

When not set, the word must-set-ssid is executed, which aborts with message wifi-sta-ssid needs to be set.

quozl avatar Mar 18 '19 17:03 quozl

First of all thanks. I think it worked. But a Question, how can I show the IP Address? And can I connect via Telnet or something?

TRiXER88 avatar Mar 19 '19 07:03 TRiXER88

The phrase ipaddr@ .ipaddr will show the IP address.

There is no canned Telnet server but there is a framework for acting as web server. serve-sensors.fth is an example of a web service that displays the state of a collection of sensors relevant to a plant-growing system. The key thing you have to define is a word to plug into the defer word "homepage". When you browse to port 80, homepage is called emit HTML that will be displayed in the browser.

MitchBradley avatar Mar 19 '19 07:03 MitchBradley

Ok thanks. if I Type ipaddr@ .ipaddr I have Ip address 0.0.0.0 :/

TRiXER88 avatar Mar 19 '19 07:03 TRiXER88

Ok got my IP Address. The serve-sensors file is not working for me but thanks. I try to get a remote connection.

TRiXER88 avatar Mar 19 '19 08:03 TRiXER88

serve-sensors.fth will not work unless you have all of those hardware sensors. Use it as an example.

MitchBradley avatar Mar 19 '19 16:03 MitchBradley