mung
Posts: 506
Joined: Fri Nov 18, 2011 10:49 am

Using pi with android devices anyone have experience?

Fri Dec 12, 2014 1:51 pm

I have had the same phone for 10 years and never used smart phones before but finally took the plunge with no experience as I saw something that looked like a huge bargain. So I took delivery yesterday of an android dualcore A7 with 1Gb 800x480 screen 5mp cam android 4.2 for 40 pounds including a 32Gb san disk SD, I won't say what phone or where I got it but most high street stores are similar price and I got 10 off with a voucher code I found on the net. I have only got as far as adding a gmail account and browsing the web and am wondering what apps to install?.

Has anyone any advice on integrating android phone and pi?.

I am thinking of using it as a display initially (vnc, rdesktop, X terminal?) has anyone tried this what is best app to use?

Next I will probably get python and have some remote IP control of the pi using network connections from python, anyone has tried such things before?.

Finally I will maybe try rooting the phone and getting an android development environment on a pc to create some android apps (possibly implement pi3d on android though that maybe pushing a pipe dream too far as I am quite busy).

I will probably try google search and post my research back here, but though I would ask here first just incase there are any expert with advice for a newbie in android and pi intergration.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Using pi with android devices anyone have experience?

Fri Dec 12, 2014 2:20 pm

I use my android phone or tablet to browse the webserver on my Pi, with PHP code to turn GPIO's on or off.
Right next to me (on my desk at work) is a B+ with a L298N being misused to drive 80 LEDs from a 4.5v battery box (3xAA).

I bought two strings of 40 LEDs (one white, one blue) and cut each string in half then wired up one blue string and one white string to each direction of the L298N. Whenever I have a few minutes free I have been playing with my code to see if I can get the PHP script to flash the LEDs on and off (it's not working terribly well but I haven't put much time into it).

I use my android tablet for writing to the pi but I think the following would work on a phone too.
I am writing the PHP script in Turbo Client and sending it across by VSFTP (details of my setup can be found here).

I also have ConnectBot installed for SSH communication but I very rarely use it.
Doug.
Building Management Systems Engineer.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5643
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Using pi with android devices anyone have experience?

Fri Dec 12, 2014 2:25 pm

FWIW, I acquired a "fairly basic" 7" tablet a few weeks ago. I've not yet used it "in anger" (ie. just preliminary "tryouts") but, partially on the suggestions of other forum posters have tried these apps.:
AndFTP, Fing, JuiceSSH and Wifi Analyzer. Fing & Wifi Analyzer are good network tools (thanks D.L. & RaTTus). I did try a VNC client but found it awkward with the small, albeit HDMI res. screen. The FTP and SSH tools worked fine, but there are quite a few "out" there so you may find another that suits you better.
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

mung
Posts: 506
Joined: Fri Nov 18, 2011 10:49 am

Re: Using pi with android devices anyone have experience?

Sat Dec 13, 2014 12:20 pm

I had a quick play with the new phone last night and discovers lots of problems, no decent easy setup seems available.

