GSOC internet connection - mdubinko/gsoc-contrib GitHub Wiki
Connect your GSOC to the internet as follows. (Prerequisite: shell access)
WARNING: The stock firmware and configuration is likely not hardened for internet access, so if you follow these steps, be sure you are behind a high-quality firewall. Like everything in this project, you proceed at your own risk.
Hat tip to http://redtreerobotics.com/ip-over-bluetooth-with-linux where it is pretty much spelled out for Bluetooth. Replace all instances of 'robot' with GSOC.
Bluetooth
You need one of the supported bluetooth adapters plugged in to the USB port and initialized.
hciconfig hci0 up
bluetoothctl
This will open its own mini shell
pairing on
scan on
A bunch of things will scroll by. One should be a phone in hotspot mode, or a similarly-configured PC. Take note of the address that will look like 12:34:56:AB:CD:EF. Substitute in your actual address in the commands below.
scan off
devices
you should the address noted above
agent on
pair 12:34:56:AB:CD:EF
Your other device will do the usual prompting for bluetooth pairing. Do whatever it says to pair.
trust 12:34:56:AB:CD:EF
connect 12:34:56:AB:CD:EF
exit
At this point, your other device should show "Connected" or something to that effect for GSOC BT.
hciconfig hci0 up
/usr/lib/bluez/test/test-network 12:34:56:AB:CD:EF nap
Not sure if this test is strictly necessary, but it should work. I had trouble Ctrl+C killing it.
dhclient bnep0
ping 8.8.8.8
Wifi
Reported success with the following USB adapters
- Adafruit USB Wifi (802.11b/g/n) Module. Ourlink branded; "RTl8192cu Chipset" (sic) https://www.adafruit.com/product/1012 Device ID: 0bda:8176
- tp-link TL-WN821N
/etc/network/interfaces should be: (this is just the part to add. Keep the existing lo: stuff)
iface wlan0 inet dhcp
allow-hotplug wlan0
pre-up wpa_supplicant -B -Dwext -i wlan0 -c /etc/wifi.conf
post-down killall -q wpa_supplicant
Plug it in. Check dmesg for usbcore messages and drivers getting loaded, such as rtl8192cu
wlan0 will appear in ifconfig
/etc/wifi_auto_connect.sh will run to completion. (I created my own hotspot with the SSID and password mentioned in /etc/wifi.conf, but changing that file to your local settings should work too.)
Commands like ping now 100% work. It shows up on my network as 'gsoc'.
Be very careful with this if you don't 100% trust your firewall. The current firmware is likely NOT hardened for internet access.