1 2 Previous Next 20 Replies Latest reply on Mar 22, 2016 5:25 PM by harryshirakawa

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

    harryshirakawa

      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

      BoardIntel Edison Kit for Arduino

      OSIntel 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

       

      3. try iwconfig command to see if setting was done properly

           -then we encounter 2 types of response as follows.

       

      [Succeeded] ID can be show up as an ESSID

       

          root@edison:~# iwconfig

        wlan0 IEEE 802.11abgn ESSID:"toroXX"

        Mode:Ad-Hoc  Frequency:2.472 GHz  Cell: A6:34:C6:5E:32:F2

        Tx-Power=31 dBm

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

        Encryption key:3132-3331-3233-3132-3331-3233-61

        Power Management:on

       

      [Failed] ESSID will be shown up as off/any

        root@edison:~# iwconfig

        wlan0 IEEE 802.11abgn  ESSID:off/any

        Mode:Ad-Hoc  Frequency:2.472 GHz  Cell: Not-Associated

        Tx-Power=31 dBm

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

        Encryption key:3132-3331-3233-3132-3331-3233-61

        Power Management:on

       

        • 1. Re: How to get stable ad-hoc connection with ch12 or ch13?
          Intel_Alvarado

          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

          • 2. Re: How to get stable ad-hoc connection with ch12 or ch13?
            harryshirakawa

            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

            • 3. Re: How to get stable ad-hoc connection with ch12 or ch13?
              Intel_Alvarado

              Does this also happen if you use the previous image, it can be found in 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

              • 4. Re: How to get stable ad-hoc connection with ch12 or ch13?
                harryshirakawa

                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

                           Channel 40 : 5.2 GHz

                           Channel 44 : 5.22 GHz

                           Channel 48 : 5.24 GHz

                           Channel 52 : 5.26 GHz

                           Channel 56 : 5.28 GHz

                           Channel 60 : 5.3 GHz

                           Channel 64 : 5.32 GHz

                           Channel 100 : 5.5 GHz

                           Channel 104 : 5.52 GHz

                           Channel 108 : 5.54 GHz

                           Channel 112 : 5.56 GHz

                           Channel 116 : 5.58 GHz

                           Channel 120 : 5.6 GHz

                           Channel 124 : 5.62 GHz

                           Channel 128 : 5.64 GHz

                           Channel 132 : 5.66 GHz

                           Channel 136 : 5.68 GHz

                           Channel 140 : 5.7 GHz

                           Current Frequency:2.412 GHz (Channel 1)

                 

                 

                 

                 

                • 5. Re: How to get stable ad-hoc connection with ch12 or ch13?
                  harryshirakawa

                  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?

                  • 6. Re: How to get stable ad-hoc connection with ch12 or ch13?
                    Intel_Alvarado

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

                     

                    Sergio

                    • 7. Re: How to get stable ad-hoc connection with ch12 or ch13?
                      harryshirakawa

                      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.

                       

                      <Logs for 11ch>

                      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

                       

                      <Logs for 13ch>

                      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

                       

                      • 8. Re: How to get stable ad-hoc connection with ch12 or ch13?
                        harryshirakawa

                        I wonder if your reprecation was done.

                        It is getting urgent to fix this issue.

                        • 9. Re: How to get stable ad-hoc connection with ch12 or ch13?
                          Intel_Alvarado

                          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

                          • 10. Re: How to get stable ad-hoc connection with ch12 or ch13?
                            harryshirakawa

                            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] 

                            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

                             

                             

                             

                            • 11. Re: How to get stable ad-hoc connection with ch12 or ch13?
                              Intel_Alvarado

                              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

                              • 12. Re: How to get stable ad-hoc connection with ch12 or ch13?
                                harryshirakawa

                                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.

                                • 13. Re: How to get stable ad-hoc connection with ch12 or ch13?
                                  Intel_Alvarado

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

                                   

                                  Sergio

                                  • 14. Re: How to get stable ad-hoc connection with ch12 or ch13?
                                    harryshirakawa

                                    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.

                                    1 2 Previous Next