5

I have a USB dongle that uses ethernet over USB to act as a network adapter. On Ubuntu it makes use of the usbnet driver and as soon as I plug the dongle in, the OS recognizes it and gets a new network interface. However, on Android Things it only get recognized as a USB device.

I installed busybox and tried using modprobe to activate g_ether or usbnet but modprobe complains that /lib/modules doesn't exist. Furthermore, I tried using the lsmod command to find out which drivers are active but lsmod doesn't work either because /proc/modules doesn't exist.

I have located the directories /sys/module/usb_f_rndis and /sys/bus/usb/drivers/cdc_ether which leads me to believe that it should be possible to somehow activate the ethernet over USB functionality.

Does anyone have any experience working with ethernet over USB on Android Things? Can anyone guide me through the process of activating the necessary drivers to make this work? Do I have to rebuild the kernel? Thank you for any advice you can offer.

itzmebibin
  • 9,199
  • 8
  • 48
  • 62
David Piskula
  • 75
  • 1
  • 6

1 Answers1

2

Seems You can't do it now: only when support of USB<->Ethernet devices will be implemented in Android Things or the source code of Android Things becomes available (then You can add Your USB driver support manually as You wrote).

Andrii Omelchenko
  • 13,183
  • 12
  • 43
  • 79
  • 2
    That's what I was afraid of. I do wonder what `/sys/module/usb_f_rndis` and `/sys/bus/usb/drivers/cdc_ether` are there for then. Are they there just so the OS is ready in case they decide to add support in the future? Anyway, thank You for Your quick answer. – David Piskula Aug 14 '17 at 12:11
  • @DavidPiskula Any chance you were able to do this? I'm having the same problem. – mozcelikors Apr 19 '19 at 08:35
  • 1
    @mozcelikors No, I'm sorry but I don't think it's possible. I ended up using a software for the dongle that enabled me to control it over UART. I've seen similar approaches with the LoWPAN drivers for Android Things. [Github repository with a lowpan sample](https://github.com/androidthings/sample-lowpan) – David Piskula Apr 20 '19 at 09:16