B4R Question ESP WROOM 02 and B4X

jarda

Member
Licensed User
Longtime User
Hi Erel..

I can use this library (https://www.b4x.com/android/forum/threads/esp8266-getting-started.68740/) for WiFi module ESP WROOM 02? (connect on Rx and Tx Pro mini 3,3V)


I need

1. Wifi connect as Station (I do know)
2. Connect modules on Pins RX and Tx [I do not know.... open(Rx, Tx) ??? in library is only Wifi.connect ]
3. Net as Server (I do not know........)
fnc net.CreateServer and fnc net.server:listen https://nodemcu.readthedocs.io/en/master/en/modules/net/#netserverlisten
4. Change hostname (I do know) https://nodemcu.readthedocs.io/en/master/en/modules/wifi/#wifistasethostname
5. Set IP (I do know) https://nodemcu.readthedocs.io/en/master/en/modules/wifi/#wifistasetip



how read and send byte array ?

How used in B4R ? (implement)

With PC terminal and COM port do work...

Note:
In ESP wroom 02 is Node MCU last version...
NodeMCU custom builds - http://nodemcu-build.com/


thanks for examples

Jarek
 
Last edited:

jarda

Member
Licensed User
Longtime User
see link..

is small example here..

etc..
3. ....listen .. after click...

sv = net.createServer(net.TCP, 30)
-- server listens on 80, if data received, print data to console and send "hello world" back to caller
sv:listen(80, function(c)
c :n("receive", function(c, pl)
print(pl) end)
c:send("hello world")
end)

when I ctrl-c and ctrl-v into terminal.. This is ok...

Jarek
 
Last edited:
Upvote 0

jarda

Member
Licensed User
Longtime User

Attachments

  • Untitled-3.jpg
    Untitled-3.jpg
    177.6 KB · Views: 692
Upvote 0
Top