Bananian

USB network adapter not working

10 3036
mabam  
Edited by mabam at Dec 06, 2016 07:15

On my Banana Pi, I'm trying to establish a second ethernet connection via a USB-Ethernet adapter (ASIX 88179 chip).

I have compiled a kernel using the Lemaker-BSP. During that process, after entering 'make linux-config', under 'Device Drivers' -> 'Network device support' -> 'USB Network Adapters', the option 'ASIX AX88xxx Based USB 2.0 Ethernet Adapters' was configured to be compiled as module.

After burning everything to the SD card and starting up the Banana Pi, I have added
'auto eth1' and 'iface eth1 inet dhcp'
to /etc/network/interface and entered 'sudo /etc/init.d/networking restart'. I received the following message:

Cannot find device "eth1"
Bind socket to interface: No such device
Failed to bring up eth1.

I checked /proc/config.gz and found 'CONFIG_USB_NET_AX8817X=m' to be present under USB Network Adapters.

Is there anything else I have to configure?

I'm on Bananian 15.04.
mabam  
The file /lib/modules/3.4.103/kernel/drivers/net/usb/asix.ko seems to be what the 'ASIX AX88xxx Based USB 2.0 Ethernet Adapters' option mentioned above creates. It containes some readable passages that only refer to the AX88172 and AX88178 chipsets.

So it seems for my AX88179 I need to compile the driver from http://www.asix.com.tw/FrootAtta ... 16.0_SOURCE.tar.bz2 .

I have my Ubuntu build environment I used for cross-compiling the kernel with the Lemaker-BSP. So I guess I have all the required files. But how do I compile the driver? Anyone who can help?

igorpec  
Edited by igorpec at Dec 06, 2016 21:09

Working in Armbian, both kernels.
https://www.armbian.com/banana-pi-pro/

  1. modprobe ax88179_178a
Copy the Code
If it's not recognized, you need to add device ID (lsusb)  ... google.

mabam  
The thing is that I want to install a2server, which only runs on Wheezy, not on Jessie. I run Bananian 15.04 which is the last release based on Wheezy.

'modprobe ax88179_178a' returned:
FATAL: Module ax88179_178a not found.

'lsusb' returned:
Bus 002 Device 002: ID 0b95:1790 ASIX Electronics Corp.

The module included with the kernel is called asix.ko. Not sure whether it works for the ax88179. At least it doesn't automatically recognize it.

Based on Google search results I have tried doing
'modprobe asix vendor=0x0b95 product=0x1790'
It returned:
ERROR: could not insert 'asix': Unknown symbol in module, or unknown parameter (see dmesg)

