Multiple issues with wireless connectivity

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

Multiple issues with wireless connectivity

Postby DarkSide » Tue Apr 07, 2015 7:15 pm

Probably this is more HDK related then SDK, but anyway.

I have next network infrastructure:
- Gateway server (ubuntu 12.04.5 x86 + hostapd ath9k based AP 300mbit)
- 1 wired client
- 5 wireless clients
All connected wireless clients are in 802.11n mode and work stable (connectivity is robust and stable).

Now i'm trying to connect ESP8266 to my AP.
The first problem I have faced is that I just can't connect ESP to my AP because of failed association and then authentication (log from hostapd):

Code: Select all

IEEE 802.11: did not acknowledge association response
IEEE 802.11: did not acknowledge authentication response

The problem here is that STA unable to ack several frames, but the hostapd needs them to be acked. As a workaround I have patched hostapd to ignore those frames. ESP now able to connect to my network.

Next problem that I have faced is that ESP8266 became unaccessible from other machines in my network after about of 10 seconds. My investigation resulted in that the ESP get removed from the ARP cache of machine from which you try to access it. This leads to next situation: after ESP connect to AP and got IP it can be accessible from any machine on the network for about of 10 seconds. If you not access ESP in that period it became inaccessible. I have found 2 workarounds for this:
1) assign static IP to ESP and infinitelly ping it
2) assign static IP to ESP and add static ARP record

The question: is there any straight solution to solve those two issues?
It's impossible to use ESP in any wireless projects with those "baby diseases".
Last edited by DarkSide on Tue Apr 07, 2015 10:35 pm, edited 1 time in total.

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

Re: Multiple issues with wireless connectivity

Postby DarkSide » Tue Apr 07, 2015 7:28 pm

Additional info:
hostapd v2.4 (latest stable) is build from source with .config file (in attachment) and run with next hostapd.conf (in attachment)

Wireless card is (from lshw output):

Code: Select all

description: Wireless interface
product: AR922X Wireless Network Adapter
vendor: Qualcomm Atheros


Similar topics on other forums:
http://www.esp8266.com/viewtopic.php?f=6&t=1633 (related to ARP issues)
http://www.esp8266.com/viewtopic.php?f=6&t=511 (related to ARP issues)
http://www.esp8266.com/viewtopic.php?f=6&t=1766 (related to "IEEE 802.11: did not acknowledge association response")

ESP is running SDK v1.0.0 (also have tried actual version of RTOS SDK v0.9.9).
Attachments
hostapd_config_files.zip
(28.33 KiB) Downloaded 494 times

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: Multiple issues with wireless connectivity

Postby ESP_Faye » Wed Apr 08, 2015 11:53 am

Hi,

Could you capture packets with omnipeek or wireshark,and offer us the captured logs for debugging?

And could you offer the configuration file of hostapd.conf and the hostapd log ?

Thanks for your interest in ESP8266 !

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

Re: Multiple issues with wireless connectivity

Postby DarkSide » Wed Apr 08, 2015 6:28 pm

Espressif_Faye wrote:Hi,

Could you capture packets with omnipeek or wireshark,and offer us the captured logs for debugging?

And could you offer the configuration file of hostapd.conf and the hostapd log ?

Thanks for your interest in ESP8266 !

You can find hostapd configuration in attachment to previous reply - "hostapd_config_files.zip".
What do you exacly need to be captured by pcap? ARP requests by ESP8266 or all packets or....?

I will run hostapd with "-dd" key a bit later and will provide you full log.

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

Re: Multiple issues with wireless connectivity

Postby DarkSide » Wed Apr 08, 2015 9:45 pm

It's very strange I can't reproduce problem with "esp not connecting to wifi" anymore (the problem with ARP still persist). I will investigate further and will let you know.

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

Re: Multiple issues with wireless connectivity

Postby DarkSide » Wed Apr 08, 2015 10:05 pm

Here is in attachment ARP packets captured from PC from which I'm trying to connect and ping to ESP8266 configured in STATION mode.
Some details about my actions and captured packets:
1) packets 1 - 4: ESP powered on and connected to wifi
2) wait for about a minute
3) packets 10 - 62: I start pinging ESP host (ESP was replied after 47 seconds)
4) stop ping and wait again for some time (2 mins)
5) packets 79 - 114: start pinging ESP host again (ESP was replied after 32 seconds)
Attachments
esp8266_arp.zip
(1011 Bytes) Downloaded 416 times

tve
Posts: 123
Joined: Sun Feb 15, 2015 4:33 pm

Re: Multiple issues with wireless connectivity

Postby tve » Thu Apr 09, 2015 3:16 am

The fact that you only capture ARP packets makes it difficult to tell what's going on. Would be better to also capture any packets to/from the esp's mac address. As-is, one can't tell when pings succeed (nor why), 'cause there is no ARP response for .3 visible anywhere.

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

Re: Multiple issues with wireless connectivity

Postby DarkSide » Thu Apr 09, 2015 4:30 am

DarkSide wrote:It's very strange I can't reproduce problem with "esp not connecting to wifi" anymore (the problem with ARP still persist). I will investigate further and will let you know.

At last I was able to reproduce this. In attached hostapd.original.log file (hostapd version 2.4 compiled from sources without my patch to skip invalid associations requests) you will find two MACs: 18:fe:34:9f:1f:57 and 18:fe:34:9d:e7:97.
Those two MACs are two ESP8266 that I have. Both of them have identical firmware (based on SDK 1.0.0) and work in 802.11n STA-only mode. The first one (18:fe:34:9f:1f:57) is connecting to AP, while the other one (18:fe:34:9d:e7:97) does not.
The reason because first ESP is connecting to AP while second is not is unknown to me. The only thing in my mind is that I was able to connect it to AP while using patched hostapd (maybe something was cached on the system level, this is mystique for me). But actually we have a situation when newly flashed ESP8266 is not connecting to AP (I was not experimenting with 18:fe:34:9d:e7:97 before, it was "virgin").
Attachments
hostapd.original.log.zip
(9.17 KiB) Downloaded 470 times

DarkSide
Posts: 29
Joined: Mon Apr 06, 2015 6:51 pm

Re: Multiple issues with wireless connectivity

Postby DarkSide » Thu Apr 09, 2015 5:07 am

tve wrote:The fact that you only capture ARP packets makes it difficult to tell what's going on. Would be better to also capture any packets to/from the esp's mac address. As-is, one can't tell when pings succeed (nor why), 'cause there is no ARP response for .3 visible anywhere.

Here is all packets. In attached zip file you will find 2 files: one if from client PC on the network from which I'm pinging ESP, and the second one is a tcpdump from gateway server (Access point).
The 192.168.0.10 is PC from which I pinging ESP and the 192.168.0.3 is an ESP itself. 192.168.0.1 is an AP.
Attachments
pcap.zip
(3.04 KiB) Downloaded 424 times

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: Multiple issues with wireless connectivity

Postby ESP_Faye » Thu Apr 09, 2015 8:20 pm

Hi,

What kinds of hardware module board are you using ? such as AITHINK ESP-01

Could you offer the captured packets of 80211 wireless (NOT wire) ?

Thanks for the help.

Who is online

Users browsing this forum: No registered users and 16 guests