Send raw information to external port - Android Software/Hacking General [Developers Only]

Just wondering if it is possible to send raw information(1 0/on off, whatever) to say the audio port or the USB port. I would assume USB would be easier to code for, but the audio port would be preferred if possible. The obvious application of this would be for custom external peripherals which would be fun to mess with. If anyones got any info or a link to some docs that would help immensely.
Thanks.

Using Audio to communicate is entirely possible. It has been done for decades over telephone lines. http://en.wikipedia.org/wiki/Modulation
USB on the other hand is a bit problematic, there's no host support on most android devices (there exist hacks for some) so there's no real way of connecting a USB peripheral to the phone.
Your best shot would be bluetooth I believe. I'm not entirely sure but you should be able to set up a serial connection over bluetooth.

Fulkerson said:
Using Audio to communicate is entirely possible. It has been done for decades over telephone lines. http://en.wikipedia.org/wiki/Modulation
USB on the other hand is a bit problematic, there's no host support on most android devices (there exist hacks for some) so there's no real way of connecting a USB peripheral to the phone.
Your best shot would be bluetooth I believe. I'm not entirely sure but you should be able to set up a serial connection over bluetooth.
Click to expand...
Click to collapse
If Audio is possible then I think that would be the best bet. I just found this bag of IR LEDs laying around from when i was messing with wiimote hacks, so i thought hacking up a little light coming from some port on the device, i could make a remote app for it.
Found some good information for anyone else wanting to make use of the audio port.
http://perceptumvolo.blogspot.com/2010/01/demodulator-updated.html

Using audio is definitely very cool, but for real world use it is too intrusive. You can't listen to music at the same time and all notifications will screw things up. Bluetooth just works and was invented for this purpose.

Related

hardware based data transfer

Hi!
I want to use my G1 to do some special measurements. For this purpose I've created a microcontroller board (Atmel ATmega8) that does that. Now I want to transfer the data the board collected to the Android phone.
Because of the high powerconsumption the G1 has while Bluetooth is on this isn't a real alternative for me - the measurements will last about 2 - 3 hours.
I'm not experienced concerning hardware access within Linux and Android but thought there might be a possibility to gain a kind of low level access to the USB port. I do neither need high bandwith nor real USB functionality - so might it be possible to create an own kind of bus using that interface? Do you have any other idea?
Thank you in advance!
If you use micro linux system, the ones that are like a usb port, a network jack and a vga connecter, you could script some adb commands and have it run every few seconds to upload the data, not an ideal solution. As far as I know the g1 doesn't support host mode. But if you have a micro linux computer in the middle, it could work.
Something like this
http://www.pcpro.co.uk/blogs/2008/08/27/a-real-space-oddity-arrives-at-pc-pro/
I'm sure there are other ways to do it, maybe check there how to make a serial port thread a few pages back in the dev section.

[Q] Wired Remote/Control Panel?

I've got a question I have not been able to find a definitive answer to.
Everyday other day on a blog I read I am seeing someone has created a robot controlled via an application running on a iPhone/Android, using either Bluetooth or Wifi.
But my question is, can an android device function as a wired remote via the usb port?
Is there any IO class for the USB port that can be used to turn on various things and read back various sensor information given the propper platform?
Am I seeking USB Host mode or is that something else?
My goal is to have an android device running an application monitoring various sensors and controlling various other hardware devices with a nice touch screen interface if possible. Since the phone would be located with the control hardware using Bluetooth for this seems silly if I am able to use USB and a cable from the Android Device to the Control Hardware, essentially making the android device the brains.
thanks in advance guys!
Nobody has any feedback on this?

[Q] USB/ Bluetooth development for special devices.

I just bought a TF700. I've never written a single line of code for an Android device. I've done some Linux development.
I want to build an app to control a Zoom HDZ300 AM/FM radio. It can be controlled remotely by simple messages sent to its serial port, but apparently the sending device does need to handle flow control.
The sound output is regular analog stereo. That will go into an amplifier, not my Android.
Does the Android operating system (Ice Cream Sandwich or Jelly Bean) allow programmers direct access to the USB or Bluetooth stacks so that one can enumerate devices and send/receive raw data to/from them ?
I am hoping to use the ASUS stand alone USB adapter, a USB hub and a USB serial port adapter to interface to the radio. I'd put a link here to the device, but I'm a newb and newbs are prevented from linking in their first 10 posts.
Does anyone see a problem with doing this ?
How would a Bluetooth Serial adapter work instead ? From the OS point of view, which would be easier/better to use ?
Thanks
I'd also like to connect and use an external USB sound "card". What are the issues with doing that ?
Thanks

[Q] Radio on my phone?

