Android tablet as Serial Terminal

Go To Last Post
33 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was surprised to find ....

Using my (old) Android tablet. A very nice if not fast Acer. Running older version of Andriod. Too old to surf the web, too slow with today's complex web pages.

I installed this free Android app https://play.google.com/store/apps/d...id.gousb&hl=en
Plugged in an FTDI USB to serial cable.
First try, it worked. No fighting, just worked. 115200 baud.

Then, I plugged in a Teensy 3 running a program I use a lot that I normally plug into my PC and use a serial terminal program (Bray's Terminal).
Amazing.. that Teensy 3 worked with the Android app. Two-way - I can type commands to the program running on the Teensy 3- which monitors the "Serial" USB for incoming ASCII text commands.
That Teensy 3 software is my 900MHz radio "sniffer" - it receives (from a 900MHz RFM69 radio connected to the Teensy), decodes each packet and displays kind of like wire shark (promiscous mode).

I also connected the FTDI USB/Serial so the Android tablet can talk to a non-Teensy ARM M4 board with a 3.3V UART. Works too!

 

Of course, this will work with other serial over USB devices, and Arduinos and the like with UART text I/O.

So now I have another screen to use for my serial terminal. How easy does it get?

Last Edited: Sun. Jan 25, 2015 - 12:05 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sweet ! Gonna give that a try as well. I may end up with lots of serial terminals .....

(recently got Puppy Linux on an old notebook to act as terminal)

 

thanks !

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I"m going to try this too, on my Andriod HTC One phone. It has a micro-USB connector so I'll have to get a USB plug adapter.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm jealous.

 

I've been using an Xprotolab as a serial debugging terminal, (display, really, no keyboard).

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nice!!
Thanks for the tip

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

stevech wrote:

I"m going to try this too, on my Andriod HTC One phone. It has a micro-USB connector so I'll have to get a USB plug adapter.

You'll need a USB-host adapter cable. And pray that the Andriod HTC One  supports this.

Found it: http://www.banggood.com/buy/Usb-...

 

@JC: why jealous ? You don't have an Android tablet ? Borrow one from the kids devil

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a "USB OTG" on-the-go adapter cable - for the HTC. I've used it to plug in a USB thumb drive so the HTC can be a USB host.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Installed on my Samsung phone just fine but my "nextbook" tablet (kitkat) complains "not enough space" when 4Gb should be available (??)

Tom Pappano
Tulsa, Oklahoma

Last Edited: Sun. Jan 25, 2015 - 02:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How do I make the Tablet appear as a serial port on the PC when the terminal is running? This is just to try out the comms PC<> tablet.

 

The program is running on the tablet, I'll see if I can find a USB to TTL board around so that I can try talking to an AVR.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

That Android program makes the Tablet/phone appear to be a USB Host for the USB serial protocol.

To connect this to a PC, you could use a USB-serial adapter on the PC, and the same on an Android device. Then connect the two cables' serial pins together as a NULL modem (TX to RX, RX to TX). And GND.

 

I wouldn't think this connection would be very useful though!

 

 

 

Last Edited: Sun. Jan 25, 2015 - 11:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

this connection would be very useful though!

I know, just to check out the terminal with another terminal on the PC. I need to get a sub miniature USB to  USB B cable for my USB to TTL board tomorrow. Public holiday here today.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I started out with a simple loopback. Connect USB/Serial to Android device. Jumper TX to RX. Type stuff.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I love coming on here and stumbling across nuggets like this. You guys so totally rock!

Now if I can just find a smartphone app that can also generate/decode modbus protocol, that would be golden and the field-tech side of my life would be sooo much easier.

Now contemplating an FTDI converter PCB with native micro USB connector. ;)

 

Thanks for sharing.

 

Steve

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For USB to serial, I like these due to their small size and having a slide switch to go between 5V and 3.3V. Much smaller than the typical FTDI/USB board. Also, cable comes off at 90 deg. rather than sticking upwards.

Low cost, too.

 

http://www.anarduino.com/details...

 

 

Last Edited: Mon. Jan 26, 2015 - 02:50 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What kind of ports do these tablets have? My Samsung Note 10.1" only has a weird Samsung proprietary connector :-(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Schtevo - modbus is piss easy to implement. I recently wrote a comms engine that is similar to modbus in javascript. It runs on ios, android and win8. The gui can be as simple or complex as you like - just do it in html5. Run through cordova and you have an app.

The problem i've found with a number of android tablets is that native drivers are not compiled as part of the kernel. There are work arounds to fudge up support with userland code.
Another solution is to use a hacked wireless router and use that as a gateway. You can get battery powered ones for site work. That way you don't need to worry about whether the mobile device has usb or not. Once you've got a wireless router just run the webpage on that and there's no need for an app.

I've been fiddling with a esp8266 wifi chip to do a similar thing this weekend. Results are not too promising - speed seems to be an issue when using encryption and the uart has no native support for rs485. There doesn't seem to be a means to find out when the uart has finished transmitting.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

