Controlling embedded devices from tablet apps

I'm looking for some ideas or suggestions here.

We have an embedded system based around a small microcontroller (an AVR XMega, IIRC), connected to a PC using an FTDI chip and a USB cable, with a little PC program to control and monitor the embedded system. This all works fine.

The customer would like to know if they can use tablets (Android or iPad

- and maybe Android and iPad telephones too) to control the system instead of a PC or laptop.

Although I haven't done any Android app development, I've got some reasonable ideas about how to get started. I know even less about iPad development, except that it is more challenging to deal with (especially as we don't have any Macs). However, we can always outsource the actual app development to other companies if need be.

The big challenge is to communicate between the tablet and the embedded system. Ideas include:

Use the existing USB connection. That would be the cheapest and easiest, but most tablets don't have a USB port, and I don't think we could use the FTDI chip anyway.

If we always had internet available, the card could have an Ethernet port and connect to an external server, and the tablet could connect to the external server. But customers don't always have internet connections where this system would be used.

We could put Wifi on the board, and use that between the board and the tablet. But there is not always Wifi available, and when there is there may not be access between nodes on the network. And even then there is the question of getting SSIDs, passwords, etc., into the board.

We could try Bluetooth - but I am not sure that an app can get the kind of direct access to a Bluetooth device that would be needed here.

I can't be the first person to be considering this situation, so I hope that other people have ideas or suggestions.

Thanks,

David

Reply to
David Brown
Loading thread data ...

[...]

What kind of access do you need? I have done a simple test application on android with a bluetooth to serial module. I got a serial connection to the embedded device working fairly quickly. The app is not perfect yet, but that is mostly because of my limited Android experience i think. ;-) I'm hoping to find time to improve it. Especialy seperate all IO and UI in different threads to get some kind of performance.

Have a look at the Android SDK bluetooth examples.

With IOS there is some extra difficulty with having to use an approved device ID or something to be able to use bluetooth. But there are some modules (bluegiga?) that take care of this.

--
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail) 

You can observe a lot just by watching.  -- Yogi Berra
Reply to
Stef

I think you're giving up on USB and Bluetooth too easily.

I'm toying with a hobby project that would need a terminal; most of the new tablets (not phones) that I looked at on Amazon do, indeed, have USB host ports. Moreover, there's already a USB terminal app for Android tablets that talks to FTDI chips. Given that, I would think that filling in the blanks is easy.

There is a Bluetooth serial data connection mode implemented; I've used it on a PC running Linux to talk to a Bluetooth-enabled device I'm making for a customer. It works just like any other serial. I'd be mildly surprised if you couldn't already access such with Android, and astonished if you couldn't figure out how.

--
Tim Wescott 
Control system and signal processing consulting 
 Click to see the full signature
Reply to
Tim Wescott

Check out FT312D from FTDI. Using the traditional FTDI chips with android is not that easy because Android does not expose USB host.

It took a few days for me to do basic control application, but I had been coding Java a lot maybe 5 years before.

--
Mikko OH2HVJ
Reply to
mi

You can Google "android arduino" or "iPhone arduino" and get the basics.

or add "wifi" or "bluetooth" to the list and get even more.

Reply to
hamilton

Thanks to all who replied.

It looks like the FTDI Android chips could be the easiest and cheapest way forward. If these let an Android app talk to the microcontroller over a UART link, like the FT232 chips do, then I think we can make that work. Does anyone know if you connect a PC to these same chips (i.e., can we make the one board that will work with a PC and a tablet)? Of course, I can (and will) read the datasheet and other information, but someone might know of the top of their head.

Other than that, Bluetooth serial sounds like another practical idea after all. I'll let the project developer figure out the details (I am not directly involved in this particular project). It sounds like this is the way we would have to go for iOS support.

Thanks,

David

Reply to
David Brown

It is my understanding that ALL Android tablets have USB ports. certainly every one I have looked at does have one. Finding the USB driver may be more problematic- I never found one for my el-cheapo Android tablet from the Far East.

Fred Eady recently did a series of lectures on using an Android tablet and covered using the Wifi and Bluetooth for I/O. There are archived at

formatting link

June24-June 28.

As previously mentioned there is the IOIO board and also the AOAA kit from Embedded Artists

formatting link
)

I have done a number of blogs of my struggles in creating an application using Android/Bluetooth culminating in an oscilloscope hosted on an Android tablet and communicating via Bluetooth see

formatting link

If you look at the bottom you will see links to all my blogs on teh topic including discussions as to why I chose Android over the iPad.

--------------------------------------- Posted through

formatting link

Reply to
antedeluvian

No, all Android tablets have USB device support. David would need USB host support if he wants a USB connection because he wants to control the device from the tablet, and not all tablets, especially the low end ones, have USB host support.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP 
Microsoft: Bringing you 1980s technology to a 21st century world
Reply to
Simon Clubley

host

device

USB

Simon

It depends on what you are using. The AOAA board acts as a USB host and I am pretty sure the IOIO does too. If you read the comments on the IOIO board there are some phones that seem to have problems, but most seem to succeed.

