10 Replies Latest reply on Nov 23, 2015 4:03 AM by ivansky

    Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?

    ivansky

      I've been reviewing all the posts and articles I can find here in the Intel communities and elsewhere on the web, and I've even had assistance from one of the local networking people, which I think has got me quite close to getting this working, but I am still not successful in having my Gen 2 Galileo join an enterprise WiFi network.

       

      Here is the background:

       

      I have an enterprise Wifi network that I need to connect to (at my son's school) and have not been successful even after I was given the wpa_supplicant.conf file by someone in the networks section - he worked with a teacher at a different school to connect up a bunch of Raspberry Pi boards successfully with this config.  The wifi network is the same across all schools, btw.

      I have a Galileo Gen 2 board, we have successfully joined a home WPA2 network with this exact same board plenty of times, it is just the enterprise level one that is giving me problems. We are currently using an Intel Centrino Wireless-N 135 wifi board in the PCI express slot of the Galileo.

       

      My /etc/wpa_supplicant.conf file looks like:

      ctrl_interface=/var/run/wpa_supplicant

      ctrl_interface_group=root

      network={

        ssid="EDU"

        proto=RSN

        key_mgmt=WPA-EAP

        pairwise=CCMP

        group=CCMP

        eap=PEAP

        identity="USERNAME"

        password="PASSWORD"

        ca_cert="/usr/local/share/ca-certificates/secure.cer"

        altsubject_match="DNS:secure.domain"

        phase1="peaplabel=0"

        phase2="auth=MSCHAPV2"

      }

       

      Where of course "USERNAME" and "PASSWORD" are valid credentials for the network (I have tested them on my laptop).

       

      If I run "ifup wlan0", I get:

      root@clanton:/etc# ifup wlan0

      Successfully initialized wpa_supplicant

      udhcpc (v1.20.2) started

      Sending discover...

      Sending discover...

      Sending discover...

      No lease, failing

       

      And also:

       

      root@clanton:/etc# wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant.conf

      Successfully initialized wpa_supplicant

      wlan0: Trying to associate with 18:ef:63:fd:da:d0 (SSID='EDU' freq=2412 MHz)

      ioctl[SIOCSIWFREQ]: Device or resource busy

      wlan0: Association request to the driver failed

      wlan0: Associated with 18:ef:63:fd:da:d0

      wlan0: CTRL-EVENT-EAP-STARTED EAP authentication started

      wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25

      wlan0: CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected

      Illegal instruction

       

      I have other devices on the wireless network at this spot, so I think the signal seems to be OK.  I have a laptop antenna attached to the Wifi card (i.e. two long wires dangling underneath the board).

       

      I keep running across suggestions to use the connmanctl commands, which look interesting, although I'm not sure they should be necessary, but I have yet to find a page that actually helps me install them!

       

      For instance, "systemctl" does not seem to be on my board, so I really can't enable it:

      root@clanton:/etc# systemctl enable connmanctl

      -sh: systemctl: command not found

       

      I tried hunting around a little in /usr/sbin and /usr/bin but couldn't find it.  If I need connmanctl to do further debugging, can anyone point me to information that will get it installed?

        • 1. Re: Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?
          mhahn

          which image have you installed? looks like an (old) uclibc one?

          If you go for the eglibc image you'll also find connman which you may also want to give a try.

          If yes, following hints on my blog might be of use for you IoT - Connecting Intel(R) Edison to an IEEE 802.1x Enterprise Hotspot via connman | Intel® Developer Zone. In that case you should rather remove your wpa_supplicant configuration again and leave it to connman to do the job

          • 2. Re: Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?
            ivansky

            Thanks for that tip - I did leave the downloading of the Linux image to my 12 year old son originally (he's my co-engineer).  After doing some reading I can see that the history of the Linux image is a bit...interesting...so I should have paid more attention.  It has taken me quite some Googling to find what I think is the right place to download the image from, so I'm going to record it here and hope Intel don't change it again:  https://software.intel.com/en-us/iot/hardware/galileo/downloads

             

            I will download the eglibc image from there and see if it has more solid support for the driver, which might solve my problem immediately.  If not, I will use some of the other suggestions about debugging with connman and see how I go.  Unfortunately school is out for a couple of weeks so it may be a little while before I can test it again without wardriving the local high school, which has the best wifi coverage and might offer enough signal outside... :-)


            Thanks again for your help.

            • 3. Re: Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?
              ivansky

              Hi, I've had time to look at this problem this weekend and so I started by loading a more up to date Linux image from IoT - Intel® Galileo Board Download | Intel® Developer Zone.

              I used the file iot-devkit-1.5-i586-galileo.

               

              Well, that changed everything!  The interface names are all different, for starters, no more "eth0" or "wlan0".  Now they are called "enp0s20f6" and "wlp1s0".

               

              There is not even an /etc/network/interfaces file.  So I am noodling around a little, having successfully ssh'd into the board, but I am definitely having trouble setting up the wireless interface.  I am going to try some of the guidance about using connman, but I'm bemused as to why this image is so completely different to all the others? This invalidates nearly every single page I can find for help on this community forum!  What I mean by this is, if my network interface is no longer called "eth0", the suggestions on nearly every discussion on this forum don't work.  The suggestion to use commands like "ifup wlan0" definitely don't work, for instance.

               

              Would love some help here - have I installed the wrong Linux image?  I feel like I must be missing something but I am not quite sure what it is at the moment...

               

              Thanks.

              • 4. Re: Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?
                ivansky

                Just as a follow-up, have successfully connected to home wifi network using connman ("technologies" confirms the board is on the Wifi), only to find that sketches no longer work for WiFi access.  The WiFiWebClient sketch, which used to work just fine, now fails with an error "WiFi shield not present".  I disabled that part of the sketch, so it continues to try to connect to my WiFi network, but without success.  It seems a bit like the new Linux image is completely incompatible with the existing WiFi sketches. So it is definitely one step forward, one step back at the moment.

                 

                I've done some more reading, and I think I've identified that the two main streams of Linux available for the board offer different functionality, as per the summary in this discussion: Re: Different linux images? uclibc verus eglibc images?

                 

                As far as I can understand, the uclibc images are necessary if you want to put sketches on to the board, which I think I need to do, because we are interacting with an RFID card to read RFID tags - the wireless side I am trying to set up is to make web calls in response to RFID tag events.  From what I've read so far, it seems that the eglibc images are not compatible with the Arduino IDE, although it seemed that Alex's image offered some support?  It seems that the eglibc images are mainly about running the board under Linux - I'm not clear on whether the board can then interact with devices through the analog/digital pins in this mode?

                 

                However, the devtools image that Alex refers to in that thread doesn't seem to be available anymore.  I can put the uclibc image back on to my board, but given that the original problem was crashing wifi drivers, I think that might put me back to square one.

                 

                Alternatively, it appears that Intel has put some effort into creating an image that can be used with a C/C++ toolset, as described at Intel's IoT DevKit

                Except that the drivers page referenced there says "Instructions for how to compile your EGLIBC image with libmraa and upm coming soon."  So that sounds like the project wasn't finished.  I don't really want to go down that pathway if it isn't actually supported.

                 

                So I have a lot of questions, but if I had to boil it down to just one, it would be: "Given that I am trying to build a project that reads RFID tags and then make web calls (just GETs) to register those tags, is there a more stable Linux image than the uclibc version that I should be using?"

                 

                I apologise for not providing more detail in the first place, which I will include here now:  We are using an RC522 RFID reader, and the project is a classroom RFID roll marker, which my son decided to build as a school technology project. When a tag is read, it calls a CGI script (e.g. GET http://webserver/tagin.py?name=fred) to record the entry, and the teacher can call another page to pull up a list of students who have tagged in that day.  We have most of it working already, but cannot get the Galileo on to the school Wifi network, which is an enterprise level WPA2 using PEAP and such.  We have the board working fine on our home Wifi network using the uclibc image, but as described in my first post, when I tried to initialise it on the school network, I receive the "illegal instruction" failure.

                • 5. Re: Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?
                  mhahn

                  ivansky

                  ivansky wrote:

                   

                  Just as a follow-up, have successfully connected to home wifi network using connman ("technologies" confirms the board is on the Wifi), only to find that sketches no longer work for WiFi access.  The WiFiWebClient sketch, which used to work just fine, now fails with an error "WiFi shield not present".  I disabled that part of the sketch, so it continues to try to connect to my WiFi network, but without success.  It seems a bit like the new Linux image is completely incompatible with the existing WiFi sketches. So it is definitely one step forward, one step back at the moment.

                   

                  Must have overseen the Arduino dependency. I have done mostly Linux native and not Arduino development on the board. In particular I don't know how the Arduino WiFi part is realized technically. But I'm pretty sure it's not using connman.

                   

                  As far as I can understand, the uclibc images are necessary if you want to put sketches on to the board, which I think I need to do, because we are interacting with an RFID card to read RFID tags - the wireless side I am trying to set up is to make web calls in response to RFID tag events.  From what I've read so far, it seems that the eglibc images are not compatible with the Arduino IDE, although it seemed that Alex's image offered some support?  It seems that the eglibc images are mainly about running the board under Linux - I'm not clear on whether the board can then interact with devices through the analog/digital pins in this mode?

                   

                   

                  uclibc is only really required if you want to run Galileo without SD card as it takes less space. I.E. an eglibc based image wouldn't quite fit on the flash chip. As long as you boot from SD card you can use both images. Arduino will work on both.

                   

                   

                  Alternatively, it appears that Intel has put some effort into creating an image that can be used with a C/C++ toolset, as described at Intel's IoT DevKit

                  Except that the drivers page referenced there says "Instructions for how to compile your EGLIBC image with libmraa and upm coming soon."  So that sounds like the project wasn't finished.  I don't really want to go down that pathway if it isn't actually supported.

                   

                  Not sure where you found that comment. Actually, you can download and install the Eclipse IDE as described on IoT - Installing the Eclipse* IDE | Intel® Developer Zone.

                  You can but don't have to build (compile) the eglibc image. MRAA and UPM are already included and can be upgraded via "opkg".

                  • 6. Re: Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?
                    ivansky

                    Thanks very much for persisting with this.  After much more playing around with it, I think I was misinterpreting some of the comments in other threads, e.g. in Re: Different linux images? uclibc verus eglibc images?, Alex T says "Generally, only uclibc-based images work with Arduino IDE" but I think this may now be fixed?  Anyway, I don't know why my board says "WiFi shield not present" but disabling that part of the code lets it try to join the network.  I think that any problems I had after that were more related to poor WiFi signal - the area I am in actually has a decent signal, but the laptop wire aerial we put on the Centrino N-135 card doesn't seem to pick it up all that well.

                     

                    So I am going to keep working at a spot with slightly better signal, and see how it goes - so I think my next step is to try an eglibc image again and then try it on the wireless at school to see if it has better drivers that don't crash.

                     

                    I will report back if I have success, and I do appreciate your help.

                    Ivan

                    • 7. Re: Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?
                      ivansky

                      Sorry to take so long to follow this up.  I have had a chance to visit the same network again and try to connect with connmanctl, but getting stuck with an error message as follows:

                       

                      root@galileo:/var/lib/connman# connmanctl services

                                               wifi_00150094e27e_hidden_managed_ieee8021x

                          EDU                  wifi_00150094e27e_454455_managed_ieee8021x

                      root@galileo:/var/lib/connman# connmanctl connect wifi_00150094e27e_454455_managed_ieee8021x

                      Error /net/connman/service/wifi_00150094e27e_454455_managed_ieee8021x: Method "Connect" with signature "" on interface "net.connman.Service" doesn't exist

                       

                      I followed the instructions on your blog about using connmanctl to connect to the wifi network, for instance:

                       

                      root@galileo:/var/lib/connman# ls /var/lib/connman/etdwifi.config

                      /var/lib/connman/etdwifi.config

                      root@galileo:/var/lib/connman# cat /var/lib/connman/etdwifi.config

                      # 802.1x config for wireless network

                      # v1.0 provided by NCS Education

                      ctrl_interface=/var/run/wpa_supplicant

                      ctrl_interface_group=root

                      network={

                        ssid="EDU"

                        proto=RSN

                        key_mgmt=WPA-EAP

                        pairwise=CCMP

                        group=CCMP

                        eap=PEAP

                        identity="username"

                        password="password"

                        ca_cert="/etc/certificates/ETD.cer"

                        altsubject_match="DNS:secure.ed.act.edu.au"

                        phase1="peaplabel=0"

                        phase2="auth=MSCHAPV2"

                      }

                       

                      Of course "identity" and "username" above are valid credentials for the network.

                       

                      I'm not sure what the error message from connmanctl is trying to tell me, I've never used this command before, so I'm a bit stuck.  I'm not sure whether connman scans the /var/lib/connman directory for any config files and how it knows this is a wireless config? If I restart connman it recognises that I haven't connected the Ethernet interface, but doesn't say anything about wireless:

                      root@galileo:/var/lib/connman# systemctl restart connman

                      root@galileo:/var/lib/connman# [ 1498.830979] enp0s20f6: device MAC address 98:4f:ee:01:89:ec

                      [ 1498.871930] IPv6: ADDRCONF(NETDEV_UP): enp0s20f6: link is not ready

                       

                      Any help would be appreciated.


                      Thanks.

                      Ivan

                      • 8. Re: Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?
                        ivansky

                        Just for the record, this problem is still not solved (I don't know how to make a thread not "Assumed Answered").  Unfortunately this isn't my day job so I don't get to update the thread very regularly, so perhaps it just moves to that status if I don't update it.

                         

                        I have opened a new thread in connmanctl fails to connect to enterprise wifi? where I am still trying to connect my Galileo Gen 2 board to an enterprise 802.1x wifi network.  If I manage to get it working I will certainly post my results, but no luck so far.

                         

                        Ivan

                        • 9. Re: Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?
                          mhahn

                          the ConnMan .config file documentation can be found in doc/config-format.txt and it definitely does not look like what you are haveing in your system. The config he has is the wpa_supplicant configuration file and not the connman one.

                          So you need to write a proper .config for ConnMan using some of the values he has in his wpa_supplication configuration file.


                          • 10. Re: Enterprise Wifi on Galileo using Intel Centrino Wireless-N card?
                            ivansky

                            Thanks mhahn.  I found the connman documentation on github at connman/connman.git - Connection Manager so I will follow up both avenues - I will set up one Linux distro with a wpa_supplicant file and explore that option a bit more (it hasn't worked for me previously, and I will continue to follow up on a separate distro with a connman config.  ConnMan does work very well at home, it makes it very easy.  I saw a post recently that says I need to use what I think is the older Linux distro to have a persistent sketch (see Intel® Galileo Boards and Kits — SD Card Setup and Sketch Persistent).  Since this project may be deployed somewhere that could require the board to be rebooted, I may need to use that distro which could limit my options.

                             

                            Ivan