RNDIS Fixed IP Address and SSH


I’m trying - but failing - to assign my TK1 a fixed IP address for the RNDIS interface.

Firstly, when I enable the RNDIS gadget and connect it to a Windows machine:

echo rndis > /sys/class/android_usb/android0/functions
echo 1 > /sys/class/android_usb/android0/enable

It gets assigned a 169.254.x.x fallback address.

What I would ideally like is for the TK1 to assign itself a static IP address.

Having attempted to update the /etc/network/interfaces file with the following configuration:

iface rndis0 inet static

Upon reboot, nothing seems to change and the fallback address continues to be used.

Also what I’m trying to achieve is SSH access via the RNDIS interface. Unfortunately if I attempt to connect PuTTY (for example) to the fallback IP address on port 22, connections are always refused.

There is probably a very simple and obvious solution to both the above.

I have no knowledge of RNDIS, but I wonder if the device may still respond to “ifconfig”? Does hte device show up under ifconfig? If so, perhaps you can test address assignment there…failures might show something useful in logs (“dmesg --follow”).

Thanks for your response. The “rndis0” device appears in “ifconfig” but it won’t allow me to re-assign its IP address. So “ifconfig rndis0” has no effect.

Unfortunately I don’t know enough about RNDIS to help. I did see a URL related to the topic which might help (there could be additional customization required for the specific case of Tegra, but mostly this should apply):