ryanmission
Posts: 1
Joined: Thu Sep 12, 2013 3:47 am

Raspbian + Android Phone + USB Tether

Thu Sep 12, 2013 4:32 am

Hey, I have a Samsung Galaxy S4 and im trying to connect it to my Raspberry Pi.

When i connect the two, the phone will start charging, but it is not detected as a USB device (ie. cant enable USB tether, "no USB device connected"). I have tried following a few internet links / articles / threads regarding this, but it seems like most people just plug it in and it's detected.

I have installed some packages to try and get this to work:
----------------------------------------------------------------------------------------------------------
ifuse
ipheth-utils
libimobiledevice-utils
gvfs
gvfs-backends
gvfs-bin
gvfs-fuse

Unfortunately, from what i have read these seem to be for iPhone devices, and not android. I seen a LifeHacker article that said this should work for Android as well, but as mentioned...but Pi doesnt detect my phone or visa versa.

I have tried various configuration changes as outlined in some of the articles:
----------------------------------------------------------------------------------------------------------
Edited:
/etc/network/interfaces

to add:
iface usb0 inet dhcp

ifconfig just displays the loopback and eth0. Alternatively I have tried changing the config to iface eth1 inet dhcp instead of usb0 but this did nothing. Also tried adding allow-hotplug usb0 and eth1, and again - nothing.

Running ifup eth1 or usb0 just presents me with an error stating that the device is not detected (or something along those lines).

Some of the articles I have followed / reviewed:
-----------------------------------------------------
http://www.daveconroy.com/how-to-tether ... -iphone-5/
http://www.youtube.com/watch?v=3szWUHEOdac
http://xsatria.wordpress.com/2013/07/09 ... pberry-pi/

As mentioned, I dont think my Pi is detecting my phone properly, or perhaps not being mounted? Not too sure..

Thanks

Yatsehitter
Posts: 7
Joined: Mon Jun 16, 2014 4:57 pm

Re: Raspbian + Android Phone + USB Tether

Thu Jun 19, 2014 8:57 pm

Hi mate,

Did you ever get this working. I have an identical setup to you and all the same issues.

Cheers

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Raspbian + Android Phone + USB Tether

Thu Jun 19, 2014 9:05 pm

Are there any noteworthy entries in dmesg logs when connecting your phone??

Richard S.
Last edited by redhawk on Thu Jun 19, 2014 10:00 pm, edited 1 time in total.

plugwash
Forum Moderator
Forum Moderator
Posts: 3614
Joined: Wed Dec 28, 2011 11:45 pm

Re: Raspbian + Android Phone + USB Tether

Thu Jun 19, 2014 9:58 pm

I know on my htc phone if I set the USB connection type to "USB tethering" and the USB tethering type to windows then the Pi picks it up as a network adaptor USB0 which I can then pick up an IP on.

What exactly is happing? is the "no USB device connected" message coming from the phone? Have you tried using a powered hub?

mk-fg
Posts: 3
Joined: Sun Aug 10, 2014 11:00 am

Re: Raspbian + Android Phone + USB Tether

Sun Aug 10, 2014 12:31 pm

Stumbled upon this thread from google, have same thing with RPi Model B and Samsung Galaxy S4 phone.

dmesg on RPi says nothing upon plugging it in, and Android doesn't show usb logo in the screen corner (and doesn't recognize that it's plugged into computer), but shows that it's charging.
It's not really charging though (battery seem to only go down), but not sure if maybe it's due to enabled screen on full brightness or such.

Given such silent failure from software, I've tried plugging the phone through powered usb hub, and RPi detects the hub just fine (dmesg, lsusb), same for usb flash drives plugged into it, but not the phone - same lack of any response from software.
Phone charges from the hub itself and TP2-TP1 voltage looks ok (4.88V), so guess it's unlikely to be related to power drain of the phone.

I'm not using Raspbian, but rather Arch Linux ARM.

Never had to debug any usb-related issues where kernel doesn't show anything at all, so any advice on what to look at or try is appreciated.
Also, is it likely to be a software issue, or lack of output from kernel usually indicates that it's hardware that fails some negotiation process?
SGS4 phone has OTG port, and RPi's Model B controller seem to be OTG (though behind integrated hub), so I wonder if something should be set explicitly to make these behave one way (Host/Peripheral) or the other.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Raspbian + Android Phone + USB Tether

Sun Aug 10, 2014 1:55 pm

Phone settings need to be changed in the Settings menu, not all Phone Providers Unlock Tethering or Mass Storage Setting.

This also applies to Bluetooth Tethering !
Last edited by fruitoftheloom on Sun Aug 10, 2014 4:48 pm, edited 1 time in total.
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

mk-fg
Posts: 3
Joined: Sun Aug 10, 2014 11:00 am

Re: Raspbian + Android Phone + USB Tether

Sun Aug 10, 2014 4:32 pm

fruitoftheloom wrote:Phone settings need to be changed in the Settings menu, not all Phone Providers Unlock Tethering or Mass Storage Setting.
First:
When connected by cable to RPi, I go to "Settings", "More Networks", "Tethering and portable hotspot" and under "USB tethering" it says "No USB device connected", so tethering options are grayed-out and unavailable.
As I wrote above - phone doesn't see usb host and vice-versa, so should these tethering options be enabled without that?
Or maybe you mean tethering options somewhere else?

Second:
I don't actually care about tethering at all, I don't need it ;)
I want to connect custom phone app to app on RPi over Android Open Accessory protocol, which is kinda simple streaming protocol over two half-duplex endpoints.
It works perfectly fine when I connect phone to my desktop linux machine - it sees device as SGS4 instantly (with lines in dmesg and all that), and can switch it into AOA mode (via special set of USB control messages).
I never even looked at tethering settings, should they matter in this case?

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Raspbian + Android Phone + USB Tether

Sun Aug 10, 2014 4:53 pm

mk-fg wrote: I never even looked at tethering settings, should they matter in this case?
Well that is what the Original Poster was queerying ""Raspbian + Android Phone + USB Tether"" so I assumed that your issue was the same, obviously not !!
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

mk-fg
Posts: 3
Joined: Sun Aug 10, 2014 11:00 am

Re: Raspbian + Android Phone + USB Tether

Sun Aug 10, 2014 4:57 pm

fruitoftheloom wrote:Well that is what the Original Poster was queerying ""Raspbian + Android Phone + USB Tether"" so I assumed that your issue was the same, obviously not !!
Ah, yes, indeed, my bad.

I managed to ignore that part, but symptoms seem to be quite the same, to quote the op:
ryanmission wrote:When i connect the two, the phone will start charging, but it is not detected as a USB device (ie. cant enable USB tether, "no USB device connected").
So I guess they meant the same tethering setting I found, and alas, it was apparently disabled in a similar fashion.

Return to “Raspberry Pi OS”