Serial as input device - Android Q&A, Help & Troubleshooting

Hi,
I'm building "accessory" box that allows me to add Carplay to my 2016 Audi A6 that has no carplay support. The build in infotainment has analog video in using Audi AMI connector. The plan is to use Raspberry Pi running LineageOS connected to infotainment video/audi in, and using CarLinkit usb-carplay dongle run Carplay in the Raspberry.
The center console controll knobs / buttons communicate the headunit via rs232 serial - and when the infotainment is on aux video mode, only the back button is in use. The plan is to use the stock controlls to conrol this monstrosity. So far i have connected my laptop in between to map the data each key press send ie: each click of the wheel to the left send "3#56" trough the serial.
Now the real question is, how i can use this to controll the android? So that each time the wheel turns to left it would be mapped as arrow key left in android?

Bump!
I'm literally wondering in the woods how / where I should start unraveling this... If this would be normal PC enviroment and i could use Python i would know how to do it, but being and IOS guy i have no idea how the android functions and where is should start: Can i make autorunning app that emulates keyboard from the serial input? or what would be the best way for it?

I am currently attempting the same thing. I’m half-way through gathering my parts and pieces so I can’t speak to a functioning example. What I can say is what I am trying to do to leverage the in-vehicle iPod controls to control the Pi.
Search for an android app called “PodEmu”.
It spoofs the vehicle’s head unit into thinking an android device is actually an iPod. You have to create you own DIY cable to make the connection happen but I’ve managed to cobble one together for about $15.
Download the app, plug in your homemade cable and you should be set (in theory). In a perfect world it will even transfer the artist info to your vehicle but I’m currently running into notification enablement issues between PodEmu and LineageOS.

Related

The one and only - one remote for ALL ur devcies

hey guys
dont know if anybody has explained that but its possible to create one remote for all (with most common used commands)
in my case i control my sagem iptv stb, onkyo av reciever and my samsung LE46C750
create a remote with manual adding comands and use the remote from device of ur needs
example
sagem remote for channel up,down,epg,...
onkyo remote volume up, down, sound modes,...
samsung only the menu, input and dvb input...
try it it works too with oldern devices, maybe some parents active here, the tablet is the ultimate parental control ^^
I think it's a good idea. Universal remote for basic commands then just register the device by itself for more complex commands.
Now we need a way to trick it to do macros. I'll need one icon tap that'll turn on my Sat receiver, amp, and TV, as well as sets them to the proper inputs for that activity. Another icon to tap for my BlueRay player, amp, and TV. Etc.. Until then my Logitech Harmony wins the Sofa award.
4dthinker said:
Now we need a way to trick it to do macros. I'll need one icon tap that'll turn on my Sat receiver, amp, and TV, as well as sets them to the proper inputs for that activity. Another icon to tap for my BlueRay player, amp, and TV. Etc.. Until then my Logitech Harmony wins the Sofa award.
Click to expand...
Click to collapse
^ +1 agreed. Macros would make this unbeatable!
Hmmm... I used to have a 20 something dollar sony remote that was programmable for macros. I wonder if that eoyuld work in this case...although my hrmony app for google tv does the job just fine.
There will be an update coming for the remote software either later this year of beginning of next... In the mean time, to set up one universal remote you can just add a device, sect learn from remote, choose "other" then teach it controls from all your other devices and label the buttons what you like, takes time but saves switching between devices.
What if I send a all ready made "macro signal" from my logitech multi remote to the tablet for example the on/off button?
try it out!
I tried to send a macro command to the sony tablet from my harmony remote that should turn my tv on switch it to hdmi, turn on my popcorn hour and turn on my stereo. It recognised the command but only applied the first 2 steps.
So i think the tablet is able to learn macros but not on several devices.....
Sent from my Optimus 2X using XDA App

[Q] Is it possible to make this?

Okay, I was thinking about an app to make...
The perfect idea hit my brain.
It involves using my android phone as an input device, and then controlling my Galaxy Tab with it. It would be a magic mouse, just for Android to Tablet.
I have ideas of going about this, but I'm not sure it's possible.
1. Build the mouse app on the phone, to mimic a mouse, or track pad. Then make Bluetooth functionality like the app that pairs PS3 and Android Phones. Add the track pad area, buttons, scroolbar on the right hand side, some nice GUI, and bam, it's paired and working.
2. Build the mouse app on the phone, to mimic a mouse, or track pad. Then create a receiving server app for the tablet, that includes settings, mouse speed, the connection, login, etc. Then make some kind of something on the phone to be able to connect and communicate with the tablet's server app, to allow it to be set, paired and then working.
Would either two of these be possible?

