We want connect a computer through USB with our BQ, run TCP/IP over the link, perhaps even through this to Internet, like this:
netbook ---(USB)---> BQ ---(data mobile) ---> Internet
For networking the bq supports tethering via an USB device (run the following in the terminal app):
$ android-gadget-service enable rndis
I do this after every boot from within the terminal app with a small script ~/rndis.sh:
#!/bin/shandroid-gadget-service enable rndis
The launch of the script is bound to a special key to make this easy.
This will switch the USB port from MTP to tethering and create a 'rndis0' network device whith the IP addr 10.42.0.1; The Ubuntu offers to the connected computer an IP via DHCP (somehow it takes sometime).
After this SSH is fine too as:
$ ssh [email protected]Welcome to Ubuntu Utopic Unicorn (development branch) (GNU/Linux 3.4.67 armv7l) >...
$ netstat -rnKernel IP routing tableDestination Gateway Genmask Flags MSS Window irtt Iface0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 wlan010.42.0.0 0.0.0.0 255.255.255.0 U 0 0 0 rndis0172.28.23.131 0.0.0.0 255.255.255.255 UH 0 0 0 ccmni0192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
How can I set it as default to rndis enabled?
Oliver Grawert:you cant, it is hardcoded on boot to always have working mtp (untilhere is a UI option to turn it on or off, we want regular users tolways be able to exchange files), but you can override it in a userpstart job that runs at a later point ...Create /home/phablet/.config/upstart/rndis.conf with the followingcontent:--------------- snip ------------------start on started indicator-networktaskscriptandroid-gadget-service enable rndisend script--------------- snap ----------------When the interface rndis0 is enabled, somehow HTTPS access tothe Ubuntu's app store is no longer possible; investigationg ...
Last updated: Sun Oct 18 09:23:23 CEST 2015