Community
cancel
Showing results for 
Search instead for 
Did you mean: 
HShir2
Novice
3,936 Views

How to get stable ad-hoc connection with ch12 or ch13?

Using an Edison with activation of wifi adhoc, and its under the evalution right now.

Though it can be working at the beginning, it became unstable shortly.

Using wifi channel is 12 and 13 as they are reagal channels here in Japan.

Any comment or suggestion would be appreciated.

 

Our Environment and its procedure is below

Board:Intel Edison Kit for Arduino

OS:Intel Edison Board Firmware Software Release 2.1

[Environment]

  ------------------------------------------------------------------

  root@edison:~# cat /etc/version

  weekly-159.devkit-2.0

 ------------------------------------------------------------------

[Procedure]

1.Set country code [ccode=ALL] to [ccode=JP]

2.Set ch13 as an adhoc

ifconfig wlan0 up

-wait for 3 seconds-

wpa_cli -iwlan0 disconnect

wpa_cli -iwlan0 remove_network all

wpa_cli -iwlan0 add_network

wpa_cli -iwlan0 set_network 0 frequency 2472

wpa_cli -iwlan0 set_network 0 mode 1

wpa_cli -iwlan0 set_network 0 ssid \"toroXX\"

wpa_cli -iwlan0 set_network 0 auth_alg OPEN

wpa_cli -iwlan0 set_network 0 key_mgmt NONE

wpa_cli -iwlan0 set_network 0 scan_ssid 1

wpa_cli -iwlan0 set_network 0 wep_key0 31323331323331323331323361

wpa_cli -iwlan0 set_network 0 wep_tx_keyidx 0

wpa_cli -iwlan0 select_network 0

wpa_cli -iwlan0 enable_network 0

wpa_cli -iwlan0 reassociate"

-wait for 3 seconds

ifconfig wlan0 192.168.0.1 netmask 255.255.255.0 up

<span style="color: # 000000; font-family: arial,helvetica,sans-serif; font-size: 10...

20 Replies
Sergio_A_Intel
Employee
73 Views

Hi harryshirakawa,

I looked at the Wi-Fi Guide to check the steps needed to configure the Edison as ad-hoc. The steps are very similar. The only differences are the frequency, the wep_key and the reassociate lines.

What exactly happens between the two types of response you get? Does it connect successfully and then disconnects without any reason if so, how long does it take to disconnect? Does this happen after you reboot your board?

While connected are you running any other command or process?

Sergio

HShir2
Novice
73 Views

Sir,

Thanks for your quick response.

As for reassociate line, the WiFi Guide recommends to set it as automatics adoption while in boot process.

The reason why the "reassociate line" added is to reconfigure the setting dynamically.

We simply try pinging and then get OK / NG result, even same module, and accessed by the same PC.

The result of "iwconfig" shows that ESSID occasionally responded as "off/any", which must be the ID set by the "set network 0 ssid" .

Thanks in advance to your help.

Harry

Sergio_A_Intel
Employee
73 Views

Does this also happen if you use the previous image, it can be found in https://software.intel.com/en-us/iot/hardware/edison/downloads IoT - Intel® Edison Board Download | Intel® Developer Zone under the previous versions section.

Try to setup ad-hoc using these commands

ifconfig wlan0 up

iwconfig wlan0 mode ad-hoc

iwconfig wlan0 essid "name"

Let me know your results.

Sergio

HShir2
Novice
73 Views

Sergio,

Using the previous image did not improve the problem.

Trying to setup ad-hoc using commands, made channel 1 through 11 work OK, but ch12,13.

Here is the procedure:

-ifconfig wlan0 192.168.0.1

-iwconfig wlan0 mode Ad-Hoc

-iwconfig wlan0 channel 13

-iwconfig wlan0 essid TEST

Then, we wouldn't be able to setup ch12 & 13, though those channels were responded as available channel as listed below.

The list was generated by executing the command of "iwlist wlan0 channel".

root@edison:~# iwlist wlan0 channel

wlan0 32 channels in total; available frequencies:

Channel 01 : 2.412 GHz