[Q] Remote control Parrot Asteroid Smart via iPad

Hello XDA.... I have an Asteroid Smart installed in the fairing of my 2013 Harley Davidson CVO Road Glide. My fairing also has the option of placing an iPad mini in front of the double din to access all things Apple/iPad. The asteroid smart is controlled via handlebar controls through the paser unika utilizing the resistive protocols (that was custom too . The problem comes in when I have the ipad mounted infront of the asteroid. Obviously, I cant see the asteroid at this point, so I have to try to remember push button sequences on my handlebars to control media sources, playlists, etc. I also can't see the navigation app from the SMART. Before suggesting that I just use the iPad for navigation, I can't as I only have the wifi version of iPad that only has AGPS for location information, not an actual GPS chip in it, so it's not really useable for navigation. Further, I find that I don't really like controlling the asteroid w/out seeing feedback on the screen in front of me.
The ideal situation would be to have VNC remote control of the asteroid via the iPad. Actually any remote control of the asteroid via iPad would be great, but I haven't been able to find any remote control soltuion for an android device that is controllable from an iPad. Sure I can find them that will allow control of android from PC or Mac or Linux, but not controlled from another tablet.
Interestingly enough, In talking with VNC, they have a VNC Mobile Server SDK that would allow for this very type of functionality. It was designed for allowing remote control of android devices via double din head units. However, they don't release it to the general public. Only OEMs, automotive companies and tier 1 suppliers... ughhh... However, they did inform me that Parrot is a licensee of this technology. (I've posted this on the Parrot forum too, to see if they can help). Can anyone offer some insight or suggestions problem?
Thanks in advance!

WORKING: Sony NSG-MR5U Bluetooth Remote