I've got a Sony Xperia z, and I want to start playing around with what I can do with it. One idea that occurred to me was expanding its radio capabilities. I basically want to turn it into a mobile ham station. I want to be able to scan HF, VHF, and UHF frequencies and transmit on them... I have a basic idea of how to make the hardware for this project to work, but I have no idea what to do on the software side. I know the Z comes with the built in ability to listen to FM radio and it uses your headphones as an antenna, so I'm making two assumptions with that in mind: the input source comes in through the headphone jack, and this source can be expanded to other frequencies depending on what I plug into it. The wall I run into is I suck at java development. It's been years since I've used any programming language, and I know even less about hard ware/software integration on a mobile platform. Can anyone point me in the right direction to pursue this project?
Ok, how about this: I'm willing to pay someone to dev the app for me. I started looking into what it would take for me to program this and it's way beyond the scope of my skills. I was looking at buying a laptop just to work on this project, but I would rather spend the money on a quality product. Here's exactly what I want it to do:
A. Receive
1) Receive radio signals in the medium wave (mw) band all the way up to the VHF band.
2) scan a range of frequencies, with step options (I.e. Start a scan at a user in putted freq and then stop at another inputted freq and have the option to step up in increments as low as 0.001hz as the user desires)
3) store frequencies into a scannable Database or store freqs into a database of freqs to skip over
I'm assuming this would all be done by pulling in a signal from either the headphone jack or micro USB port.
B. Push a signal back out through the same port. So basically a receive or transmit mode. I get that phones don't have a built in transceiver. I can do the hardware as long as I have a signal going in one direction or the other and an app to interpret it.
So with pushing a signal back out I would like the option to either broadcast a stored file or directly from the microphone.
Now as for pay I was looking at spending 300 on a laptop so I could push that cost to a developer instead. Any mods after the initial app is finished would come with additional pay. Add on mods that is, not debugging issues. Any takers?
BranSidhe said:
Here's exactly what I want it to do:
A. Receive
1) Receive radio signals in the medium wave (mw) band all the way up to the VHF band.
Click to expand...
Click to collapse
Have you seen detailed specs on the radio? All I can find is that they identify if as "FM radio", so it is most probably just the VHF commercial broadcast band (88-108MHz). It is very unlikely that they would include a more expensive multi-band radio. A single-band VHF-FM broadcast band receiver would be much smaller than a multi-band receiver.
2) scan a range of frequencies, with step options (I.e. Start a scan at a user in putted freq and then stop at another inputted freq and have the option to step up in increments as low as 0.001hz as the user desires)
Click to expand...
Click to collapse
I think this part would be native code -- C language.
3) store frequencies into a scannable Database or store freqs into a database of freqs to skip over
Click to expand...
Click to collapse
And this would probably be handled by an Android application in Java.
I'm assuming this would all be done by pulling in a signal from either the headphone jack or micro USB port.
B. Push a signal back out through the same port. So basically a receive or transmit mode. I get that phones don't have a built in transceiver. I can do the hardware as long as I have a signal going in one direction or the other and an app to interpret it.
So with pushing a signal back out I would like the option to either broadcast a stored file or directly from the microphone.
Click to expand...
Click to collapse
I don't think I understand you completely but it is very unlikely that this radio has a transmitter. It is very likely only the VHF-FM single-band receiver, 88-108MHz in the US. With a rooted device you could probably create software which will scan and otherwise select frequencies but it would be useless to make the steps any smaller than 200kHz, unless you wanted to listen for very low power interstitial transmissions. It almost certainly will not transmit.
Again, do you have detailed specs on the radio? This job isn't for me though -- I don't have the device and I no longer have a suitable working environment for this kind of work.
Frank
ADDED:
Also, FM is essentially useless below 6-meters, although there is some rare Ham usage in HF.
Frank
Oh the phone def doesn't have a transmitter native to it. My thought process is to hook the phone up to a transmitter through either the USB port of the headphone jack and have it transmit that way.
I want the phone to be the interface of the system. I was thinking something like this: techlib.com/electronics/allband (it's .htm, I can't post full links yet) inline with the antenna and the phone (I.e. Antenna -> receiver/transceiver -> phone). The biggest problem I run into is I don't know how to make the phone work with whatever I plug into it.
And yeah, I accidentally left the g off of .002ghz so 2000 kHz is completely accurate.
BranSidhe said:
Oh the phone def doesn't have a transmitter native to it. My thought process is to hook the phone up to a transmitter through either the USB port of the headphone jack and have it transmit that way.
I want the phone to be the interface of the system.
Click to expand...
Click to collapse
That is reasonable. You could even use the device to work some of the data modes on a suitable tranceiver. I think I've seen this done with the Palm, so the Palm might be a source for some of the code.
The biggest problem I run into is I don't know how to make the phone work with whatever I plug into it.
Click to expand...
Click to collapse
I have not looked at the USB interface yet -- my last serial work was RS-232 -- so I don't know what these things will let us do.
These Linux/Android devices have been out for several years and there might already be some software for this -- have you looked?
Seven more posts.
Frank
I have been looking around for quite a while now. There is a ton of software for turning a computer into a controller station(SDR), but not a lot for mobile devices. Wolphi .com is the best I've seen so far, but their device isn't what I'm looking for. I don't want to have a full separate radio, just an inline receiver/transceiver and have all other "radio" functions controlled by the phone. I dunno maybe I'm reaching here.
Thanks for all the input so far btw
BranSidhe said:
There is a ton of software for turning a computer into a controller station(SDR), but not a lot for mobile devices. Wolphi .com is the best I've seen so far, but their device isn't what I'm looking for. I don't want to have a full separate radio, just an inline receiver/transceiver and have all other "radio" functions controlled by the phone. I dunno maybe I'm reaching here.
Click to expand...
Click to collapse
Back in 2003 and 2004 I wrote a controller on Windows NT for my FT-897, and that was not a difficult task because I wrote it as a command line program -- no GUI. Are you intending to build your own radio, or just an interface for the phone/radio connection?
I looked at a few of the applications at wolphi.com and they all use only audio input and decode the audio signal. To control the device you would need USB, as you said. If no one has done this yet for any radio then maybe there is something in the USB implementation which limits it. I would probably have tried it by now if I were still licensed and had a radio to try it with, so I'm really surprised that a controller hasn't already been written.
I'm pretty sure I saw a controller written for a Palm PDA to control the Yaesu portable low power HF radio. I don't recall if it actually did any keying and transmitting though.
I don't think you are reaching too far. It seems to me that this can be done and it would be very useful if you do accomplish it.
Frank
ADDED 07:42:
After thinking back I recall that I had two or three connections between my radio and computer. An RS-232 serial cable connection was used to send commands to the radio and to receive replies from it. There was also one or two connections to send and receive audio; this was through two ports on the computer but I can't recall if it was separate connections or a combined connection on the radio.
The program I wrote had several options and one of them was to function as an echo repeater: it recorded a signal when the squelch broke and then retransmitted that recording when the transmitting station's carrier ceased. It was handy for other hams to hear what their station sounded like. An Android controller would probably use the same dual connection; for example, a command is sent through USB from Android to radio to key the transmitter then outgoing audio is sent through the headphone port; then the radio is unkeyed through the USB port.
The Android application will be a fairly typical Android application, except that is would communicate with a native Linux application that communicates with the USB port. This does not seem difficult to me and I'm really surprised it hasn't been done.
SGH-I717(AoCP6.4), SM-N900V/MI9(dlV), XDA Premium

