DeprecatedReplicant60USBNetworking » History » Version 2
Wolfgang Wiedmeyer, 03/06/2017 10:32 PM
remove reverse_tether.sh (seems unmaintained and pretty intrusive on the host side)
1 | 1 | Wolfgang Wiedmeyer | h1. Replicant USB Networking |
---|---|---|---|
2 | |||
3 | 2 | Wolfgang Wiedmeyer | This page explains how to connect your Replicant device to the Internet via an USB connection to a computer connected to the Internet. |
4 | 1 | Wolfgang Wiedmeyer | |
5 | h2. Using the Replicant USB Networking scripts |
||
6 | |||
7 | Replicant USB Networking requires two scripts: attachment:replicant_usb_networking_device.sh attachment:replicant_usb_networking_host.sh |
||
8 | However, you can avoid the host part if your network manager can manage a shared connection. |
||
9 | |||
10 | Make sure to have installed [[ADB]] and to have the host daemon running as root. |
||
11 | |||
12 | Push the device part on the device and make it executable: |
||
13 | <pre> |
||
14 | adb push replicant_usb_networking_device.sh /data/ |
||
15 | adb shell chmod a+x /data/replicant_usb_networking_device.sh |
||
16 | </pre> |
||
17 | |||
18 | h3. Using a network manager shared connection |
||
19 | |||
20 | 1. On your Linux PC, in the network manager applet (where you normally set up wired or wireless network connections), create a new "Shared" "Wired" connection, with default settings (connection type = Shared). (This is independent of the device, and only needs to be created once.) |
||
21 | 2. Disconnect any other network connections (Wifi, 3G data) on the device. |
||
22 | 3. Run the first part of the device-side script: |
||
23 | <pre> |
||
24 | adb shell /data/replicant_usb_networking_device.sh start1 dhcp |
||
25 | </pre> |
||
26 | 4. The device should appear in the host's network manager applet as a new "wired" network connection. Connect this to the "Shared" connection that you created above (it should be in the list of choices given by the applet). |
||
27 | 5. Now run the second part of the script on the device: |
||
28 | <pre> |
||
29 | adb shell /data/replicant_usb_networking_device.sh start2 dhcp |
||
30 | </pre> |
||
31 | |||
32 | The connection should now work. To disconnect the device, run: |
||
33 | <pre> |
||
34 | adb shell /data/replicant_usb_networking_device.sh stop |
||
35 | </pre> |
||
36 | |||
37 | h3. Using the host script |
||
38 | |||
39 | 1. Disconnect any other network connections (Wifi, 3G data) on the device. |
||
40 | 2. Run the first part of the device-side script: |
||
41 | <pre> |
||
42 | adb shell /data/replicant_usb_networking_device.sh start1 static |
||
43 | </pre> |
||
44 | 3. Wait for the interface to show up |
||
45 | 4. Configure the device interface: |
||
46 | <pre> |
||
47 | adb shell /data/replicant_usb_networking_device.sh start2 static |
||
48 | </pre> |
||
49 | 5. Configure the host interface: |
||
50 | <pre> |
||
51 | sudo ./replicant_usb_networking_host.sh start |
||
52 | </pre> |
||
53 | |||
54 | The connection should now work. To disconnect the device, run: |
||
55 | <pre> |
||
56 | adb shell /data/replicant_usb_networking_device.sh stop |
||
57 | </pre> |
||
58 | Cleanup the host: |
||
59 | <pre> |
||
60 | sudo ./replicant_usb_networking_host.sh stop |
||
61 | </pre> |