I was able to successfully pair my Sony NSG-MR5U Remote (from my old Google TV NSZ-GS7)
Keypad works great, directional pad works but the center button on the pad does not function as the "select" button. If you press the "
Enter" key, that serves as the select button as well as the play/pause option on youtube. The mouse/touch pad also does not seem to work as well. The back button and the home button work fine as well. Still playing around with it trying other buttons to see what they do in other apps.
To enable or force pair mode:
Hold Fn + the center button between the navigation arrows on the remote side. you will notice the green light flashing in a slightly different pattern than while pressing the buttons.
The 1st try found the remote but failed when trying to pair. I played around with the Fn + center button a couple more times during paring mode and it finally paired successfully.
This will more than likely work with NSG-MR7U as well.
chibluboy said:
This will more than likely work with NSG-MR7U as well.
Click to expand...
Click to collapse
I can verify that all that you have said is true for the NSG-MR7U as well. Tried it all this morning.
Someone from the kodi forums seems to have worked on a patch for the Linux Kernel, but it seems abandonned as the last threads are pretty old.
Here is the informations I've found :
The kodi forum (look the jflatt post where he says everything but the accelerometer works) : http://forum.kodi.tv/showthread.php?tid=153504
The patch (by Jason Flatt, or jflatt) : http://www.spinics.net/lists/linux-input/msg26324.html
I don't have any coding abilities, maybe some xda-dev could help create a working module for Android.
Yes...mine works as well, however the center ok button on the directional pad does not work for some reason...very annoying.
Select/OK Button
Well I got the select button in the middle of the direction pad working by installing External Keyboard Helper an app in the play store (web play store!). I then created a custom keyboard layout and programmed the select button as enter!!! Almost perfect, but still no mouse!
I would totally buy one of these if there was a way to get the mouse working! This remote was very well designed and would go great with my NP
I had been trying to get this damned remote to work with my stuff for years. short of finding a developer to create a proper working driver for it, i dont think we will have much success getting it to work completely functional with anything.
Although, i wonder if anyone with the original google tv player this remote works with, can somehow find and pull the android drivers from it? maybe someone here can tweak the driver to make the mouse and other functions work with the nexus player?
I've been playing around trying to figure something out with a different device, and found that in the root directory, going into /system/usr/keylayouts brings up a few files with a .kl extension to them. Its in these kl files that some devices are configured with scan codes. If we can find the proper scan codes for this remote, as well as the device and vendor ID, I think we might be able to create our own kl file specifically for this remote to make it do whatever we want. I think for everything except the mouse/touchpad unfortunately.
Personally im busy and wont be able to jump right onto looking into this, but if anyone is willing to beat me to it, a little research might help configure it. i dont think the mouse/touchpad is affected by this file though: there was only one other file in the folder for a device with an existing mouse/touchpad (the logitech revue, to be exact) and i dont recall seeing any sort of settings related to a touchpad or mouse other than the left and right mouse buttons, but its a step in the right direction.
You can find the device and property ID by pairing the remote to your windows pc, going into device manager and looking in properties for the remote. Not sure how to find scancodes, but if anyone is familiar with Event Ghost, I seem to recall being able to play with the remote in that program (paired to my pc) and i think i was able to pull up scancodes through the programs log. not positive though. just mentioning all of this because unless someone beats me to it, i might not be able to get to it for another month myself.
do you all think that a PS3 or PS4 remote will connect to the nexus player
Not working for me
Any idea why?
I Hold Fn + the enter key between the navigations buttons on the NSG-MR7U, hit the "add accessory" button on the Nexus Player, but it just goes on searching for accessories without finding anything. The led on the remote's side panel is blinking quickly, but as said nothing seems to be happening.
Thanks,
Roy
With the Sony Nsz gs7 remote, will I be able to control my TV & Sony audio system all by itself without connecting the Sony google tv? I understand Sony google tv has loop through and IR sensor which could be programmed for our devices. My requirement with TV & audio system is going to be very limited like power, input toggle & volume controls. Can anybody please confirm?
shahul_555 said:
With the Sony Nsz gs7 remote, will I be able to control my TV & Sony audio system all by itself without connecting the Sony google tv? I understand Sony google tv has loop through and IR sensor which could be programmed for our devices. My requirement with TV & audio system is going to be very limited like power, input toggle & volume controls. Can anybody please confirm?
Click to expand...
Click to collapse
You will not be able to control other items of equipment like you did when it was connected to the NSZ-GS7. The remote is a Bluetooth remote only. It was able to do so because the NSZ-GS7 had the ability to transmit IR. I use it connected to my media server PC, which also has an IR receiver/transmitter, and Event Ghost to turn on/off my system, control volume, and switch inputs (and d-pad and transport controls if I'm using Windows Media Center or Power DVD). But it can only be connected to a single device at a time, so I still use the stock remote to control the Nexus Player. Yeah, it's not a single remote solution, but it's the best I could come up with.
ninja_rancher said:
You will not be able to control other items of equipment like you did when it was connected to the NSZ-GS7. The remote is a Bluetooth remote only. It was able to do so because the NSZ-GS7 had the ability to transmit IR. I use it connected to my media server PC, which also has an IR receiver/transmitter, and Event Ghost to turn on/off my system, control volume, and switch inputs (and d-pad and transport controls if I'm using Windows Media Center or Power DVD). But it can only be connected to a single device at a time, so I still use the stock remote to control the Nexus Player. Yeah, it's not a single remote solution, but it's the best I could come up with.
Click to expand...
Click to collapse
Thanks for the detailed response. I hoped Sony ps3 remote would solve my problem but unfortunately I was not able to pair to Nexus player because of the pairing code issue. If only it had worked it would have been my ideal single remote.
---------- Post added at 05:15 AM ---------- Previous post was at 05:11 AM ----------
ninja_rancher said:
You will not be able to control other items of equipment like you did when it was connected to the NSZ-GS7. The remote is a Bluetooth remote only. It was able to do so because the NSZ-GS7 had the ability to transmit IR. I use it connected to my media server PC, which also has an IR receiver/transmitter, and Event Ghost to turn on/off my system, control volume, and switch inputs (and d-pad and transport controls if I'm using Windows Media Center or Power DVD). But it can only be connected to a single device at a time, so I still use the stock remote to control the Nexus Player. Yeah, it's not a single remote solution, but it's the best I could come up with.
Click to expand...
Click to collapse
Thanks very much for this info. I am yet another person who loves this little remote. I have the MR7U and am attempting to use it with my windows 7 Pc running Kodi. So far I got it paired to my Samsung Note 5 just to play around with. I still need a Bluetooth dongle for my PC, are there any you recommend? Also, I am interested in what you used as an IR transmitter for your PC. I read about Eventghost and have an idea of what it's about. I did notice what you said about the "ok" button not working. I have a harmony remote with IR and RF but I really need the keyboard so I've committed to the idea of using the MR7U and retiring the Harmony. I'm confident I can get the MR7U to do what I want with kodi, but I want to be able to use it to also transmit IR to my Sony receiver and Bravia TV. Can I use the PC IR transmitter to turn on the TV, control the volume on my receiver and control Kodi simultaneously? Any info shared is greatly appreciated!
Jaygatesny said:
Thanks very much for this info. I am yet another person who loves this little remote. I have the MR7U and am attempting to use it with my windows 7 Pc running Kodi. So far I got it paired to my Samsung Note 5 just to play around with. I still need a Bluetooth dongle for my PC, are there any you recommend? Also, I am interested in what you used as an IR transmitter for your PC. I read about Eventghost and have an idea of what it's about. I did notice what you said about the "ok" button not working. I have a harmony remote with IR and RF but I really need the keyboard so I've committed to the idea of using the MR7U and retiring the Harmony. I'm confident I can get the MR7U to do what I want with kodi, but I want to be able to use it to also transmit IR to my Sony receiver and Bravia TV. Can I use the PC IR transmitter to turn on the TV, control the volume on my receiver and control Kodi simultaneously? Any info shared is greatly appreciated!
Click to expand...
Click to collapse
Even though it's slightly off-topic for using the MR5U/MR7U with the Nexus Player, I'll try and answer some of your questions. First, as far as the PC Bluetooth dongle goes, I just bought a generic cheap one off of eBay for under $5 (USD). Just search for 'usb bluetooth dongle' or 'usb bluetooth adapter'. As far as the "OK" button not working, I believe that was only when it was directly paired with the Nexus Player. All buttons seem to work fine for me when paired with my PC.
Second, I am using a Gateway USB IR receiver (like http://www.ebay.com/itm/GATEWAY-USB...967892?hash=item33ad7cc714:g:PUIAAOSwnH1WWmvY). Also cheap, also off of eBay. It used to be used for receiving IR as well when I had the Sony NSZ-GS7 and I had it blasting its TV and receiver IR codes to my PC instead. But now I just use it as an IR emitter controlled by EventGhost.
You should be able to do everything you want as far as device and app control. The only gotcha I encountered is that I had to disable the Windows 'Human Interface Device Access' service (hidserv). Because the remote pairs as a HID device, there are some buttons that Windows was interpreting automatically. Like the volume and menu buttons. If you want volume to control your receiver, then you need to disable the service to prevent Windows from adjusting its own volume. But it's all very doable. I use the MR5U remote to power my enter system on (TV, receiver), change volume of my receiver, switch inputs on my receiver, and control Windows Media Center or PowerDVD when I have to switch away from the Nexus Player to watch live TV or play a physical disc that I haven't ripped into Plex yet. Just have to have the time and the determination to do it.
ninja_rancher said:
You will not be able to control other items of equipment like you did when it was connected to the NSZ-GS7. The remote is a Bluetooth remote only. It was able to do so because the NSZ-GS7 had the ability to transmit IR. I use it connected to my media server PC, which also has an IR receiver/transmitter, and Event Ghost to turn on/off my system, control volume, and switch inputs (and d-pad and transport controls if I'm using Windows Media Center or Power DVD). But it can only be connected to a single device at a time, so I still use the stock remote to control the Nexus Player. Yeah, it's not a single remote solution, but it's the best I could come up with.
Click to expand...
Click to collapse
ninja_rancher said:
Even though it's slightly off-topic for using the MR5U/MR7U with the Nexus Player, I'll try and answer some of your questions. First, as far as the PC Bluetooth dongle goes, I just bought a generic cheap one off of eBay for under $5 (USD). Just search for 'usb bluetooth dongle' or 'usb bluetooth adapter'. As far as the "OK" button not working, I believe that was only when it was directly paired with the Nexus Player. All buttons seem to work fine for me when paired with my PC.
Second, I am using a Gateway USB IR receiver (like Also cheap, also off of eBay. It used to be used for receiving IR as well when I had the Sony NSZ-GS7 and I had it blasting its TV and receiver IR codes to my PC instead. But now I just use it as an IR emitter controlled by EventGhost.
You should be able to do everything you want as far as device and app control. The only gotcha I encountered is that I had to disable the Windows 'Human Interface Device Access' service (hidserv). Because the remote pairs as a HID device, there are some buttons that Windows was interpreting automatically. Like the volume and menu buttons. If you want volume to control your receiver, then you need to disable the service to prevent Windows from adjusting its own volume. But it's all very doable. I use the MR5U remote to power my enter system on (TV, receiver), change volume of my receiver, switch inputs on my receiver, and control Windows Media Center or PowerDVD when I have to switch away from the Nexus Player to watch live TV or play a physical disc that I haven't ripped into Plex yet. Just have to have the time and the determination to do it.
Click to expand...
Click to collapse
I'm determined! Haha. I'm going to be ditching cable TV for a few months so Kodi and ps4 will be my only devices. I'm following everything you've said and am very confident at this point. The last question I have is, how do you make the PC's IR emitter send the correct codes to the TV and receiver (on/off, volume, input)? Is there software I would need to learn/program the correct codes to blast? I'm mean there has to be right? Thanks!
Jaygatesny said:
I'm determined! Haha. I'm going to be ditching cable TV for a few months so Kodi and ps4 will be my only devices. I'm following everything you've said and am very confident at this point. The last question I have is, how do you make the PC's IR emitter send the correct codes to the TV and receiver (on/off, volume, input)? Is there software I would need to learn/program the correct codes to blast? I'm mean there has to be right? Thanks!
Click to expand...
Click to collapse
There are a couple of ways to accomplish this--assuming you are using EventGhost. The most fool-proof way is if you can find the Pronto remote HEX codes for the device(s) you want to control (the Files section of remotecentral.com is your friend). EventGhost has the ability to enter these codes for emitting IR. Otherwise, depending on the IR receiver/transmitter you buy, the IR plugin for EventGhost will allow you to "learn" a code from a remote. I've found this route to be a bit trial-and-error, though. As there are things that can affect the accuracy of the capture, like distance, the time you hold the remote button down for, etc. If you use this method, expect your workflow to be capture/test until you actually get the captured waveform to control your device.
ninja_rancher said:
There are a couple of ways to accomplish this--assuming you are using EventGhost. The most fool-proof way is if you can find the Pronto remote HEX codes for the device(s) you want to control (the Files section of remotecentral.com is your friend). EventGhost has the ability to enter these codes for emitting IR. Otherwise, depending on the IR receiver/transmitter you buy, the IR plugin for EventGhost will allow you to "learn" a code from a remote. I've found this route to be a bit trial-and-error, though. As there are things that can affect the accuracy of the capture, like distance, the time you hold the remote button down for, etc. If you use this method, expect your workflow to be capture/test until you actually get the captured waveform to control your device.
Click to expand...
Click to collapse
You have been an extraordinary help. I think I'm ready to start ordering what I need and getting my hands dirty. One last thing. Does the IR emitter you have come with software or just drivers? The only gap in my fully understanding this is how to tell Event Ghost to tell this emitter what codes to push once I have them? Thanks again, and I will report back with any info I encounter that could help others.
Jaygatesny said:
You have been an extraordinary help. I think I'm ready to start ordering what I need and getting my hands dirty. One last thing. Does the IR emitter you have come with software or just drivers? The only gap in my fully understanding this is how to tell Event Ghost to tell this emitter what codes to push once I have them? Thanks again, and I will report back with any info I encounter that could help others.
Click to expand...
Click to collapse
There are no drivers or software for the IR receiver/emitter. Windows is able to recognize it directly. From EventGhost, you will use the 'Microsoft MCE Remote - Vista/Win7' plugin (plus a service that it installs) in order for EventGhost to generate events on incoming IR and to send out IR (either from Pronto HEX codes or via capture). To use the MR5U/MR7U, you will use the 'Generic HID' plugin to perform actions on the button press events. The list of EventGhost plugins can be found here: http://eventghost.org/docs/pluginlist.html (some have links to individual documentation posts). So neither the IR receiver/emitter nor the Bluetooth dongle needed any extra drivers...they just worked out of the box.
ninja_rancher said:
There are no drivers or software for the IR receiver/emitter. Windows is able to recognize it directly. From EventGhost, you will use the 'Microsoft MCE Remote - Vista/Win7' plugin (plus a service that it installs) in order for EventGhost to generate events on incoming IR and to send out IR (either from Pronto HEX codes or via capture). To use the MR5U/MR7U, you will use the 'Generic HID' plugin to perform actions on the button press events. The list of EventGhost plugins can be found. (some have links to individual documentation posts). So neither the IR receiver/emitter nor the Bluetooth dongle needed any extra drivers...they just worked out of the box.
Click to expand...
Click to collapse
Understood. I watched some tutorials about event ghost and have a basic understanding now. Also won that gateway ir blaster just now. Just gotta order the bluetooth dongle tonight. Should be good to go soon! Will report back in a couple weeks. Thanks greatly!!

Controlling android OS with directional pad / joystick / keyboard over USB

Hello,
I have a PCB that is communicating with an android handheld via an FTDI chip and USB UART connection.
The PCB handles a d-pad over a serial connection, also has a few other un-mapped hard keys. These button depresses are currently sent up to the android level as a single event command.
What is the best way of having the android OS recognize the d-pad controls natively, as in I would like to map a home button, back, menu etc as well as the d-pad
It seems as though there are already provisions made within the android OS to handle full external keyboards and joysticks etc
If someone has achieved something similar, such as connecting a serial joystick/dpad/keyboard over USB bridge, please chime in.
Thank you for everyones help in advance.
BUMP!!
willing to pay for someone to help figure this out!
$$$$$$$$$$$$

Categories

Resources