Chinese WinCE 6.0 car stereo switching between USB functions

Hello everyone!
I hope there isn't a topic already for this, but I searched and didn't find anything, mostly also because it's kind of difficult to describe my problem.
To begin with. I have one of those chinese car stereos that run WinCE 6 in my car. It's not the first one, I actually went through quite few of them to finally find one that suits me. I thought I did, and mostly it's true, but there is still one feature that bugs me a bit.
My stereo has two USB ports. One, mini-USB on front - for music/videos/pics, second, full size USB on the back - for 3G/WiFi adaptor. This is as described by the manufacturer/seller.
Now, obviously, many of us would think, that since it's "universal serial bus", it shouldn't matter what I put in which port. So the rear port should accept music on USB flash drive and front port should work with 3G modem. Right? Right? Wrooong!!!
For whatever reason, my stereo only accepts music in the front port, with annoying little cable that is to convert the mini-USB to full size, just bumping up and down as I drive. Also, since I have a built-in USB port, which I would like to use for this and plug it's connection to rear port on the stereo, bugs me a lot.
But no, the rear port only works with the 3G modem and seems to completely ignore any flash drive connected to it.
What's funny though is, that the front port actually works with the 3G modem too! So the front is a "2in1", but the rear is only designated for 3G/WiFi.
Since I don't want to let this just go and get used to it (+ my OCD is fighting heavilly with me on this, lol ), I started to look around to figure out what might cause this. I loaded Total Commander on the unit and plugged two flash drives to the stereo. Both with music files, both formatted the same. In totalcmd it showed them as USB (front) and USB1 (rear) (or something similar, the key part is the "1"). It always added the "1" to the rear one, even though it was connected alone, without the front one.
Now, this is where I believe the problem is. I think/hope/wish that the music application on the stereo only works when pointed to the "USB" (front) device. Since there is probably no way to decrypt and re-program the music app, I was thinking about renaming the USB connections, or, basically switching them for each other.
So to get (finally) to the bottom of my question, is there a way to switch the description/name/purpose of the USB ports in WinCE 6.0 platform, preferably of course in a way that it would stay like that even after restart?
Many many thanks for any help or pointing me to the right direction! Also please let me know if there is some detail that might help identifying the problem.
Today I installed an app called USB Device Info from the play store. What it shows is that it cannot connect because of SeLinux.. CLUE?? So I went ahead and looked on how to connect via USB with Linux. I downloaded Terminus from Play Store and was able to read the files. Previously, I read it's a 'read only' connection. I'm researching how to change the 'read only' to 'read and write', and also extract and find these files. I'm currently looking for my "extracted files".

Categories

Resources