Triffgits
Posts: 16
Joined: Mon Sep 07, 2015 7:31 pm

Pi not visible to android device.

Tue Jan 19, 2016 3:57 pm

I'm trying to use USB tethering on a raspberry pi so that I can SSH into it via USB, but the thing is that my phone wont allow you to enable usb tethering (why) unless the phone has actually detected that there is something on the other end it can tether with. I have no idea how it determines what is tetherable or not, I figured just starting ADB on the pi with USB debugging on would allow the phone to pick it up but it hasn't had any effect. The phone is a Zenfone 2. Any ideas?

The only driver I seem to be able to find is a windows driver, here: https://www.asus.com/ca-en/Phone/ZenFon ... _Download/

I've read that you can load windows wifi drivers using ndiswrapper, would it be possible to load the phone's USB drivers using that?

User avatar
topguy
Posts: 6527
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Pi not visible to android device.

Tue Jan 19, 2016 4:09 pm

Most likely there is something that happens in the windows driver that allows usb-tethering when connected to a windows machine.

Even if you got the tethering to work is no guarantee that you would be able to ssh to the Pi from the phone.

Triffgits
Posts: 16
Joined: Mon Sep 07, 2015 7:31 pm

Re: Pi not visible to android device.

Tue Jan 19, 2016 4:13 pm

Everywhere I've looked, people use tethering to SSH into it. As long as they are on the same network it should be fine. What do people think about my ndiswrapper option?

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

Re: Pi not visible to android device.

Tue Jan 19, 2016 4:13 pm

Removed as no relevance to what OP actually required :D
Last edited by fruitoftheloom on Tue Jan 19, 2016 5:27 pm, edited 1 time in total.
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

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

Re: Pi not visible to android device.

Tue Jan 19, 2016 4:17 pm

Removed as no relevance to what OP actually required :D
Last edited by fruitoftheloom on Tue Jan 19, 2016 5:27 pm, edited 1 time in total.
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

Triffgits
Posts: 16
Joined: Mon Sep 07, 2015 7:31 pm

Re: Pi not visible to android device.

Tue Jan 19, 2016 4:18 pm

fruitoftheloom wrote:Why not just connect the Android Phone and RPi wirelessly to the same Router :?: :?:
I'm taking the pi with me somewhere and there won't be a local access point, it has to be a direct connection. Normally I'd just turn the raspberry pi into an access point and connect via wifi, but I haven't got a working dongle at the moment.

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

Re: Pi not visible to android device.

Tue Jan 19, 2016 4:40 pm

Triffgits wrote:
fruitoftheloom wrote:Why not just connect the Android Phone and RPi wirelessly to the same Router :?: :?:
I'm taking the pi with me somewhere and there won't be a local access point, it has to be a direct connection. Normally I'd just turn the raspberry pi into an access point and connect via wifi, but I haven't got a working dongle at the moment.
Raspbian Wheezy http://www.nicassio.it/daniele/blog/?p=283 :?: :?:
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

drgeoff
Posts: 10831
Joined: Wed Jan 25, 2012 6:39 pm

Re: Pi not visible to android device.

Tue Jan 19, 2016 5:53 pm

Triffgits wrote:The only driver I seem to be able to find is a windows driver, here: https://www.asus.com/ca-en/Phone/ZenFon ... _Download/

I've read that you can load windows wifi drivers using ndiswrapper, would it be possible to load the phone's USB drivers using that?
If the Windows drivers are compiled for x86 architecture then ndiswrapper can only load them on an x86 computer. Which an RPi is not.
Quis custodiet ipsos custodes?

Triffgits
Posts: 16
Joined: Mon Sep 07, 2015 7:31 pm

Re: Pi not visible to android device.

Wed Jan 20, 2016 2:40 am

fruitoftheloom wrote: Raspbian Wheezy http://www.nicassio.it/daniele/blog/?p=283 :?: :?:
I'm using Jesse. The problem I'm having is that I need the raspberry pi to pick up the phone and tell the phone that the pi can see it. What I suspect is that it's some 'safety' feature built specifically into my Android ROM, courtesy of whatever Chinese programmers Asus hired to write ZenUI.
drgeoff wrote: If the Windows drivers are compiled for x86 architecture then ndiswrapper can only load them on an x86 computer. Which an RPi is not.
I'm not a software wizard, but I guess I should have given it more thought.

edit:

I'm going to try with my old galaxy s3 which is running cyanogenmod 12.1, I'll report back to see if it's specific to ZenUI.

Triffgits
Posts: 16
Joined: Mon Sep 07, 2015 7:31 pm

Re: Pi not visible to android device.

Wed Jan 20, 2016 3:45 am

So, using Cyanogenmod 12.1 on the S3, I was easily able to activate USB tethering. I followed the guide and added an interface for usb0. With the Pi plugged into the back of the router via ethernet, I was able to SSH into it while the phone was connected and ran ifconfig usb0, which gave me the address 192.168.42.41. I logged out, disconnected the Pi from the router, then tried to SSH into the phone via the USB tethered connection using that address, which successfully connected to the Pi and sent me to the ~ $ prompt.


So, to conclude, the problem I am having is just another reason to flash a new rom on my phone. The great internal debate now is whether or not to break my warranty ahead of its expiration date.

/thread adjourned

Return to “Troubleshooting”