What kind of ports do these tablets have? My Samsung Note 10.1" only has a weird Samsung proprietary connector :-(

Most newer tablets and phones have USB micro-B ports. They connect to USB devices using standard OTG adapter cables.

 

For older samsung tablets, you need a samsung tab OTG adapter like this:

 

http://dcables.co.uk/female-usb-...

 

I bought one or two of these from various suppliers, but have had a few that weren't recognised, so be aware that some of these cables may not work as advertised. You may need to shop around.

 

- S

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

What kind of ports do these tablets have? My Samsung Note 10.1" only has a weird Samsung proprietary connector :-(

An odd connector wink

 

When I purchased my tablet, a Herotab, some Chinese knock-off, this cable was supplied with it. I'll post a photo in a minute.

 

Edit: this should fit for your Gnusmas: http://www.banggood.com/Wholesal...

 

My connector:

Usb otg

 

To all: the app requires Android 3.2 or higher. Mine is 2.2 .... now THAT is OLD !

 

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Last Edited: Mon. Jan 26, 2015 - 03:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My semi-old Acer A500 tablet has a standard sized USB jack. Not mini, not micro.

My HTC phone has a micro-USB.

Android 3.2.1 kernel 2.6

Last Edited: Mon. Jan 26, 2015 - 04:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Kartman; I agree - Modbus is piss easy. I have a stack that has been used extensively in my employer's product line. Its all the other bits there you mention that are the hard part. At least hard until I take the plunge and learn that stuff. (esp8266 looks interesting)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

....meanwhile trying to get a suitable cable from a couple of local computer stores, no one seem to have it. Will need to get one on line.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Tue. Jan 27, 2015 - 09:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I bought FTDI chip based USB to serial, for both 3.3V and 5V target microprocessors. Lots of these on ebay and elsewhere. I like the ones manufactured by FTDI themselves. Major PITA buying a screwed up clone of FTDI.

be sure to avoid the ones that lack the DTR signal - many have just four wires: PWR, GND, TX, RX and no DTR.

 

I have some that use breakout the signals to wires with female pin header sockets. I have others that have a pin header socket for the "standard" FTDI layout of pins. Due to small size, and switch-selected 3.3 / 5V, I use the ones from Anarduino.com.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

js wrote:

....meanwhile trying to get a suitable cable from a couple of local computer stores, no one seem to have it. Will need to get one on line.

Are you talking about a micro-B to B socket cable? Try asking for an OTG cable - that's the more usual term for them. Also, jaycar is a good place to look for some of the more exotic cables.

 

- S

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

John, i seem to recall i spied some otg cables at Woolworths recently. I was surprised as these were difficult to get as i had bought some in hong kong when i was there last year.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mine came from Newegg.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So what exactly does an OTG device/cable do with the 5th pin anyway?

Pull it low/high? Something else more exotic?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jaycar has this OTG cable but it's the wrong plug on the "user" side, I need a USB B connctor. I guess I could just use a standard A>B  lead with that.

http://www.jaycar.com.au/product...

 

However this may also work with a standard A>B  lead. http://www.jaycar.com.au/product...

 

I was at Jaycar this morning but didn't look, they are usually useless with some "exotic" parts.

 

I may also pop around to Woolies later on.

 

This would be perfect

http://www.aliexpress.com/item/C...

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Got a USB on the go cable and plugged a standard A>B cable to my USB > TTL board and things sort of work.

 

I can't see any way of sending a CR or LF as part of the command, the keyboard has a DONE key instead of CR, even CTRL J or CRTL M cannot be sent.

 

Don't know if the DONE key inserts any of the 2 control characters, both or none. I will need to plug it into another terminal program to see what's being sent.

 

Anyway I can't see the board responding correctly, the code expects one character at a time followed by CR which terminates the string input and starts command execution.

It should be able to accept fast characters input as in a string sent by the tablet and execute the command but maybe the response gets lost in transactions.

 

Don't really like the line input and send key, don't know how hard it is just to use the main screen like a "normal" terminal program.

 

It would be good if there is some docs somewhere on how to set up things.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

are you speaking of the terminal program running on a PC, Mac, etc.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The terminal program in your OP above running on a Samsung tablet.

 

The keyboard input needs to be fed into the input line but when finished I can't simply put a CR as the end of the line, instead I have to "click" on send, or click on the DONE button on the keyboard (the CR doesn't appear but the DONE key does) and then click on Send.

 

The characters are not send one at a time when typed but send as a string when pressing the Send button.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes, I get it.

Most terminal programs these days work like that. A few older ones have a mode selection for send char by char immediately.

The macro keys sometimes do what you want.

 

There are several other such programs for Andriod .. I've not tried any of them.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Schtevo - found this in my travels:
http://leachy.homeip.net/olinuxino/testandroid.html

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nice one. Looks like its for Modbus over TCP/IP though. (another thing to get my head around 1 day)