--------------------------------------- Posted through

formatting link

Reply to
antedeluvian

Interesting; I didn't realise that. I went and did some reading:

formatting link

and (judging by the way the specification is worded) it seems it was designed back in the days when USB host didn't exist on Android tablets.

Thanks,

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP 
Microsoft: Bringing you 1980s technology to a 21st century world
Reply to
Simon Clubley

Another thing about Android tablets USB is that they sometimes have weird connectors. I know mine does.

Reply to
David Brown

Providing instructions for incorporating an inexpensive WAP seems simple enough.

You may not need to do full wifi - you may be able to do USB to ethernet conversion on the Android side.

formatting link

I say "may" because I haven't done it, and there are sometimes slings and arrows.

this allows you to choose between wired Ethernet and wifi.

I would be quite surprised if you could not.

--
Les Cargill
Reply to
Les Cargill

I'm trying to work out how it works, but I can't quite.

IME Android USB support is a bit of a hotpotch:

Some devices only support USB device, in hardware Some only have kernel modules supplied for USB device, even if the hardware will do OTG Some have wierd connectors Some are only set up to do MTP or PTP rather than be USB mass storage devices (kernel modules again) Some have modules in host mode for keyboards, mice, storage etc etc but it depends what the vendor has compiled

Essentially they can be hobbled in a dozen different ways. Most of the limitations are simply that the relevant bits weren't compiled in (eg Google wants you to use the cloud, so disables USB mass storage support). But I do wonder how the above device managed to navigate this minefield. Unless they just picked a method that worked at the time, and may not do on all current devices.

Ah:

formatting link
I wonder if they actually work in the $100 devices...

Theo

Reply to
Theo Markettos

There is a new project in Instructables, showing an Android phone to Arduino interface via Bluetooth:

formatting link

--
Roberto Waltman 

[ Please reply to the group, 
 Click to see the full signature
Reply to
Roberto Waltman

One main question here is that does the person holding tablet move away from your device? How far? If for e.g. the customer wants to operate the device from the tablet / mobile from somewhere remotely in the world, then there is no choice but to have a small embedded web server connected to your device and then access it from the tablet.

If you need only a short range solution, then you can think of wired USB connection as others have stated already, bluetooth, or even TCP/IP.

If you use USB with FTDI chips as it is, then, remember that you need USB host or UTG support on the tablet side, which very few devices have as of now (at least as I know). More so, the USB host / OTG support is not included in Android versions below 4.0 I guess. I am not aware of the USB host support with ipad / iphones yet.

But the advantage here is you need not make any addition to your device. You can connect the same USB cable which you connect to PC, to the android tablet / phone.

For bluetooth, you will need a bluetooth modem on the device side. Similarly you can go for an embedded web server connected to your device. Have that server talk to your device and then interface to the server from tablet. Some sort of ethernet connection and a wi-fi router is must for this configuration so the android tablet will connect to the device via this router. This way, even if the customer is remote, if he can make the IP address of the device web server a static and public one, he can get access to the device, a big plus point.

App development on android may be slightly easier to get started with than iPhone. You can develop an android app on any PC (windows / linux / mac) and even try on the android device without any payment needed to google. If you need to publish the app on Google play, then some 25 USD fees is required.

For iPhone, you need a macbook, an apple developer account (paying 99 USD per year) and of course an iphone / ipad to try the apps.

Of course, you can outsource it to app developers.

Hope this helps.

--------------------------------------- Posted through

formatting link

Reply to
gopal_amlekar

Although an embedded web server may be the right approach for this case, I don't see the logic behind "need network access from far, far away" implies "there must be a web server."

--
Roberto Waltman 

[ Please reply to the group, 
 Click to see the full signature
Reply to
Roberto Waltman

You silly person.

Network == Internet == WWW

;)

--
Grant Edwards               grant.b.edwards        Yow! But they went to MARS 
                                  at               around 1953!! 
 Click to see the full signature
Reply to
Grant Edwards

Certainly not, but having the management app HTTP based eliminates the need to install code on the "far, far away" device. Which is a massive advantage. No distribution, no versioning, no installation security issues, no network security issues (or at least getting HTTP through firewalls is usually much easier than a custom protocol), no platform issues (a slight exaggeration, but "(almost) anything with a web browser" is a pretty broad choice of platforms), no managing a separate code base...

Of course it's not the appropriate solution in all cases, but it should probably be the first choice in most situations.

TELNET based management would have similar advantages, although would require the user to install a TELNET app in some cases (but not something you'd have to manage). That also makes it easy to avoid networking at all if you put a serial port on your device. Of course you've largely ruled out a GUI then.

Reply to
Robert Wessel

Winking smiley aside, those terms are not synonymous.

George

Reply to
George Neuner

The smiley is the whole point. :-)

There's a depressing number of people who should know better who think the above statement is true.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP 
Microsoft: Bringing you 1980s technology to a 21st century world
Reply to
Simon Clubley

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.