Then 'dmesg' returned:
asix: Unknown parameter `vendor'.

Not sure how to use modprobe for this. What googling about adding a device ID returned was all about serial devices (here and here, for example).

Am I right that I should be able to see the device ID in 'idVendor' and 'idProduct' under /sys/bus/usb/drivers/usb/usb2/ ? Is that the place where I should add it?

igorpec  
Edited by igorpec at Dec 07, 2016 06:33

Well, I just double checked - your adapter must work. This is the driver source, so check up yourself:
https://github.com/igorpecovnik/ ... -3.0-Ethernet.patch

We also provide wheezy images and we still provide updates for them, but I don't test them anymore.
http://image.armbian.com/Armbian ... _wheezy_3.4.109.zip
http://image.armbian.com/Armbian ... an_wheezy_4.2.3.zip

I don't know if those old kernels already have the driver, but current ones has it. Do apt-get update && apt-get upgrade

modprobe ax88179_178a

will work / works only on our (recent) kernel, because our kernel has the driver for it! Next step is auto loading, so adding to /etc/modules

mabam  
Edited by mabam at Dec 10, 2016 10:22

Igor, many thanks for pointing me to the right direction. I see you have patched the ax88179_178a driver into Armbian and it even builds for kernel 3.4.x. Great!

I have built an Armbian image with kernel and system as described on https://docs.armbian.com/Developer-Guide_Build-Preparation/ . I need AppleTalk which is why I had to build a custom kernel.

I have burned the image to the SD card:
dd if=./Armbian_5.24_Bananapi_Debian_wheezy_3.4.113.img of=/dev/sdb bs=4M

The Bananian system was still on the card, but with above dd command it should have been overwritten completely, right?

The thing is that when I start up the Banana Pi with the newly burned SD card, I can see its IP address by logging in to my network router. But "ssh 192.168.1.94" times out.

Any ideas?


EDIT: There were some errors in the end of the compilation process. I don't know whether that is related:
  1. Free space:
  2. [ o.k. ] Ending debootstrap process and preparing cache [ wheezy ]
  3. wheezy-ng-armhf.e8c...39e.tgz:  200MiB [47,9MiB/s] [======================] 107%
  4. [ o.k. ] Applying distribution specific tweaks for [ wheezy ]
  5. sed: can't read /root/output/cache/sdcard-default-bananapi-wheezy/etc/default/ramlog: No such file or directory
  6. [ o.k. ] Applying common tweaks
  7. sed: can't read /root/output/cache/sdcard-default-bananapi-wheezy/etc/default/console-setup: No such file or directory
  8. [ o.k. ] Installing kernel [ linux-image-sun7i ]
  9. [ o.k. ] Installing u-boot [ linux-u-boot-bananapi ]
  10. [ o.k. ] Installing headers [ linux-headers-sun7i ]
  11. [ o.k. ] Installing board support package [ bananapi ]
  12. sed: can't read /root/output/cache/sdcard-default-bananapi-wheezy/etc/lirc/hardware.conf: No such file or directory
  13. sed: can't read /root/output/cache/sdcard-default-bananapi-wheezy/etc/lirc/hardware.conf: No such file or directory
  14. sed: can't read /root/output/cache/sdcard-default-bananapi-wheezy/etc/lirc/hardware.conf: No such file or directory
  15. sed: can't read /root/output/cache/sdcard-default-bananapi-wheezy/etc/lirc/hardware.conf: No such file or directory
  16. sed: can't read /root/output/cache/sdcard-default-bananapi-wheezy/etc/lirc/hardware.conf: No such file or directory
  17. cp: cannot create regular file '/root/output/cache/sdcard-default-bananapi-wheezy/etc/lirc/lircd.conf': No such file or directory
  18. [ o.k. ] Installing extra applications and drivers
  19. [ o.k. ] Merging and packaging linux firmware [ @host ]
  20. [ o.k. ] Merging and packaging linux firmware [ @host ]
  21. [ o.k. ] Checking git sources [ armbian-firmware-full/lib/firmware master ]
  22. [ .... ] Creating local copy
  23. [ .... ] Fetching updates
  24. remote: Counting objects: 1427, done.
  25. remote: Compressing objects: 100% (974/974), done.
  26. remote: Total 1427 (delta 438), reused 1323 (delta 398)
  27. Receiving objects: 100% (1427/1427), 68.15 MiB | 1.45 MiB/s, done.
  28. Resolving deltas: 100% (438/438), done.
  29. From https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware
  30. * branch            master     -> FETCH_HEAD
  31. * [new branch]      master     -> origin/master
  32. [ .... ] Checking out
  33. [ o.k. ] Installing linux firmware [ 5.24 ]
  34. [ o.k. ] Installing additional driver [ MT7601U ]
  35. [ o.k. ] Checking git sources [ mt7601 old ]
  36. [ .... ] Creating local copy
  37. [ .... ] Fetching updates
  38. remote: Counting objects: 264, done.
  39. remote: Compressing objects: 100% (207/207), done.
  40. remote: Total 264 (delta 54), reused 255 (delta 53), pack-reused 0
  41. Receiving objects: 100% (264/264), 1.29 MiB | 913.00 KiB/s, done.
  42. Resolving deltas: 100% (54/54), done.
  43. From https://github.com/igorpecovnik/mt7601
  44. * branch            old        -> FETCH_HEAD
  45. * [new branch]      old        -> origin/old
  46. [ .... ] Checking out
  47. [ o.k. ] Installing additional driver [ RT8192 ]
  48. [ o.k. ] Checking git sources [ rt8192cu master ]
  49. [ .... ] Creating local copy
  50. [ .... ] Fetching updates
  51. remote: Counting objects: 201, done.
  52. remote: Compressing objects: 100% (177/177), done.
  53. remote: Total 201 (delta 43), reused 69 (delta 21), pack-reused 0
  54. Receiving objects: 100% (201/201), 1.17 MiB | 1.03 MiB/s, done.
  55. Resolving deltas: 100% (43/43), done.
  56. From https://github.com/dz0ny/rt8192cu
  57. * branch            master     -> FETCH_HEAD
  58. * [new branch]      master     -> origin/master
  59. [ .... ] Checking out
  60. [ o.k. ] Building deb [ armbian-tools ]
  61. [ o.k. ] ... downloading sources [ temper ]
  62. [ o.k. ] ... downloading sources [ BT utils ]
  63. [ o.k. ] ... compiling [ temper ]
  64. [ warn ] Error building [ temper ]
  65. cp: cannot stat '/root/output/cache/sdcard-default-bananapi-wheezy/root/tools/temper/src/pcsensor': No such file or directory
  66. cp: cannot stat '/root/output/cache/sdcard-default-bananapi-wheezy/root/tools/brcm/brcm_bt_reset': No such file or directory
  67. cp: cannot stat '/root/output/cache/sdcard-default-bananapi-wheezy/root/tools/brcm/brcm_patchram_plus': No such file or directory
  68. [ o.k. ] Installing [ armbian-tools-wheezy_5.24_armhf.deb ]
  69. dpkg: dependency problems prevent configuration of armbian-tools-wheezy:
  70. armbian-tools-wheezy depends on libusb-1.0-0 (>= 2:1.0.8); however:
  71.   Package libusb-1.0-0 is not installed.
  72. armbian-tools-wheezy depends on libudev1; however:
  73.   Package libudev1 is not installed.

  74. dpkg: error processing armbian-tools-wheezy (--install):
  75. dependency problems - leaving unconfigured
  76. Errors were encountered while processing:
  77. armbian-tools-wheezy
  78. [ o.k. ] Installing additional application [ USB redirector ]
  79. [ o.k. ] Calling image customization script [ customize-image.sh ]
  80. [ o.k. ] Preparing image file for rootfs [ bananapi wheezy ]
  81. [ o.k. ] Current rootfs size [ 337 MiB ]
  82. [ o.k. ] Creating blank image for rootfs [ 601 MiB ]
  83. 601MiB [98,1MiB/s] [====================================================>] 100%
  84. [ o.k. ] Creating partitions [ root: ext4 ]
  85. [ .... ] Creating rootfs [ ext4 ]
  86. [ o.k. ] Copying files to image [ sdcard-default-bananapi-wheezy.raw ]
  87.         279.36M  99%    4.21MB/s    0:01:03 (xfr#19887, to-chk=0/25839)   

  88. sent 280.85M bytes  received 404.42K bytes  4.43M bytes/sec
  89. total size is 279.54M  speedup is 0.99
  90. [ o.k. ] Copying files to /boot partition [ sdcard-default-bananapi-wheezy.raw ]
  91.           9.40M  99%   30.49MB/s    0:00:00 (xfr#47, to-chk=0/50)

  92. sent 9.41M bytes  received 921 bytes  18.81M bytes/sec
  93. total size is 9.40M  speedup is 1.00
  94. [ o.k. ] Free space: [ SD card ]
  95. /dev/loop0p1    575M  338M  214M  62% /root/output/cache/mount-default-bananapi-wheezy
  96. [ o.k. ] Writing U-boot bootloader [ /dev/loop0 ]
  97. [ o.k. ] Done building [ /root/output/images/Armbian_5.24_Bananapi_Debian_wheezy_3.4.113.img ]
  98. [ o.k. ] Runtime [ 67 min ]
Copy the Code


mabam  
Should the green "heartbeat" light also flash once Armbian has started up? It did with Bananian but it doesn't with Armbian on the SD card. Just wondering whether that means the system didn't fully boot.

And now when I log into my router, the BPi doesn't show up anymore. The green light of the network port flashes regularly, though. Maybe something wrong with the system on the card and it keeps restarting?

How can I find out what's wrong?

igorpec  
We also have hardbeat but hear hmm it looks like building Wheezy is broken. We made a lot of improvements which might not be wheezy compatible. I can't promise if we would fix those problems since no one hasn't touch it for a year. It's hard enough to have stable Jessie and Xenial. And there we need a desktop which brings yet another problems.

I think the best way it would be if you can try bringing a2server up on Jessie. This should be less complicated than fixing problems above.

mabam  
That's too bad but good to know.
Compiling Armbian Ubuntu Trusty with 3.4.113 kernel worked and is also compatible with a2server. The ax88179_178a works fine.

Many thanks!

igorpec  
Edited by igorpec at Dec 12, 2016 20:16

Nice that you manage to work this out ... we just removed Wheezy and Trusty target (at least) out from build menu, to avoid support questions, since we are unable to handle them.

https://github.com/igorpecovnik/ ... 1b74d0f79442699e12f

BTW: I think this compatibility problem might be related to systemd. You can run Jessie without it:
http://without-systemd.org/wiki/ ... ie/sid_installation

You have to log in before you can reply Login | Sign Up

Points Rules