Host adaptor: connecting to device using rndis

935 views
Skip to first unread message

Graham Cobb

unread,
Oct 18, 2016, 8:20:35 AM10/18/16
to usba...@googlegroups.com
I am trying to use host mode to connect to my Jolla phone which exposes
itself for USB networking as a device using rndis. I am using the
USBarmory Debian Jessie image.

I have host mode working, but it seems the USBarmory does not recognise
the device. On my desktop Linux system there is a driver called
rndis_host.ko in kernel/drivers/net/usb. There does not seem to be such
a driver in this Debian image.

Is that my problem? If so, does anyone have this driver?

Andrea Barisani

unread,
Oct 18, 2016, 8:26:06 AM10/18/16
to USB armory, g.usb...@cobb.uk.net
The host driver is not compiled in by default in our Debian image, it is available on Arch however if you would like to try that. Otherwise you would have to re-compile your own kernel, by modifying its configuration to add the driver, following the steps at https://github.com/inversepath/usbarmory/wiki/Preparing-a-bootable-microSD-image

Cheers

Graham Cobb

unread,
Oct 18, 2016, 11:33:43 AM10/18/16
to USB armory
On 18/10/16 13:26, Andrea Barisani wrote:
> The host driver is not compiled in by default in our Debian image, it is
> available on Arch however if you would like to try that. Otherwise you
> would have to re-compile your own kernel, by modifying its configuration
> to add the driver, following the steps
> at https://github.com/inversepath/usbarmory/wiki/Preparing-a-bootable-microSD-image

OK. I did that and it works -- maybe you could think about enabling it
for future builds? After all, it would let you connect two USB armory
together!

A couple of notes for anyone else in the same position...

1) I couldn't find a config option just to build rndis_host. I had to
enable "Wireless RNDIS USB support" in xconfig.

2) I followed the instructions on the Wiki and didn't notice until later
that that builds a 4.8.1 kernel & modules and the kernel in the
usbarmory Jessie distribution is 4.7. It meant I had to copy all the
modules and replace the uImage.

Thanks for the help.

Andrea Barisani

unread,
Oct 18, 2016, 11:36:13 AM10/18/16
to USB armory, g.usb...@cobb.uk.net
On Tuesday, October 18, 2016 at 5:33:43 PM UTC+2, Graham Cobb wrote:
On 18/10/16 13:26, Andrea Barisani wrote:
> The host driver is not compiled in by default in our Debian image, it is
> available on Arch however if you would like to try that. Otherwise you
> would have to re-compile your own kernel, by modifying its configuration
> to add the driver, following the steps
> at https://github.com/inversepath/usbarmory/wiki/Preparing-a-bootable-microSD-image

OK.  I did that and it works -- maybe you could think about enabling it
for future builds? After all, it would let you connect two USB armory
together!


I already noted this down for the next update of our Debian image. Thanks!
 
A couple of notes for anyone else in the same position...

1) I couldn't find a config option just to build rndis_host.  I had to
enable "Wireless RNDIS USB support" in xconfig.

 
2) I followed the instructions on the Wiki and didn't notice until later
that that builds a 4.8.1 kernel & modules and the kernel in the
usbarmory Jessie distribution is 4.7.  It meant I had to copy all the
modules and replace the uImage.


This is normal, we tend to update the wiki more often than re-releasing the Debian image. They are not meant to be always in sync as the wiki update tends to be more up to date.

Cheers
 
Thanks for the help.

Hannes

unread,
Aug 4, 2017, 5:00:41 AM8/4/17
to USB armory, g.usb...@cobb.uk.net
Hi,

Would it be possible to share the internet connection of let's say an Android device without the USBArmory being in USB host mode and not rooting the Android device? I've just tried a test using RNDIS on the Armory and USB tethering on the device, but it seems that Android does not recognize that a USB device is connected. Does this work only when the Armory is in host mode? I am not able to find more detailed information on how USB tethering works on the Android side.

Regards

Andrea Barisani

unread,
Aug 4, 2017, 10:21:44 AM8/4/17
to USB armory, g.usb...@cobb.uk.net
On Friday, August 4, 2017 at 11:00:41 AM UTC+2, Hannes wrote:
Hi,

Would it be possible to share the internet connection of let's say an Android device without the USBArmory being in USB host mode and not rooting the Android device? I've just tried a test using RNDIS on the Armory and USB tethering on the device, but it seems that Android does not recognize that a USB device is connected. Does this work only when the Armory is in host mode? I am not able to find more detailed information on how USB tethering works on the Android side.

Regards


If you can share your Android device Internet connection with a Linux host, then you can do so with the USB armory in host mode. There is no difference between the USB armory or, let us say, a Linux laptop in that regard (other than the form factor of course).

When using the USB armory in host mode the standard RNDIS driver, used in device mode, does not apply. You need to compile and enable a different kind of driver in your USB armory kernel (e.g. https://wiki.gentoo.org/wiki/Android_USB_Tethering#Kernel_configuration).

Cheers

Hannes

unread,
Aug 7, 2017, 3:12:55 AM8/7/17
to USB armory, g.usb...@cobb.uk.net
Thanks for the link!

How about the power suppy? As a USB  host the armory must provide power (either via GPIO or via external supply from the host adaptor) to the bus. So I assume powering through an OTG cable (power coming from the Android device) does not work? At least, I can't get the connection working (using the USB host DTS file and rndis_host driver). I am not that familiar with USB on the hardware level I have to admit :)

Regards

Andrea Barisani

unread,
Aug 7, 2017, 3:42:19 AM8/7/17
to USB armory, g.usb...@cobb.uk.net
On Monday, August 7, 2017 at 9:12:55 AM UTC+2, Hannes wrote:
Thanks for the link!

How about the power suppy? As a USB  host the armory must provide power (either via GPIO or via external supply from the host adaptor) to the bus. So I assume powering through an OTG cable (power coming from the Android device) does not work? At least, I can't get the connection working (using the USB host DTS file and rndis_host driver). I am not that familiar with USB on the hardware level I have to admit :)

Regards


To use the USB armory as a host you would need the host adapter, the host adapter features a separate microUSB port specifically for being powered:


Cheers 
Reply all
Reply to author
Forward
0 new messages