Using USB Tethering on FreeBSD with Android

Last modified: 2021/10/12

back


The Intel Centrino Advanced-N 6205 WiFi chipset can be found in the Lenovo X230 series and other laptops. The iwn(4) driver covers the chipset on FreeBSD. Connecting to a WiFi network should not be a problem but unfortunately, the performance, at least on older FreeBSD versions, is rather poor, especially when using the 5 GHz channels. The signal may be improved when IEEE 802.11n is disabled:

# ifconfig wlan0 -ht

Otherwise, an Android-based mobile phone can act as a gateway to a WiFi network, by using USB tethering. The urndis(4) driver has to be loaded for Android-based smartphones:

# kldload if_urndis

Add the kernel module to /etc/rc.conf in order to load the driver at boot time:

kld_list+="if_urndis"

Connect the phone to the Laptop using a (real) USB cable. Make sure that WiFi and USB tethering are enabled on the phone. A new network interface ue0 will be created once the device is connected:

# ifconfig
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether XX:XX:XX:XX:XX:XX
        hwaddr XX:XX:XX:XX:XX:XX

Enable the interface, and obtain an IP address through DHCP:

# ifconfig ue0 up
# dhclient ue0

The laptop should be connected to the WiFi now.


Valid XHTML 1.0 Valid CSS