FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
1,037 views 8 comments
by anonymous
Hello,

I'm trying to establish a WiFi connection between my ESP32 and my RUT240 router and I can't...

I'm really confused: the esp32 connects perfectly with other routers, I tried with my orange box, TP-Link TL-MR6400, TP-Link AC1750 and KuWfi CPF905 and everything works perfectly.

When I connect to the RUT240 with my laptop, it's ok

When I try to connect with the ESP32 on the RUT240 it does not work...

Below the debug log from my ESP

[ 31790][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 31797][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
[ 31804][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
[ 31813][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
.[ 35244][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: RUT240_1D17, BSSID: 00:1e:42:2c:1d:17, Reason: 2
[ 35245][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 35253][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
[ 35259][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
[ 35268][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
.[ 38699][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: RUT240_1D17, BSSID: 00:1e:42:2c:1d:17, Reason: 2
[ 38700][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 38708][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
[ 38714][D][WiFiGeneric.cpp:898] _eventCallback(): WiFi AutoReconnect Running
[ 38723][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0

Did I miss a specific setting for use with ESP32 in the RUT240 ?

Thanks,

1 Answer

0 votes
by anonymous

Hello,

There are no known issues or specific configuration requirements in regards to ESP32. 

On the other hand, after some searching, it seems to be quite common issue for ESP32.

It might help to take a look at the RUT240 side of things. I would like you to attach a troubleshoot file to your question. Please, allow for some WiFi connection attempts to happen first, to have some logs on the RUT, then access router's WebUI, go to System -> Administration -> Troubleshoot section and download troubleshoot file from there.

Best regards,

by anonymous

Hello,

Thanks for answer, I added troubleshoot file
Note: you will probably see my laptop(192.168.1.41) in the logs which connects to it fine
Best regards,

by anonymous

Connection from the laptop is indeed visible, however, I see no other connections. Have you tried to connect with ESP before generating the file?

Otherwise, below are a couple of options you could try in RUT Network -> Wireless configuration settings:

  • Disable Allow legacy 802.11b rates option in global 2.4GHz interface settings Advanced tab.
  • Disable WMM Mode in interface settings General tab.

Best regards,

by anonymous

Hello,

Disabling Allow legacy 802.11b and WMM Mode unfortunately change nothing.

I have done more tests described below:

ESP32 have the same program for all tests (list all ssid seen at proximity, then trying to connect to ssid = RUT240_1D17)

Test 1)  RUT240 serial N° 1112574151 is used

- RUT240 wifi setting with no encryption and ssid= RUT240_1D17

for this preliminary test, I use my laptop and I can connect to ssid  RUT240_1D17, all OK smiley

Test 2)  RUT240 serial N° 1112574151 is used

- RUT240 wifi setting with no encryption and ssid= RUT240_1D17

- press ESP32 reset button to start program, results done on serial port like below

Setup done
scan start
[ 11653][V][WiFiGeneric.cpp:317] _arduino_event_cb(): SCAN Done: ID: 128, Status: 0, Results: 5
[ 11654][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 1 - SCAN_DONE
scan done
5 networks found
1: Livebox-b1de (-52)*
2: M2506 (-57)*
3: RUT240_1D17 (-59)
4: M3103 (-86)*
5: NETGEAR (-91)
Connecting RUT240_1D17
[ 11721][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
...[ 18939][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: RUT240_1D17, BSSID: 00:1e:42:2c:1d:17, Reason: 2
[ 18940][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 18948][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE
[ 18954][D][WiFiGeneric.cpp:889] _eventCallback(): WiFi Reconnect Running
[ 18963][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
..[ 26189][V][WiFiGeneric.cpp:300] _arduino_event_cb(): STA Disconnected: SSID: RUT240_1D17, BSSID: 00:1e:42:2c:1d:17, Reason: 2
[ 26190][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 26198][W][WiFiGeneric.cpp:873] _eventCallback(): Reason: 2 - AUTH_EXPIRE

Esp32 cannot connect to RUT240....sad

Test 3)   TP-Link TL-MR6400 serial N° 22241Y2003255 is used

- TP-Link wifi setting with no encryption and ssid= RUT240_1D17

- press ESP32 reset button to start program, results done on serial port like below
Setup done
scan start
[ 11654][V][WiFiGeneric.cpp:317] _arduino_event_cb(): SCAN Done: ID: 128, Status: 0, Results: 5
[ 11655][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 1 - SCAN_DONE
scan done
5 networks found
1: RUT240_1D17 (-43)
2: M2506 (-63)*
3: Livebox-b1de (-66)*
4: NETGEAR (-82)
5: M3103 (-89)*
Connecting RUT240_1D17
[ 11723][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0
...[ 18160][V][WiFiGeneric.cpp:295] _arduino_event_cb(): STA Connected: SSID: RUT240_1D17, BSSID: 28:87:ba:8c:ed:28, Channel: 3, Auth: OPEN
[ 18161][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 18852][V][WiFiGeneric.cpp:305] _arduino_event_cb(): STA Got New IP:192.168.1.100
[ 18853][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 18856][D][WiFiGeneric.cpp:914] _eventCallback(): STA IP: 192.168.1.100, MASK: 255.255.255.0, GW: 192.168.1.1

Connected to the WiFi network
Local ESP32 IP: 192.168.1.100
Can connect to RUT240_1D17, but it's not RUT240 it's the TP-Link online...
I don't understand why I can't connect to RUT240 with ESP32  crying

by anonymous

In addition, would it be possible to get a packet capture using TCPdump, to see if any association/DHCP packet exchange happens between the devices?

For this you might need to install additional package in the router either via Services -> Package manager, or via the following CLI commands:

  • opkg update
  • opks install tcpdump

To capture data, you would need to execute the following command:

  • tcpdump -i wlan0 -w /tmp/capture.pcap

and then attempt to connect to RUT240.

Extract this file with, for example WinSCP, as instructed here

Also, you did not confirm if attempts to connect with ESP were made, before generating the attached troubleshoot file.

 

by anonymous
I have added capture.pcap (Esp running and trying permanently to connect)

Esp ran before generation of attached troubleshoot file.
by anonymous
Thank you for the details.

I have registered the issue for the RnD to look into. If anything comes up, or need for more information arises, I will let you know.
by anonymous
Hey. I have the same problem with ESP32 but on RUT955 17V020, firmware RUT9XX_R_00.06.08.6. ESP32 connects to every other access point I create, even phones but not to RUT955. It looks like it is some software problem on ESP side, because I can't even see DHCP packets being sent to my router, but the same code works fine for all other routers. I tried with the newest RUT firmware and it changed nothing. On older ESP8266 connnection works fine, so I will switch to that, but the problem with ESP32 is very intriguing.
by anonymous

Thank you AvaRat,

I was inspired by your experience and I bought another type of ESP32 board(AZ-delivery ESP32S Dev Kit C), with this board the connection with the RUT240 works.