Author Topic: Working with Android yet?  (Read 8289 times)

allanonmage

  • Newbie
  • *
  • Posts: 9
Working with Android yet?
« on: January 03, 2015, 02:58:56 pm »
I'm excited to see advertised support on the Digispark Pro for Android, but I guess I missed it when I looked around here.  Has support for Android came yet?  I saw mention of USB OTG as a requirement on a phone/tablet, but what about ADB support.  I know that is/was kind of an option with the Arduino ADK.

I, and seemingly many like me, are not USB low level programmers, and it's my opinion that as soon as the USB libraries are written to connect hardware to Android devices, we'll see all sorts of cool gizmos and gadgets come out of hacker/maker spaces and garages and whatnot.

BTW I'm about to order some DigiSpark Pros and wait for the software.
« Last Edit: January 03, 2015, 03:03:43 pm by allanonmage »

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Working with Android yet?
« Reply #1 on: January 03, 2015, 03:11:18 pm »
Is there better info than this on ADB: http://code.google.com/p/microbridge/

Interesting - it seems to use usb

allanonmage

  • Newbie
  • *
  • Posts: 9
Re: Working with Android yet?
« Reply #2 on: January 03, 2015, 03:15:30 pm »
That's useful info! Been looking around the net for a few years for something like that and never came across it.  I wonder what hardware it works with.

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Working with Android yet?
« Reply #3 on: January 03, 2015, 03:44:40 pm »
Depending on the level of support it might take an UNO or better full size Arduino system for a full development environment.  If there is just an interface that feeds on USB data then the OTG connections working might be enough for Pro to work.  I almost tried it the other day but didn't to see if it would see the PRO connect as a keyboard or mouse.  If so I pondered if it might make a handy terminal to catch debug output onto my phone.  Then I went and got serial working between to Pro units with OLED display instead, I'll be updating that post soon.

allanonmage

  • Newbie
  • *
  • Posts: 9
Re: Working with Android yet?
« Reply #4 on: January 03, 2015, 08:10:17 pm »
I've got an idea for a project to just use 2-3 PWM and that's about it.  Maybe an LED.  Nothing too crazy I would think.  The Android would be doing the heavy lifting and the comms, so that's where I'd wind up wracking my brain writing code I'd imagine.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Working with Android yet?
« Reply #5 on: January 04, 2015, 05:04:52 pm »
You can use DigiCDC to make the Digispark appear as a serial device to an android device that supports CDC devices and use simple serial command to write to and read from it. There are no plans to support full ADB due to RAM constraints.

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Working with Android yet?
« Reply #6 on: January 04, 2015, 06:56:22 pm »
Indeed CDC would working well would be perfect.  Looking for Android Terminal I just tried these:

This fails on my Note4: https://play.google.com/store/apps/details?id=com.liorhass.android.usbterminal.free

This CDC_ECHO works on last years LG G Pro after guessing at settings (57600baud, 8 data, 0par,1stop) as FTDI?: https://play.google.com/store/apps/details?id=com.REDZelectronics.ZTerminal


defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Working with Android yet?
« Reply #7 on: January 04, 2015, 10:50:20 pm »
I tried a couple more Android apps the UI on the ZTerminal above is HORRID.  Many others fail to work with the CDC Pro connected OTG.  Many aren't looking for CDC device but FTDI or variations.

This one https://play.google.com/store/apps/details?id=jp.ksksue.app.terminal has a decent UI and No Ads - no weird permissions.  Menu/Setting/Serial::Set to baud=57600, 8data, no=parity, 1=stop.

The App often Faults on reconnect.  Hit Menu/Open Device.

Work to echo back few char strings for some time.  Long strings or overwhelming it shuts the Pro down at this point with just the bare sample loop - pro reset - app faults (maybe twice) - reset Pro then 'Open' again.  Have to try again, but adding anything to the code makes it fail to start just now - same results I got on PC USB.

allanonmage

  • Newbie
  • *
  • Posts: 9
Re: Working with Android yet?
« Reply #8 on: January 05, 2015, 07:46:45 am »
Um... then what is the advertised support for Android?  That's what got me all excited about the Digispark Pro; that DigiStump would be officially putting out libraries to make it easy to work with Android.  Presumably the work would be done or mostly done on the Android side too.  In the loose dichotomy of hardware/software geeks, I'm more of a hardware guy and I have a hard time figuring out the software side for some reason.  I guess more specifically, finding help and answers seems to be excruciatingly difficult, so I was hoping the USB software stuff was already done.

From the kickstarter page:
https://www.kickstarter.com/projects/digistump/digispark-pro-tiny-arduino-ready-mobile-and-usb-de

"The Digispark Pro is the cheapest, ready to go, easy to use, mobile hardware development platform!

With Bluetooth Classic, BLE, and Wi-Fi shields and examples for Android and iPhone - and USB Serial (built-in) connectivity for Android (devices with USB OTG supporting Serial devices) ."

Did I mis-read something?  Or did I read too much into something?

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Working with Android yet?
« Reply #9 on: January 05, 2015, 08:51:28 am »
I should have given a more complete answer:

OTG support is via CDC as I explained - we will have both an Android library and an example PhoneGap based program that will be easy to modify. Those examples are almost ready, but are waiting on a few bugs with CDC that we are working on right now.

BLE and BT support is there and works - any BLE or BT terminal can talk to them and when writing an app you can use just about any BT or BLE library/plugin (native, phonegap, anything). When we release the OTG app we'll also release some phonegap examples for this - but if you want to jump in with BT/BLE then some great PhoneGap (aka Cordova) libraries that already exist and are easy to use:
https://github.com/randdusing/BluetoothLE
https://github.com/don/BluetoothSerial

WiFi support - well it's wifi, you run it as a server and have your app connect to it - the WiFiRobot examples is a good one on what to do on the Digispark side.

So hopefully that is what you were expecting and that is about as easy as I can figure out how to make app development with the Pro, and it's just that we need to put up the tutorials and the app examples - both of which are coming very soon (really my to-do list is down to about 6 things and those are 4 of them).

allanonmage

  • Newbie
  • *
  • Posts: 9
Re: Working with Android yet?
« Reply #10 on: January 05, 2015, 09:08:06 am »
Ah, OK. I think I'm tracking now.  What is the ETA on the software you described?  A few weeks, a month or two...?

I see mention in several areas of the site about WiFi and Bluetooth shields, but I didn't see any in the store the other day.  Are those coming soon, or out of stock, or 3rd party?

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Working with Android yet?
« Reply #11 on: January 05, 2015, 10:13:16 am »
A few weeks at most or - hopefully - this week.

WiFi, Bluetooth and other pro shields will be in the store soon - probably a few weeks - these were part of the Kickstarter and we are restocking them for retail sale