Interfacing to a PIC Microcontroller

by Jay » Mon, 28 Sep 2009 00:18:57 GMT


Sponsored Links
 I am looking into to Interfacing an Android Phone with a PIC
Microcontoller and retrieve data via the USB port.  How would I go
about doing this?  What API calls do I need to make to retrieve data
from the PIC?  And will it be easier if I were to do this via
BlueTooth instead of USB by adding a BlueTooth module to my PIC?

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Interfacing to a PIC Microcontroller

by Chris Stratton » Tue, 29 Sep 2009 00:00:05 GMT


 


The current  android phones are  USB devices only, they do not
function as USB  hosts.  So to do this with USB, you would need a PIC
that can be a USB host.

Bluetooth probably is more practical as some progress has been made on
getting rfcom working (see the unofficial bluetooth api community
project)

There also is/was a debug serial port on the extusb connector that
might be an option, though may require a custom kernel?

Anyone you cut it, this is a quite advanced project - not to say that
you shouldn't tackle it, but you will end up learning a lot about the
internals of android before you get it working.

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---


Sponsored Links


Interfacing to a PIC Microcontroller

by -chew- » Fri, 09 Oct 2009 00:00:20 GMT


 Also trying to accomplish the same objective. I've been trying to
investigate other possibilities of capturing incoming USB (maybe hook
the URB's) data in Android. I know that kernel build in Android does
not support the "Enable Loadable Module Support" kernel config and it
has no USB host or OTG capabilities; just client. If possible, I don't
want to do it in kernel mode (to avoid kernel recompilation). Maybe
just a daemon to do the capturing but still no idea how.

The idea of the project is that Android phone will be attached to a
microcontroller (USB host/OTG capable). This controller will be
sending data to Android phone via USB (I still have to write USB host
controller driver for the microcontroller, though). Android phone will
the USB client. Still investigating if this could be done in adb.
Don't want to modify adb itself. Maybe just a filter to capture USB
data traffic in adb. Been scanning the codes in adb. Seems that adb is
also doing the functionality of a typical USB driver, though running
as a daemon/service. Am I right?

@Jay: Do you have any progress so far? Could you please share also
some ideas?






--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Interfacing to a PIC Microcontroller

by -chew- » Fri, 09 Oct 2009 14:19:34 GMT


 adb implementation seems capable of addressing this requirement. But I
guess the porting the adb host side to the controller requires a lot
of work on the Android phone's side (adb device). I'm planning to
maybe make a separate daemon that would behave like adb (maybe on the
communication protocol used), only a simpler one. I'm not sure though
whether its coexistence with adb will result to other issues.





--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. Unable to Install EAP TLS certificates for WiF

Hi All,

  I am trying to install EAP-TLS WiFi certificate.
I am following as mentioned in the below link
http://www.mail-archive.com/android-security-discuss@googlegroups.com/msg00520.html

I get the message Certificate not installed on GUI and the log says

D/dalvikvm( 1027): GC freed 152 objects / 8624 bytes in 88ms
I/global  ( 1254): Default buffer size used in BufferedWriter
constructor. It would be better to be explicit if an 8k-char buffer is
required.
I/ActivityManager(  950): Starting activity: Intent
{ act=android.credentials.SYSTEM_INSTALL
cmp=com.android.settings/.CredentialInstaller (has extras) }
I/ActivityManager(  950): Starting activity: Intent
{ act=android.credentials.UNLOCK
cmp=com.android.settings/.SecuritySettings }
I/ActivityManager(  950): Displayed activity
com.android.settings/.CredentialInstaller: 924 ms (total 924 ms)
I/ActivityManager(  950): Displayed activity
com.android.settings/.SecuritySettings: 955 ms (total 955 ms)
D/dalvikvm( 1027): GC freed 1102 objects / 61440 bytes in 108ms
D/dalvikvm( 1254): GC freed 2649 objects / 184112 bytes in 280ms
W/InputManagerService(  950): Starting input on non-focused client
com.android.internal.view.iinputmethodclient$stub$pr...@438e4678
(uid=1000 pid=1217)
D/CertInstaller( 1254): credential not saved, err: 0
I/NotificationService(  950): enqueueToast
pkg=com.android.certinstaller
callback=android.app.itransientnotification$stub$pr...@43901cf8
duration=0
W/IInputConnectionWrapper( 1217): showStatusIcon on inactive
InputConnection
D/dalvikvm( 1217): GC freed 2076 objects / 102744 bytes in 99ms


Has anyone installed the certificate. Please let me know..


Thanks,
Chitra

2. why launch is cancelled

Hello,

Can some one tell me ,why launch is cancelled


[2010-05-15 07:56:22 - Helloandroid] Device API version is 7 (Android
2.1)
[2010-05-15 07:56:22 - Helloandroid] HOME is up on device
'emulator-5554'
[2010-05-15 07:56:22 - Helloandroid] Uploading Helloandroid.apk onto
device 'emulator-5554'
[2010-05-15 07:56:28 - Helloandroid] Failed to upload Helloandroid.apk
on device 'emulator-5554'
[2010-05-15 07:56:28 - Helloandroid] java.io.IOException: Unable to
upload file: timeout
[2010-05-15 07:56:28 - Helloandroid] Launch canceled!

-- 

3. what is the kernel process to manage the device i/o ctrl?

4. Wifi Issues WL1251

5. Can I have a scrolling element inside another?

6. Can I have a scrolling element inside another?

7. Oot : paging Jonathan S