Teensy 3.2: Has anyone got it to interface with android in any mode?

Status
Not open for further replies.

Kaboom22

New member
I've tried (in Android 4.1, 5.1 and 4.4 in a VM):

Keyboard: Shows up as a input device, but the keys do not work.
Joystick: Show up as a input device, but no buttons work.
RawHID: Works for a few presses with an interpreter app i wrote to listen to the HID packets, but just stalls after that. See my stack overflow post for more details (https://stackoverflow.com/questions...-android-hid-device-stalls-after-a-few-inputs).

All modes work perfectly fine in Windows and Linux.

Is there any working examples out there for android? Any ideas?
 
If I remember correctly, there were successful attempts to use the serial mode, with a terminal software.
Maybe the VM is the problem ?
 
adb console can be used, i use teensy uart6 to access adb root console on pioneer NEX (yeah they run android)
 
Last edited:
If I remember correctly, there were successful attempts to use the serial mode, with a terminal software.
Maybe the VM is the problem ?

Do you have a link to the serial examples? i tried to use a generic serial listener from the app store, but i couldn't get it to work. i only used one VM (Android 4.4), the others were a Nexus 7 (Android 5) and the actual car head unit (Android 4.1)

adb console can be used, i use teensy uart6 to access adb root console on pioneer NEX

You're going to need to unpack that a little for me, i'm not sure what you mean :)
 
radios like the pioneer NEX have a uart cable/solder points on the mainboard for RX,TX, and ground (chasis)

i was even able to get into the BT comms for caller id and pull dumpsys for current radio station/song/artist to display on my gauges

they mostly run at 115,200baud, if you have a GPS enabled radio 6000+ series nex, you can also tap into its gps at 9600 baud for mcu integration. you'd need to get ahold of your radios service manual to check out where the signals are.

the NEX runs 4.2.2
 

Yes, i did do a thorough search on the problem. Using a serial terminal is fine and all, but i really need to be able to programatically interact with the Teensy. Or ideally just get the keyboard mode working, as was originally intended.

radios like the pioneer NEX have a uart cable/solder points on the mainboard for RX,TX, and ground (chasis)

i was even able to get into the BT comms for caller id and pull dumpsys for current radio station/song/artist to display on my gauges

they mostly run at 115,200baud, if you have a GPS enabled radio 6000+ series nex, you can also tap into its gps at 9600 baud for mcu integration. you'd need to get ahold of your radios service manual to check out where the signals are.

the NEX runs 4.2.2

Interesting! I'm using a cheap chinese head unit, but i don't feel confident enough to open it up and start tapping buses. How did you interface on the software side?
 
Just to close out this thread for anyone searching for the same problem: I resolved by switching to a microcontroller with native USB (Arduino pro micro, but anything ATmega32U4 based should work the same) and using the Project-HID library (https://github.com/NicoHood/HID) as a consumer device. This works fine on any device/OS I've tried.
 
I've tried (in Android 4.1, 5.1 and 4.4 in a VM):

Keyboard: Shows up as a input device, but the keys do not work.
Joystick: Show up as a input device, but no buttons work.
RawHID: Works for a few presses with an interpreter app i wrote to listen to the HID packets, but app just stalls after that. See my stack overflow post for more details (https://stackoverflow.com/questions...-android-hid-device-stalls-after-a-few-inputs).

All modes work perfectly fine in Windows and Linux.

Is there any working examples out there for android? Any ideas?

@Kaboom22 by using Arduino Pro Micro and Project-HID library and got it running just fine ;) Thank you so much for the solution bro.
 
Kaboom, regarding the headunit (or any other type of device with ADB over uart method, reading/writing data is done over regular serial baud rate of 115200. ADB gives you more control on how to run/change things on the running system, with only RX,TX,GND hookup, you can send commands as you wish like Serial1.println(“dumpsys”); and android will dump it’s contents in your buffer that you can read with if ( Serial1.available() > 0 ) Serial.print((char)Serial1.read());

this gave me for example, to set the date & time on the radio and teensy would automatically sync to it
 
Status
Not open for further replies.
Back
Top