Channel 02 : 2.417 GHz

Channel 03 : 2.422 GHz

Channel 04 : 2.427 GHz

Channel 05 : 2.432 GHz

Channel 06 : 2.437 GHz

Channel 07 : 2.442 GHz

Channel 08 : 2.447 GHz

Channel 09 : 2.452 GHz

Channel 10 : 2.457 GHz

Channel 11 : 2.462 GHz

Channel 12 : 2.467 GHz

Channel 13 : 2.472 GHz

Channel 36 : 5.18 GHz

<span lang="EN-US" style="font-family: 'Arial',sans-serif; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-bidi-t...

HShir2
Novice
73 Views

Sergio,

Tried to swap the frequency section of Ad-hoc script, then found that following 2 commands behave differently than others.

1. wpa_cli -iwlan0 set_network 0 frequency 2467

2. wpa_cli -iwlan0 set_network 0 frequency 2472

They are the commands which set corresponding wifi channel (2467 as ch12, 2472 as ch13).

If swapping the command to change channels 1-11, it can be set without any problem however, two channels (12 & 13) basically fail, sometimes done successfully.(approx. twice out of 10)

For those two channels, adding duplicated the lines on adhoc script, did not contribute improving successful rate.

I came up with the question that, Is there any timing difference between ch12 &13 vs. other channels for the execution of "set_network"?

If execution timing for ch12 & ch13 is different than others, what can be the solution to that?

Is that Broadcom wifi chip firmware issue? Or software driver?

Sergio_A_Intel
Employee
73 Views

We will try to replicate to see if we get the same behavior. We will post a reply soon.

Sergio

HShir2
Novice
73 Views

In order to see if the ch12 and 13 has an issue only in adhoc mode or regardless of the mode, further test with infrastructure mode was done and ch13 (and 12)worked properly with infrastructure mode. Note that setting change via a "configure_edison –wifi", after executing the command, pinging to network router and the devices beyond the router successfully responded.

One more analysis was done by adding log to "wpa_supplicant service" as follows

/etc/systemd/system/multi-user.target.wants/wpa_supplicant.service

ExecStart=/usr/sbin/wpa_supplicant -dddt -f /var/log/wpa_supplicant.log -u -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211 -puse_p2p_group_interface=1p2p_device=1 -m/etc/wpa_supplicant/p2p_supplicant.conf -O /var/run/wpa_supplicant -e /etc/wpa_supplicant/entropy.bin

As a result of comparison of the log between 2 channels, we found that the error was shown up on ch13 as :

(nl80211: Join IBSS failed: ret=-22)

Here each logs are shown below.

1449101738.809082: * freq=2462

1449101738.809139: * Extra IEs for Beacon/Probe Response frames - hexdump(len=0):

1449101738.837307: nl80211: Join IBSS request sent successfully

1449101738.838058: wlan0: Setting authentication timeout: 20 sec 0 usec

1449101740.775730: * freq=2472

1449101740.775787: * Extra IEs for Beacon/Probe Response frames - hexdump(len=0):

** 1449101740.775949: nl80211: Join IBSS failed: ret=-22 (Invalid argument)

** 1449101740.776030: wlan0: Association request to the driver failed

HShir2
Novice
73 Views

I wonder if your reprecation was done.

It is getting urgent to fix this issue.

Sergio_A_Intel
Employee
73 Views

We tested channels 12 and 13 using the following commands. Please give it a try and let us know your results.

wpa_cli -iwlan0 disconnect

wpa_cli -iwlan0 remove_network all

wpa_cli -iwlan0 add_network

wpa_cli -iwlan0 set_network 0 mode 1

wpa_cli -iwlan0 set_network 0 auth_alg OPEN

wpa_cli -iwlan0 set_network 0 key_mgmt NONE

wpa_cli -iwlan0 set_network 0 scan_ssid 1

wpa_cli -iwlan0 set_network 0 wep_key0 31323331323331323331323361

wpa_cli -iwlan0 set_network 0 wep_tx_keyidx 0

wpa_cli -iwlan0 select_network 0

