Author Topic: pyMCU with miniature ARM PCs and Android sticks  (Read 3657 times)

riklaunim

  • Newbie
  • *
  • Posts: 48
pyMCU with miniature ARM PCs and Android sticks
« on: October 06, 2013, 01:31:22 PM »
pyMCU needs some PC that will execute a Python script against it. Raspberry Pi is supported, but there are smaller things like CuBox that runs plain Linux OS, or Android HDMI sticks that are much cheaper (but they run Android only). Android has SL4A or things like QPython. The question is - would pyMCU work with Android HDMI sticks? (and with Cubox?).

richard

  • Administrator
  • Jr. Member
  • *****
  • Posts: 95
Re: pyMCU with miniature ARM PCs and Android sticks
« Reply #1 on: October 06, 2013, 02:14:42 PM »
That's something I started to look into briefly but haven't had time to dig into very far.
pyMCU uses the FTDI usb to uart chip and they announced Android support a while back, you might be able to find some more answers on their site: http://www.ftdichip.com/Android.htm

riklaunim

  • Newbie
  • *
  • Posts: 48
Re: pyMCU with miniature ARM PCs and Android sticks
« Reply #2 on: October 07, 2013, 07:09:03 PM »
I got to the stage that it says that no pymcu is connected - phone isn't powering the device. I'll also check HDMI stick that has one "plain" USB port.

riklaunim

  • Newbie
  • *
  • Posts: 48
Re: pyMCU with miniature ARM PCs and Android sticks
« Reply #3 on: October 08, 2013, 04:13:23 PM »
With the HDMI stick the result is the same, although pyMCU gets power (connected via USB hub).

richard

  • Administrator
  • Jr. Member
  • *****
  • Posts: 95
Re: pyMCU with miniature ARM PCs and Android sticks
« Reply #4 on: October 08, 2013, 10:55:01 PM »
Here are a few links I found that might help, looks like there could be compatibility problems with certain android devices.
http://android.serverbox.ch/?p=285
https://github.com/mik3y/usb-serial-for-android
http://www.youtube.com/watch?v=WwQ6ITJjYEc

riklaunim

  • Newbie
  • *
  • Posts: 48
Re: pyMCU with miniature ARM PCs and Android sticks
« Reply #5 on: October 09, 2013, 01:51:22 AM »
I'll install that FTDI console app, plus one of USB debugging apps and see what Android detects.

riklaunim

  • Newbie
  • *
  • Posts: 48
Re: pyMCU with miniature ARM PCs and Android sticks
« Reply #6 on: June 22, 2014, 10:39:07 AM »
On Android 4.4.2 (newer ROM for Measy U4A) the FTDI UART is detected and even the FTDI provided app lists as one to handle it. It can send data (LEDs flash). When trying to use pyMCU from QPython there are however permissions problems as the app doesn't ask for USB access (while UART apps do), and pyserial can't connect to /dev/bus/usb/002/016 and pymcu module can't find pyMCU board at all (does it look for such android-specific device names?). Picuntu Linux can be installed on RK3188 dongles like that Measy, which would give normal Linux environment which is some solution).

richard

  • Administrator
  • Jr. Member
  • *****
  • Posts: 95
Re: pyMCU with miniature ARM PCs and Android sticks
« Reply #7 on: July 20, 2014, 07:52:28 PM »
The autoscan is looking for ttyUSB on linux systems, you can manually specify the device path to open by passing it to the mcuModule class initialization:
mb = pymcu.mcuModule(port='/dev/bus/usb/002/016', baudrate='115200')
Not sure if that will work though, if you're not seeing a ttyUSB0 or other number in /dev then my guess is that the FTDI drivers are not present or not working properly.
If it is a permission issue you can try modifying the udev rules:
/etc/udev/rules.d/50-udev.rules

add these two lines:
# relax the permissions just for ttyUSB0
KERNEL=="ttyUSB0",              MODE="0666"


I've run into that problem in the past on some linux systems.


riklaunim

  • Newbie
  • *
  • Posts: 48
Re: pyMCU with miniature ARM PCs and Android sticks
« Reply #8 on: July 22, 2014, 04:12:27 PM »
Android isn't that much Linux but maybe I'll be able to hack it for rooted systems. Installing plain Linux on a dongle would just solve the problem, but it would be cool to have Android solution as that would allow usage with some tablets/phones. :)

What about that pyMCU2 board ;)?