Beta 5 on Sourceforge breaks wifi and builtin 9 axis sensors [SOLVED]

Discussion in 'UDOO NEO' started by GeekChannel, Nov 27, 2015.

  1. GeekChannel

    GeekChannel New Member

    Joined:
    Nov 21, 2013
    Messages:
    13
    Likes Received:
    4
    Hi,

    I have downloaded from Sourceforge the image (after it was repaired to be 818MB), and after putting the image onto the SD card, I am not able to enable the wifi from the initial startup page. I was successful in doing this on beta 3 release.

    I have 2 neo (Full) units. and the problem follows the sd card image with beta 5. I have successfully imaged multiple cards with Beta 5 and all exhibit the same problem.

    Reproduce: download the beta 5 image, write to card, boot up neo, go to neo image webpage (http://eth0_ip). Perform same steps with a beta 3 image and compare. The beta 5 image for configuration shows ability to change hostname and to set a wifi password, but no SSID's are shown. Additionally the same beta5 boot image with an attached hdmi monitor does not show wifi interfaces in the Preferences-> Network Connections applet.
    The beta 5 image also does not show the sensors active (mag, gyro, motion) with the active bars that do appear and function in the beta 3 image.

    Beta 5:
    udooer@copper:~$ uname -a

    Linux copper 3.14.28-udooneo-04206-g9e7d486 #31 SMP PREEMPT Thu Nov 12 16:22:15 CET 2015 armv7l armv7l armv7l GNU/Linux

    Beta 3:
    udooer@udooneo:~$ uname -a

    Linux udooneo 3.14.28-udooneo-04196-gb15f827 #23 SMP PREEMPT Tue Oct 27 11:27:53 CET 2015 armv7l armv7l armv7l GNU/Linux

    Setup background:
    Power supplied via microUSB coming from AC powered USB3 hub (plenty of power via this interface)

    Beta 3 webpage: Working properly
    beta3-mainpage-ok.png
    Beta 5 MainPage not showing network or sensors
    beta5-mainpage.png


    Beta 5: New version of Configuration page (broken) not showing SSID's
    Beta5-configuration-broken.png

    I have also attached the syslog file from the beta 5 image. It shows some thrashing of the kernel with what I predict is the app that governs the web page. Perhaps that file will be helpful.
    Nov 27 11:35:03 copper kernel: [ 1390.757523] init: udoo-web-conf main process (4385) terminated with status 1
    Nov 27 11:35:03 copper kernel: [ 1390.757603] init: udoo-web-conf main process ended, respawning

    Let me know if I can provide more information to diagnose the root cause.
     
  2. Cyril BOSSELUT

    Cyril BOSSELUT New Member

    Joined:
    Oct 30, 2015
    Messages:
    23
    Likes Received:
    14
    Hi,
    same for me since i've updated the board to beta5. I've solved the wifi problem by editing /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf (9 axis sensor works fine):

    /etc/network/interfaces
    # Loopback network interface
    auto lo
    auto wlan0
    iface lo inet loopback

    # Primary network interface
    #auto eth0
    #iface eth0 inet dhcp

    allow-hotplug usb0
    iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.255.252

    allow-hotplug wlan0
    iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

    /etc/wpa_supplicant/wpa_supplicant.conf
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    network={
    ssid="my_network_ssid"
    psk=encoded_passphrase
    }

    You can generate the network part of wpa_supplicant.conf with the wpa_passphrase tool:
    $ sudo wpa_passphrase my_network_ssid my_passphrase > /etc/wpa_supplicant/wpa_supplicant.conf

    Hope this helps :)

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    You can find my java libraries and tools for UDOO Neo on:
    https://github.com/BOSSoNe0013/NeoJava
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
    [​IMG]
     
  3. GeekChannel

    GeekChannel New Member

    Joined:
    Nov 21, 2013
    Messages:
    13
    Likes Received:
    4
    Thanks Cyril, for the feedback. Good to know I am not the only one that ran into this. Are you seeing the kernel complaints in your syslog before and/or after the cmdline setup of the network interfaces.

    I successfully ran sudo apt-get update and sudo apt-get upgrade on one instance of beta 5 and that did not clean up the problem.
    I also tried to use the Network Connections gui panel to attempt to add the wifi interface, but that did not get very far.
    Clarifications from my first posting:
    The Hardware is OK. Clearly this is a software bug.

    I made the edits you suggested and the problem got worse, now the eth0 interface does not come up on boot. I carefully checked all the syntax for typos, and found none.
    Very strange, I am investigating further, but may not be able to get back to it for a few hours. I did compare the suggested changes with how the beta 3 images were working, and they were not using the same methods. for example:

    BETA 3: accessed via working wlan0 interface therefore wifi is working, yet no clues here.

    udooer@gallium:/etc/network$ more interfaces
    # Loopback network interface
    auto lo
    iface lo inet loopback

    # Primary network interface
    #auto eth0
    #iface eth0 inet dhcp

    allow-hotplug usb0
    iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.255.252

    IMHO, it appears that the beta 3 image is using another method.

    I then removed the comment cares for eth0 section and rebooted, which allows the eth0 interface to come up again.
    However ifconfig -a still does not show the wlan0 interface as plumbed.

    udooer@copper:~$ ifconfig -a
    eth0 Link encap:Ethernet HWaddr 00:c0:08:8c:33:fc
    inet addr:192.168.1.113 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::2c0:8ff:fe8c:33fc/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1021 errors:0 dropped:0 overruns:0 frame:0
    TX packets:732 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:165869 (165.8 KB) TX bytes:109382 (109.3 KB)

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    usb0 Link encap:Ethernet HWaddr 4e:71:9e:8c:33:fc
    inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)​

    I was really hoping that this sort of manual configuration would do the job for now, alas it seems to be a separate puzzle.
    :(
    A quick search through the syslog seems to show something to investigate:
    Jan 1 09:00:11 copper kernel: [ 11.287878] (stk) :ldisc installation timeout
    Jan 1 09:00:11 copper kernel: [ 11.292073] (stk) :ldisc_install = 0init: avahi-cups-reload main process (557) terminated with status 1
    Jan 1 09:00:11 copper wpa_supplicant[578]: nl80211: 'nl80211' generic netlink not found
    Jan 1 09:00:11 copper wpa_supplicant[578]: Failed to initialize driver 'nl80211'
    Jan 1 09:00:11 copper wpa_supplicant[578]: Could not read interface wlan0 flags: No such device
    Jan 1 09:00:11 copper wpa_supplicant[578]: WEXT: Could not set interface 'wlan0' UP
    Jan 1 09:00:11 copper wpa_supplicant[578]: Could not read interface wlan0 flags: No such device
    Jan 1 09:00:11 copper wpa_supplicant[578]: WEXT: Could not set interface 'wlan0' UP
    Jan 1 09:00:11 copper wpa_supplicant[578]: wlan0: Failed to initialize driver interface
    Jan 1 09:00:11 copper failsafe: Failsafe of 120 seconds reached.
    Jan 1 09:00:11 copper dhclient: Internet Systems Consortium DHCP Client 4.2.4
    Jan 1 09:00:11 copper dhclient: Copyright 2004-2012 Internet Systems Consortium.
    Jan 1 09:00:11 copper dhclient: All rights reserved.
    Jan 1 09:00:11 copper dhclient: For info, please visit https://www.isc.org/software/dhcp/
    Jan 1 09:00:11 copper dhclient:
    Jan 1 09:00:12 copper dhclient: Error getting hardware address for "wlan0": No such device
    More to follow later....
     
  4. Cyril BOSSELUT

    Cyril BOSSELUT New Member

    Joined:
    Oct 30, 2015
    Messages:
    23
    Likes Received:
    14
    It seems that your device driver is not loaded. Have you a phy0 device listed in this command output :
    iw list

    Try running this and hard reboot your board (don't use linux command reboot):
    iw phy phy0 interface add wlan0 type station
     
  5. Al3Co

    Al3Co New Member

    Joined:
    Nov 26, 2015
    Messages:
    4
    Likes Received:
    0
    I just wrote this on other post... hope it helps you.
    http://www.udoo.org/forum/threads/cant-connect-to-wifi-direct-p2p-using-wpa_supplicant.3047/

    Try doing this:
    on $ sudo nano /etc/network/interfaces
    # Loopback network interface
    auto lo
    iface lo inet loopback
    # Primary network interface
    #auto eth0
    #iface eth0 inet dhcp
    #auto wlan0
    #allow-hotplug wlan0
    #iface wlan0 inet manual
    #wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet static
    address 192.168.42.22
    netmask 255.255.255.0
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    #iface default inet dhcp
    allow-hotplug usb0
    iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.255.252


    on $ sudo nano /etc/gai.cong
    uncomment line 54 +/-:
    precedence ::ffff:0:0/96 100


    on $sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    #network 1
    network={
    ssid="POSGRADOTEC"
    key_mgmt=NONE
    wep_key0=3063743338
    priority=50
    }
    #network 2
    network={
    ssid="BebopDrone-L017881"
    key_mgmt=NONE
    priority=100
    }
    #network 3
    network={
    ssid="InterCable20367581"
    key_mgmt=NONE
    wep_key0=mbcd165289d0a
    wep_key0=6d626364313635323839643061
    priority=50
    }


    sudo nano /etc/host
    clear all, less the first line
     
  6. Cyril BOSSELUT

    Cyril BOSSELUT New Member

    Joined:
    Oct 30, 2015
    Messages:
    23
    Likes Received:
    14
    That's the thing i've also done and forget to mention in my previous posts.
    Note: there's a typo, it's /etc/gai.conf and not /etc/gai.cong ;)
     
  7. GeekChannel

    GeekChannel New Member

    Joined:
    Nov 21, 2013
    Messages:
    13
    Likes Received:
    4
    Hi,

    thanks for comments. I fail to see why gai.conf between beta 3 and beta 5 would make such a significant impact.
    AI3CO-> Are you suggesting by your comment that it is required to set up a static IP to make the wifi work? The inconsistency between the supplicant file use and a static IP is confusing to me. That interfaces file included inline is very messy, so it's hard to notice what line would be significantly different than what Cyril pointed out in his first post response to my note. Not meaning to be overly critical, no offense meant.. :)

    Cyril -> The iw list command returned nothing.
    A hard power cycle seems odd to be required, but I gave it a try. No change.

    FYI-> The boot/reboot times for beta 5 are >3x longer than for beta 3.

    This is going from annoying to painful now. After the gai.conf touch, i am seeing all IPV6 addresses (ping, ssh etc). While that is working over the eth0 interface, nothing has woken up ifconfig to recognize wlan0 as a valid interface.
    Other issues:
    Beta 3 -> top shows a load avg of 0.01
    Beta 5 -> top shows a load avg of 0.48
    Clearly the
    I am really sad that I tried to get bluetooth working, and thus trying this beta 5 image.
    I had started with beta 3 and done an apt-get update && upgrade and that knocked me to a device that no longer responded on the network (I may have to go back now and debug why update/upgrade fails.

    I found the problem with the sensor web page, there is a /var/log/udoo-web-conf.log file to look at.

    Cannot Enable Magnetometer: Error: Command failed: /bin/sh -c echo 1 > /sys/class/misc/FreescaleMagnetometer/enable
    /bin/sh: 1: cannot create /sys/class/misc/FreescaleMagnetometer/enable: Directory nonexistent

    Cannot Enable Accelerometer: Error: Command failed: /bin/sh -c echo 1 > /sys/class/misc/FreescaleAccelerometer/enable
    /bin/sh: 1: cannot create /sys/class/misc/FreescaleAccelerometer/enable: Directory nonexistent

    Cannot Enable Gyroscope: Error: Command failed: /bin/sh -c echo 1 > /sys/class/misc/FreescaleGyroscope/enable
    /bin/sh: 1: cannot create /sys/class/misc/FreescaleGyroscope/enable: Directory nonexistent​
    It cannot create write to the /sys/fs/cgroup mountpoint, it's full with a size of 4k bytes.
    This is a strange mount to me...Perhaps it's some new thing
    root@copper:/sys/class/misc# df -k .
    Filesystem 1K-blocks Used Available Use% Mounted on
    sysfs 0 0 0 - /sys
    root@copper:/sys/class/misc# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mmcblk0p2 30G 2.3G 26G 9% /
    devtmpfs 80M 4.0K 80M 1% /dev
    none 4.0K 0 4.0K 0% /sys/fs/cgroup
    none 48M 264K 48M 1% /run
    none 5.0M 0 5.0M 0% /run/lock
    none 240M 0 240M 0% /run/shm
    none 100M 16K 100M 1% /run/user
    /dev/mmcblk0p1 32M 19M 14M 59% /boot​
    Chasing this further:
    Beta 3:->
    udooer@gallium:/sys/devices/virtual/misc$ ls -l
    total 0
    drwxr-xr-x 3 root root 0 Jan 1 1970 autofs/
    drwxr-xr-x 3 root root 0 Jan 1 1970 cpu_dma_latency/
    drwxr-xr-x 3 root root 0 Jan 1 1970 FreescaleAccelerometer/
    drwxr-xr-x 3 root root 0 Jan 1 1970 FreescaleGyroscope/
    drwxr-xr-x 3 root root 0 Jan 1 1970 FreescaleMagnetometer/
    drwxr-xr-x 3 root root 0 Jan 1 1970 fuse/
    drwxr-xr-x 3 root root 0 Jan 1 1970 loop-control/
    drwxr-xr-x 3 root root 0 Jan 1 1970 mxc_asrc/
    drwxr-xr-x 3 root root 0 Jan 1 1970 network_latency/
    drwxr-xr-x 3 root root 0 Jan 1 1970 network_throughput/
    drwxr-xr-x 3 root root 0 Jan 1 1970 pxp_device/
    drwxr-xr-x 3 root root 0 Jan 1 1970 rfkill/
    drwxr-xr-x 3 root root 0 Jan 1 1970 ubi_ctrl/
    drwxr-xr-x 3 root root 0 Jan 1 1970 uinput/
    drwxr-xr-x 3 root root 0 Jan 1 1970 utp/

    udooer@gallium:/sys/devices/virtual/misc$ cd FreescaleAccelerometer/
    udooer@gallium:/sys/devices/virtual/misc/FreescaleAccelerometer$ ls -l
    total 0
    -rw-rw-rw- 1 root root 4096 Nov 28 07:17 data
    -r--r--r-- 1 root root 4096 Nov 28 07:17 dev
    -rw-rw-rw- 1 root root 4096 Nov 28 07:17 enable
    -rw-rw-rw- 1 root root 4096 Nov 28 07:17 motion_detect
    -rw-rw-rw- 1 root root 4096 Nov 28 07:17 poll_delay
    -rw-rw-rw- 1 root root 4096 Nov 28 07:17 position
    drwxr-xr-x 2 root root 0 Jan 1 1970 power/
    lrwxrwxrwx 1 root root 0 Nov 28 07:17 subsystem -> ../../../../class/misc/
    -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent​

    On the Beta 5 installed image :->
    root@copper:/sys/class/misc# ls -l
    total 0
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 autofs -> ../../devices/virtual/misc/autofs
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 cpu_dma_latency -> ../../devices/virtual/misc/cpu_dma_latency
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 fuse -> ../../devices/virtual/misc/fuse
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 loop-control -> ../../devices/virtual/misc/loop-control
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 mxc_asrc -> ../../devices/virtual/misc/mxc_asrc
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 network_latency -> ../../devices/virtual/misc/network_latency
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 network_throughput -> ../../devices/virtual/misc/network_throughput
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 pxp_device -> ../../devices/virtual/misc/pxp_device
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 rfkill -> ../../devices/virtual/misc/rfkill
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 ubi_ctrl -> ../../devices/virtual/misc/ubi_ctrl
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 uinput -> ../../devices/virtual/misc/uinput
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 utp -> ../../devices/virtual/misc/utp
    lrwxrwxrwx 1 root root 0 Nov 28 07:15 watchdog -> ../../devices/soc0/soc.0/2000000.aips-bus/20bc000.wdog/misc/watchdog
    root@copper:/sys/class/misc# cd ../../devices/virtual/misc/
    autofs/ loop-control/ network_throughput/ ubi_ctrl/
    cpu_dma_latency/ mxc_asrc/ pxp_device/ uinput/
    fuse/ network_latency/ rfkill/ utp/
    root@copper:/sys/class/misc# cd ../../devices/virtual/misc/
    root@copper:/sys/devices/virtual/misc# ls -l
    total 0
    drwxr-xr-x 3 root root 0 Nov 28 07:07 autofs
    drwxr-xr-x 3 root root 0 Nov 28 07:07 cpu_dma_latency
    drwxr-xr-x 3 root root 0 Nov 28 07:07 fuse
    drwxr-xr-x 3 root root 0 Nov 28 07:07 loop-control
    drwxr-xr-x 3 root root 0 Nov 28 07:07 mxc_asrc
    drwxr-xr-x 3 root root 0 Nov 28 07:07 network_latency
    drwxr-xr-x 3 root root 0 Nov 28 07:07 network_throughput
    drwxr-xr-x 3 root root 0 Nov 28 07:07 pxp_device
    drwxr-xr-x 3 root root 0 Nov 28 07:07 rfkill
    drwxr-xr-x 3 root root 0 Nov 28 07:07 ubi_ctrl
    drwxr-xr-x 3 root root 0 Nov 28 07:07 uinput
    drwxr-xr-x 3 root root 0 Nov 28 07:07 utp
    root@copper:/sys/devices/virtual/misc#​

    Since the mount point of 4k is the same size and full on both beta3 and beta5, it leaves me with a dilemma on how to fix it. [EDIT-> /sys/class comes from kernel so traditional mknod/mkdir in this filesystem will not work]
    a.) mount another subfilesystem to add more space (theoretically simple, but it's a udoo device so no way to predict accurately) [EDIT-> Invalid theory]
    b.) be concerned that the source image of 818 mb is corrupt (try to download from EU server instead of sourceforge)
    c.) perhaps beta 5 image lacks these components and is ONLY intended to work on a BASIC version of the board. (conclusion-> I missed the fine print somewhere)
    d.) the SD card I am using is acting erratically. I recall in past with raspberry pi2 and windows IOT10 that some "good quality" larger Class-10 SD cards simply acted badly, whereas smaller 8GB class 10 cards did work well.

    I am going to pause this post while I do some more digging and in hopes these notes can be compared..

    :(
     
    Last edited: Nov 27, 2015
  8. GeekChannel

    GeekChannel New Member

    Joined:
    Nov 21, 2013
    Messages:
    13
    Likes Received:
    4
    sourceforge-beta5-basic.png Ok I may have found part of the problem. The sourceforge version may be a neo_basic version..... The downloads page at udoo does not make the basic distinction. To me it looked like beta5 was for a full neo, this would explain the sensor issues.


    The sourceforge version unzips to a filename of UDOObuntu_neo_basic_v2.0beta5.img
    The EU server version unzips to a filename of UDOObuntu_neo_v2.0beta5.img

    I hope this resolves part of the problem, will post an edit after I have finished writing the EU image to a card and tried it out.
     
    Last edited: Nov 27, 2015
  9. GeekChannel

    GeekChannel New Member

    Joined:
    Nov 21, 2013
    Messages:
    13
    Likes Received:
    4
    PROBLEM SOLVED !!!!

    The beta5 image from the EU Server is fully working as expected.
    Sensors on web page working, wlan0 is instantiated, the configuration web start page works as it did before on beta3 at first glance....
    o_O

    My theory is that the beta5 image with ...neo_basic... in the filename is a significant and important clue. Additionally putting a basic image onto a full board seems to exhibit problems.....

    Hopefully the udoo crew will consider putting both versions on both servers to maximize user benefit and perhaps this overly long thread will save someone else the head aches... Thanks for those that pitched in to help diagnose the problem.
     
    Last edited: Nov 27, 2015
  10. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240

Share This Page