wpa_cli -iwlan0 enable_network 0

// wait 5 seconds

iwconfig wlan0 channel 13

iwconfig wlan0 essid "toroXX"

wpa_cli -iwlan0 reassociate

wpa_cli -iwlan0 status

ifconfig wlan0 192.168.0.1 netmask 255.255.255.0 up

ifconfig wlan0 down

// wait 5 seconds

ifconfig wlan0 up

Sergio

HShir2
Novice
73 Views

I tried commands but it wouldn't set the channel 13 properly.

It seems "iwconfig wlan0 channel 13" command was ignored, our test result showed that it grabbed other channel.

Here our result as attached below. The channel was ch3.

Let me know if our test script has something wrong.

[Test Script]

wpa_cli -iwlan0 disconnect

wpa_cli -iwlan0 remove_network all

wpa_cli -iwlan0 add_network

wpa_cli -iwlan0 set_network 0 mode 1

wpa_cli -iwlan0 set_network 0 auth_alg OPEN

wpa_cli -iwlan0 set_network 0 key_mgmt NONE

wpa_cli -iwlan0 set_network 0 scan_ssid 1

wpa_cli -iwlan0 set_network 0 wep_key0 31323331323331323331323361

wpa_cli -iwlan0 set_network 0 wep_tx_keyidx 0

wpa_cli -iwlan0 select_network 0

wpa_cli -iwlan0 enable_network 0

sleep 5

iwconfig wlan0 channel 13

iwconfig wlan0 essid "toroXX"

wpa_cli -iwlan0 reassociate

wpa_cli -iwlan0 status

ifconfig wlan0 192.168.0.1 netmask 255.255.255.0 up

ifconfig wlan0 down

sleep 5

ifconfig wlan0 up

[Result]

mailto:root@edison root@edison:~# iwconfig

wlan0 IEEE 802.11abgn ESSID:"aterm-c916a2-gw"

Mode:Ad-Hoc Frequency:2.422 GHz Cell: 6E:23:96:E5:48:D1

Tx-Power=31 dBm

Retry long limit:7 RTS thr:off Fragment thr:off

Encryption key:off

Power Management:on

Sergio_A_Intel
Employee
73 Views

We have tried these commands on an EDI1 sku using image version weekly-159.devkit-2.0 and ch13 is getting set. Can you please provide the SKU of the board found in the box? If you don't have the SKU, give us the serial number of the board so we can retrieve this information. If there are any other configuration details you think would help us troubleshoot, don't hesitate to share them.

Sergio

HShir2
Novice
73 Views

Sergio,

SKU ver. being used is as follows, same as you adopted.

Environment]

  ------------------------------------------------------------------

  root@edison:~# cat /etc/version

  weekly-159.devkit-2.0

 ------------------------------------------------------------------

We have several Edison boards, everything got the same symptom therefore, this should be common problem.

Maybe it needs Broadcom technical support. I have no idea who/how to contact to accelerate this investigation.

Sergio_A_Intel
Employee
73 Views

Can you give us your board's serial number? You can send it via private message.

Sergio

HShir2
Novice
73 Views

As for the serial number of our boards, here are serial number:

FZED 439D 00 RKN501

FZED 438D 00 NDJ501

I hope this would help your further investigation.

HShir2
Novice
73 Views

Let me know, if you need further information for your analysis...

Sergio_A_Intel
Employee
73 Views

Thank you, we're currently running additional tests. If we need more information we'll let you know. We'll provide a suggestion soon.

Sergio

HShir2
Novice
73 Views

Do you guys still keep running tests?

Please let me know, if you have some conclusion on this issue.

Sergio_A_Intel
Employee
73 Views

Yes, we're still running tests. We'll post our results shortly. Thank you for your patience.

Sergio

Sergio_A_Intel
Employee
73 Views

Channels 12,13, and 14 are not supported. Please use any of the other channels. The document at http://download.intel.com/support/edison/sb/edison_wifi_331438001.pdf http://download.intel.com/support/edison/sb/edison_wifi_331438001.pdf will be updated to reflect this as well.

Sergio