B4R Question Problem with webserver on nodeMCU using password

Jan Kanon PA7X

Member
Licensed User
Longtime User
Hi there, can somebody explain me the difference between setAP and softAP in running in native mode.
I try to have a webserver with password. Tried with code on differennt ways :

Public Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
'Log(wifi.StartAccessPoint2("WHHL38","test"))
'Log(wifi.StartAccessPoint("WHHL38"))
Log(wifi.AccessPointIp)
RunNative("softAP", Null)
Log(wifi.AccessPointIp)
Log(wifi.LocalIp)
server.Initialize(80, "server_NewConnection")
LEDPin.Initialize(16, LEDPin.MODE_OUTPUT)
LEDPin.DigitalWrite(True)
server.Listen
End Sub

1. it says softAP is not available.
2. I have seen wehn you use StartAccessPoint2 it ends up with Wifi.SoftAP etc, seems this should automatic fire this event of SoftAP
3. Using StartAccessPoint2 together with setAP does compile but is working with old SSID
4. Setting Public variables ssid and password, comment out StartAccessPoint (as wel as StartAccessPoint2) and runnative the setAP dos not work either.
5. I can connect using StartAccessPoint and runnative("setASP") but the problem is it needs to be protected by password. In orginal Arduino IDE code i have that working but wanna use B4R

Please give directions how to do this in B4R

Best regards, Jan
 

Jan Kanon PA7X

Member
Licensed User
Longtime User
Hi Thanks for fast reply. Ok I understand i left out some code , thought this were comments but now clear it's C++ code running there. So I changed all and compiled without errors. Unfortunately there is no password asked at Wifi connecting (actually its still working with the old ssid also. I checked the generated b4r_main and that seemd to be the latest compiled with the right ssid. However after flush to nodeMCU it's not working yet. Do you have any other directions to think about ?

Regards Jan
 
Upvote 0
Top