USB stream work - help? - Java for Android App Development

Hey guys,
I am currently developing my school project application, but I am kinda stuck.
I would like to connect my phone to my car through USB cable and recieve car's data, like RPMs and so.
I have the OBD cable and the reduction as well.
I have found this lib: https://github.com/pires/obd-java-api
I would like to use it, but it is intended to be used with BT.
Is there anybody who could help me achieve what I want to do? I want to know how to do pooling with USB so I can get car's data in realtime.
I can pay some little money if you wish too.
Thanks.

Related

[Q] Audio Through USB

I'm currently aching to be able to play my own music through my car speakers, weird place for this yes.. if it's the wrong section to post this please let me know.
But, I was wondering if it's at all possible to feed the phone's audio through the USB.
For example, I have a USB port on my stero in my car, and when I plug it in..i'm able to feed off my SD card to play the music thats on it. But.. I'd like to be able to play pandora as well..which I'm currently unable to do.
Was wondering if this is possible. If i've confused you feel free to ask more questions
XtaC318 said:
Since it isn't possible.. what about an app that allows me to control the music played? I can stream music from the sd, but its got to mount to read therefore I don't have access to the stock music app. Only way to control what's played is the buttons on the stero and its pain staking..
Click to expand...
Click to collapse
I don't believe this is possible. As far as I know, when you use the usb the deck itself is decoding the mp3's (or whatever music files you're using) directly. It doesn't support playing music through the usb, it just uses the usb to get the files. I hope that makes sense...
So is that why I ca never plat music on my xbox whenever I have a phone hookedup to charge? I thought my xbox just didn't play nice with phones
Sent from my SPH-D700 using XDA App
XtaC318 said:
I'm currently aching to be able to play my own music through my car speakers, weird place for this yes.. if it's the wrong section to post this please let me know.
But, I was wondering if it's at all possible to feed the phone's audio through the USB.
For example, I have a USB port on my stero in my car, and when I plug it in..i'm able to feed off my SD card to play the music thats on it. But.. I'd like to be able to play pandora as well..which I'm currently unable to do.
Was wondering if this is possible. If i've confused you feel free to ask more questions
Click to expand...
Click to collapse
So your car stereo has a USB input but no auxiliary? If so, your best bet would probably be to get an FM transmitter. Like the poster above said, your car's stereo is merely mounting your phone as a mass storage device and reading the mp3 files off the SD card and decoding and playing them locally.
It sees it as you do on the computer, just a drive. The only way to get what you want is to use a source from the phone that plays audio. Head phone jack or Blue Tooth. Your stereo... if it has USB should also have an AUX input or BT. Havn't come across to many that have USB and not an AUX or BT. Its nice though... having Pandora in the car.
If you tell me the Model of the Stereo I can help you out. I have seen a BT to FM Mod. Those are kinda cool. If your in a pinch with a stock stereo.
Sent from my SPH-D700 using Tapatalk
a454nova said:
It sees it as you do on the computer, just a drive. The only way to get what you want is to use a source from the phone that plays audio. Head phone jack or Blue Tooth. Your stereo... if it has USB should also have an AUX input or BT. Havn't come across to many that have USB and not an AUX or BT. Its nice though... having Pandora in the car.
If you tell me the Model of the Stereo I can help you out. I have seen a BT to FM Mod. Those are kinda cool. If your in a pinch with a stock stereo.
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Makes sense. My stero does have an auxiliary port on it, but due to recent events I'm really short on cash lol, was wondering if there was a work around so I'm not limited to my sd for music.
Since it isn't possible.. what about an app that allows me to control the music played? I can stream music from the sd, but its got to mount to read therefore I don't have access to the stock music app. Only way to control what's played is the buttons on the stero and its pain staking..
XtaC318 said:
Makes sense. My stero does have an auxiliary port on it, but due to recent events I'm really short on cash lol, was wondering if there was a work around so I'm not limited to my sd for music.
Since it isn't possible.. what about an app that allows me to control the music played? I can stream music from the sd, but its got to mount to read therefore I don't have access to the stock music app. Only way to control what's played is the buttons on the stero and its pain staking..
Click to expand...
Click to collapse
Nope... The phone isn't even connecting to your stereo. When you put it into USB mode so it can read the SD, it unmounted from the phone. Its as if you pulled the SD out and slid it into a card reader. When you pull the plug... It will remount to the phone. You'll notice it scanning for media at the top.
Now when you go BT... You can control it via the stereo or phone, using the Aux you can control it by the phone. "They" could make the phone controllable via USB like an Iphone but they would have to built that into the stereo like they do the Iphones/Ipods. Not likely to happen unless the Galaxy S takes off like IPOD did.
In theory, a rooted Epic with proper kernel support and hacked cable (since they don't exist commercially) can repurpose the data pins on its USB port for left and right analog audio thanks to the Fairchild FSA9480 USB switching chip inside the phone (the same chip enables the USB pins to be repurposed as a serial port with nonstandard voltage levels, enables the normally-unused fifth pin to be used as mic input, enables it to be used with a special "JIG" interface for JTAG reflashing without having to hand-solder anything to the microscopic internal pads, and apparently can also work its magic in conjunction with a chip by Silicon Imaging to use 5 pins to output a signal that can be transformed by a companion chip (embedded in the cable's connector shell) into valid HDCP-compliant HDMI. I'm pretty sure the 9480 can also repurpose the two data pins for external I2C, but don't quote me on it.
Check out the I9000 boards... they're about 2 months ahead of us. If you google for FSA9480, you can find a brief (but revealing) dialogue between a Samsung engineer and the Kernel.org folks regarding a kernel addition to support the chip. He had a few issues, because on one hand he's apparently not allowed to say much about how the chip works or what it does, but the kernel folks managed to wring much of it out of him one juicy detail at a time. If you check Fairchild's site, they don't even acknowledge that the chip EXISTS, but it's been photographed inside all the Galaxy S phones in various teardowns.
In English -- yes, the hardware exists today to connect your phone to a stereo's analog inputs via a cable that repurposes the USB port... but the official software to make it work from Samsung and Sprint doesn't exist, and the information needed to make it work ourselves on a rooted Epic with AOSP isn't quite available yet.
I'm personally quite happy about the uart, because that means we DO have an easy, low-ceremony way to do i/o between something like a gamepad built into a hardcase a-la-iphone-GameBone that doesn't require Bluetooth (note that if something IS using the USB port for UART purposes, the USB port is still active, but the phone sees it as having nothing connected because the signals from the D+ and D- pins are physically re-routed by the 9480 to the CPU's UART pins. Think of the 9480 as being like an old-fashioned telephone panel with cables that can be moved around to connect the USB port's 5 physical pins to different pins inside the phone.
I'm now pretty sure that this is why there are exactly 7 contacts on the microUSB connector inside the phone -- 5 are used to get the pre-HDMI signals out of the phone, and the other 2 (3, if you count the ground/anchor tabs and assume they carry a signal as well in addition to mechanically anchoring it in place) are used to supply +5v and ground, and possibly one wire for half-duplex signaling purposes.
Wow that was a lot of info... lol. I didn't know that about the usb tho. That's good to know. I was thinking of taking it apart to see.
But... I think he's wanting a UI via the USB like the way some players will do for the IPODs, not analog. To go throught all that when the Head Phone jack will do the same... I could only see that if it was broken or if you really really want only one cord to the phone.
; )
Sent from my SPH-D700 using Tapatalk
I've got an Alpine unit, I hook my USB up - turn on the TUNER. Mount the Drive and once the phone is done - swap back over to USB and i can get all my MP3S. sadly I get all of my ringtones too - odd when the radio is full blast and a track changes - none the less works well for me. Try it.
I purchased this Kensington LiquidAUX Bluetooth Car Kit for my phone a few days ago. It works perfectly on my sister's iPod touch (no AVRCP [silly apple]) and an old WinMo 6.1 phone.
I just got my Epic in the mail today so I'll be testing it out soon.
WTF. AVRCP (bluetooth remote control) is really buggy with this phone. I used the LiquidAUX with an old Omnia for a week with no problems. The Epic connects and plays audio just fine. I can also pause and play music but the forward and back buttons don't work. When I first pair the phone with the device everything is fine, but after disconnecting and reconnecting the remote control stops working. I got it to work after un-paring and re-pairing but it only worked once.
The Moment I had before this had really choppy audio.
EDIT: I had the phone opened up in DDMS and the phone is receiving signals from the remote. But it only reacts to them when the media player is on the screen. Weird.

[Q] How to connect to car audio system via USB?

I wanted to know how to connect via USB to my cars audio system.
I used this tutorial: http://www.mobiletechworld.com/2010/11/18/use-your-windows-phone-7-device-as-a-portable-usb-drive/
I can now store and retrieve picture files from the phone but I still cannot play music files on my cars audio system. It seems as if the phone turns off this feature when my cars head unit tries to communicate with it via USB.
I also cannot connect via bluetooth.
I have read that some folks have been successful in implementing this feat. I really dont want to use the headphone jack because I cannot control the phones audio via my head unit. I guess I am looking to set it up legacy style like my previous phones eg iphone, nexus one, milestone etc.
Any advice would be greatly appreciated.
The portable USB 'trick' doesn't make the device a USB Mass Storage device. It's a client-side registry modification that only makes the device viewable in windows explorer (legacy mode). It's still running its communications over the proprietary MTPz zune-sync protocol. This is why after running the registry modification, you can't just plug your WP7 into another computer and have it pop up, and also why it requires the Zune software to be installed, and to sync up first for it to work.
This is also why it won't/can't work with your USB capable audio system. It has absolutely no ability to do Zune protocol sync (as far as I'm aware, Kenwood made a head unit that could, but I don't know if it works with WP7. I'd doubt it), and despite the misreporting of various sites, your WP7 is not magically now a mass storage device.
Bluetooth may or may not work. I don't know about A2DP support on either your car's head unit, or WP7, and it may be specific to the device/manufacturer as to whether this is present (I have no idea). If bluetooth doesn't work, you're pretty much **** out of luck.
Headphone jack is your best (only) option. I can't recall if the supplied headphone cable has inline media controls. If so, you could probably macguyver that into a line-in cable for your stereo and use the media controls on that. Ghetto, but workable.
wow, that really sucks.. I am liking this phone less and less...

Alpine Deck support on Samsung Galaxy S2

Hi Guys,
I got a Alpine Deck (ida-x100) in my car and everytime I plug in the SGS2 it makes the USB Connect noise continutiously and doesn't detect, I had a HTC desire and the phone worked with no issues (just no library support) Does anyone know if there is a way to resolve this issue?
It would be awesome if you could emulate the iphone library environment and make it compatible with Android!
Hi man, you can buy the alpine 400 kce bt receiver for ida x100 (I've got it too) and connect ur phone with this; the results are very very nice...handfree call, music, vocal command ecc ecc
Thanks man, might consider it
How do you control music/audio? is it via the alpine deck or the phone UI?
Also - what do you use for voice control? vlingo?
vincheesel said:
Hi Guys,
I got a Alpine Deck (ida-x100) in my car and everytime I plug in the SGS2 it makes the USB Connect noise continutiously and doesn't detect, I had a HTC desire and the phone worked with no issues (just no library support) Does anyone know if there is a way to resolve this issue?
It would be awesome if you could emulate the iphone library environment and make it compatible with Android!
Click to expand...
Click to collapse
I had this same problem (constant connection bleep and storage not found). Alpine Support said the phone is not compatible but this is incorrect. You need to connect the phone as a Mass Storage device, not as a phone.
To do this select Settings > Wireless and Network > USB Utilities > Connect Storage to PC. Then connect to the Apline headunit via USB and I think you have to select Connect again on your handset. You have to scroll down through the first menu on the headunit to Music and hey presto.
Whilst in mass storage mode I do not think the handset has any other functionality. Personally, I am just going to keep a large USB stick in the car so that I can use the phone for GPS and calls (safely, obviously!)
Worth bearing in mind the Alpine only works with MP3 AAC and WMA.

Car installation headache

Ok, so I've been trawling the threads for hours and the time has come to make my first post on this..
Here's what I really want to do, and whether or not, as I understand, I can do it:
Nexus 7 in dash, 3G model - fine, been done loads of times
250GB USB HDD, connected via USB OTG, containing my music library - possibly, depends on my hard drive? Will it work if I can provide a secondary source of power to the HDD (my caddy allows this)
Charge the N7 at the same time - again possibly, with CM10 and kernel mod? Also new to Android so shooting in the dark a bit here.
OPTIONAL/BACKUP IDEAS:
Wi-Fi drive of some sort - If it works then maybe, seems like an extreme option though for a car install.
Google Music and stream my entire collection (I have 15GB monthly data sim that I can use in the N7) - will work but not ideal for me. I have a lot of lossless music which I won't be able to take advantage of this way. Which brings me on to...
USB DAC through OTG cable - possible I know, but to do this on top of the other stuff is gonna be difficult and unreliable? Can live with just the headphone jack output for the time being, unless:
Utilise the pogo pins for a line out and charging - would be a nice solution in the car but again, possible?
It would be fantastic if someone could tie this all together simply for me somehow, or if anyone has any far better ideas for what I'm trying to do :good:
Also feel free to ridicule my noob-ness
Cheers

Quickest way to output audio from phone to headunit via USB?

I have a no-brand full android headunit running 6.xx, just wondering what the quickest way to output audio from my phone to the headunit via USB would be?
There really isn't, and if there is outs goings to be complicated and messy. USB is used to transfer data and charge. You would need to take multiple steps to transfer the music then get something to find out and something else to play it ... Unless you get something that does mirroring and it might work with USB ... Might ...assuming you have USB data ports on the hu
Sent from my SM-G950U using Tapatalk
Search for a Zbox. It will cost you about $50 and it will allow you to connect Android phones up to V7 and any iPhone over iOS8 using CarPlay and Android Auto.

Categories

Resources