# USB networking: tethering

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/sh
android-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 phablet@10.42.0.1
Welcome to Ubuntu Utopic Unicorn (development branch) (GNU/Linux 3.4.67 armv7l) > 
...
```

```
$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.2.1     0.0.0.0         UG        0 0          0 wlan0
10.42.0.0       0.0.0.0         255.255.255.0   U         0 0          0 rndis0
172.28.23.131   0.0.0.0         255.255.255.255 UH        0 0          0 ccmni0
192.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 (until
here is a UI option to turn it on or off, we want regular users to
lways be able to exchange files), but you can override it in a user
pstart job that runs at a later point ...

Create /home/phablet/.config/upstart/rndis.conf with the following
content:

--------------- snip ------------------
start on started indicator-network

task

script
    android-gadget-service enable rndis
end script

--------------- snap ----------------

When the interface rndis0 is enabled, somehow HTTPS access to
the Ubuntu's app store is no longer possible; investigationg ...
```

Last updated: Sun Oct 18 09:23:23 CEST 2015


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guru-1.gitbook.io/bq-aquaris-e-4-5-ubuntu-phone/en/chapter4.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
