3

I have just installed archlinux on my new raspberry but the only way I have to connect it to internet is using the USB tethering of my Android phone.

With my PC it works straightforwardly: I just connect the phone with USB, I select the USB tethering option on the phone and all works. But when I do the same on the raspberry I have no connection.

Googleing my problem I found this: http://xsatria.wordpress.com/2013/07/09/usb-tethering-from-android-to-raspberry-pi/ but I have not the file /etc/network/interfaces..

  • Arch uses netctl to manage different network profiles. Did you install netctl? It will have differnet templates for connections(wifi,ethernet etc..) in the /etc/netctl/examples folder. Use one that is suitable for you. – feverDream Dec 20 '13 at 18:25
  • 1
    You need to use PPoA over USB to enable such kind of tethering. You need to set it up to dial into your phone using *9*1# or something like that.(But you might need extra init strings to tell the phone what you are doing and what settings the phone needs to use). It can be tricky to set up on Linux. Or you can use internet sharing option on Windows for this device to act like a gateway. Luckily Microsoft nailed that pretty well with PNP and right click options. – Piotr Kula Mar 21 '14 at 21:10
1

Sounds like you just need to activate DHCP on the USB port. There is a guide here. Given the guide and your question, it looks like you just need to run (as # or sudo):

systemctl start dhcpcd@usb0.service

And if it works and you want it to happen on boot for now on, do (also as # or sudo):

systemctl enable dhcpcd@usb0.service.

1

Refer to arch-linux netctl-page. I am pasting an example netctl config file for a usb-tethered connection from the same page.

This would be present in the /etc/netctl folder and you can call it whatever you want.

Description='A basic dhcp Android tethering'
Interface=usb0
Connection=ethernet
IP=dhcp

One thing you have to remember is that the interface names vary with removable devices, so check what your usb device is called by using the ip addr command.

You can have different profiles for different connections. wifi, ethernet you name it. To list all the active profiles, use netctl list to start/stop the connection, use netctl start/stop profile-name and if you want to start the connection at boot, netctl enable profile-name.

0

If you want to test this on Raspbian:

sudo service NetworkManager stop
ip link | grep usb

You should get some output from the last one, probably regarding usb0. If not, the phone is not configured to share a connection. If so:

sudo ip link usb0 set up
sudo dhclient -v usb0

You should see a DHCP lease get negotiated and an IP address assigned. You are now online.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.