I tried 3 different ssh before I found one that handles keysyms correctly and gave reasonable terminal emulations (juicessh, though its a commercial limited product :( )

After sorting ssh I found XServer XSDL and in ssh shell set the DISPLAY environment so I could test out some X apps (export DISPLAY=androidphoneipaddress:0 )
I tried lxterminal(seemed to work okay), openbox (no display and complaints of no xinerama support), and pcmanfm (works but icons are not shown).

I get the feeling gnome apps totally ruin remote X ability with pixmaps, so probably best apps to use are Xaw and motif widget based apps? If anyone knows anything about getting decent display of gnome/gtk apps remotely please let me know.

I found that X on a small sc reen really sucks, but really I think its just another way to access the pi and get a custom designed app running that is suitable for use on a small phone screen. Of course X does allow almost total control of the pi, but typing commands on a phone really really sucks :lol:

I maybe will hack about some of my old xaw apps to get them looking nice on a tiny 800x480res X server if I cannot find anything that displays well on the phone.

Don't know what I will be looking at next, I am almost thinking of putting some effort into pi3d on android, but I have to wait until I get a new laptop before I look at that.

I am a little disappointed by the phone, but maybe the problem is really with the modern X widget sets ruining remote display and X protocol capability?

User avatar
default_user8
Posts: 680
Joined: Mon Nov 18, 2013 3:11 am

Re: Using pi with android devices anyone have experience?

Sat Dec 13, 2014 12:33 pm

VX Connectbot, RasPi Check, and VNC Viewer are the 3 apps i use with my RasPi. For some reason the original version of Connectbot has issues when importing keys that VX Connectbot corrects. There is another app advertised on this forum similar to RasPi Check that i tried for a while but i found that it hung up quite a bit so i went back to RasPi Check. I run these on my Pantech Element tablet without any issues.
Two heads are better than one, unless one's a goat head.

User avatar
paddyg
Posts: 2554
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Using pi with android devices anyone have experience?

Sat Dec 13, 2014 5:12 pm

Only experience is browser access to RPi webserver. Limited to non-keyboard type of interface as it's quite hard work using a phone!

pi3d on android would be fantastic, I installed qpython ages ago but didn't do very much. The things that need to be fixed (in increasing difficulty) are 1. numpy (think this has been sorted for a while) 2. python-imaging 3. openGLES - these last two seem to have been managed in order for kivy to work see https://github.com/kivy/python-for-android
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

mung
Posts: 506
Joined: Fri Nov 18, 2011 10:49 am

Re: Using pi with android devices anyone have experience?

Sun Dec 14, 2014 10:35 pm

Lol, I broke it already.

Lasted until saturday afternoon then wifi stopped working after I linked a bluetooth keyboard, I tried factory reset but still did not get wifi.

I phoned tesco they say I may get a replacement on thursday.

I am not having much luck with tech recently my laptop and backup disk just failed the other week losing loads of data.

I get the feeling I will be playing with the pi only this christmas.

mung
Posts: 506
Joined: Fri Nov 18, 2011 10:49 am

Re: Using pi with android devices anyone have experience?

Mon Dec 15, 2014 8:41 pm

This post is probably really really off topic and I maybe should go and find an android phone forum for this?, But...........

So it seems the android phone has fixed itself?

I am not sure what to do now, as I have already called the seller and booked it to replaced, what would others here do in this situation?

I think its very weird, I can only assume its an intermittent fault OR the network operator did something to the phone remotely?

It stopped working on saturday afternoon, I did extensive tests and factory resets on saturday and sunday morning, I phoned to get it replaced on sunday afternoon when I was sure it was not connecting to wifi.

Then this evening when I looked at it it was connecting to gmail and everythign seemed to work, I have factory reset it twice this evening and added the same apps I had before and it still seems to be working.

I am not sure if I should leave the replacement request and get a new phone or contact the seller and tell them I will keep it?

I sort of wondered if the network operator (virgin mobile) had locked the phone as I had trouble trying to setup the sim as I have virtually no coverage at home, but I would assume if it was locked for security then the phone would tell me that?

I am certain it was the phone and not my home wifi, so I really think I have to assume it is an intermittent fault as if it was security problem than the operator would have notified me.

Any checks anyone thinks I should do?

As side thought changing subject back to rpi integration has anyone used motion cctv web surveilance on an android phone, I setup a rpi last year with the motoin MMAL raspicam system and it worked fairly well viewing on a laptop, but I repurposed the pi as checking cctv on my laptop was not really that useful, I thought it maybe more useful from my phone, has anyone triied that?

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Using pi with android devices anyone have experience?

Mon Dec 15, 2014 9:32 pm

if the wifi cut out after connecting to a bluetooth keyboard then it isn't a service provider lock issue.
I'd speculate that it's a component over-heating issue (which is pure speculation) and I'd go ahead with the exchange for new.

At the beginning of the year I bought a pair of tablets (one for me, one for my wife) and one of them wouldn't stay on (fully charged, got it to stay on for long enough to disable all the timeouts, still turned itself off every few minutes) I returned it and the replacement worked correctly. If I hadn't had the other working tablet I might have waited longer before returning it, in the assumption I was doing something wrong.
Doug.
Building Management Systems Engineer.

Return to “General discussion”