Wiring sensors to android phone motherboard ??? - Hardware Hacking General

Hi,
I am new to android hardware (have some experience with programming for Dalvik & NDK). I have an idea to use my old Android phone as a robot OS. However for that I'd need to connect more sensors to my device. I know this could be done over BT, but I am more thinking of wiring them to the OS. Is there anyone here that has any experience with that / know any link talking about that?
I am mostly thinking about connecting an array of microphones to the Android motherboard ...
Thanks in advance for your help...
Shahab.

shahab.fm said:
Hi,
I am new to android hardware (have some experience with programming for Dalvik & NDK). I have an idea to use my old Android phone as a robot OS. However for that I'd need to connect more sensors to my device. I know this could be done over BT, but I am more thinking of wiring them to the OS. Is there anyone here that has any experience with that / know any link talking about that?
I am mostly thinking about connecting an array of microphones to the Android motherboard ...
Thanks in advance for your help...
Shahab.
Click to expand...
Click to collapse
find a port that will accept it, and mod the OS to accept it and you should be fine

shahab.fm said:
I am mostly thinking about connecting an array of microphones to the Android motherboard ...
Click to expand...
Click to collapse
Depending on what you do with the audio from those microphones you're going to need support hardware (op-amps, etc.). I think you'd be better off using an intermediary device to interpret the audio and the send it to the Android device as serial data through the USB port. This can be done with an IOIO board, Arduino, etc.

I will try with IOIO to see how it goes
Hi,
I guess I would be trying IOIO in first attempt and see if I can find anything similar to IOIO but working with Bluetooth instead ...
Thanks for your help.

Bluetooth is definitely the simplest option to get going with.
If your phone and OS support USB host mode, then the other option is to use USB. I'm not sure what sound card support is like in Android, but if all else fails you could make your own USB device with an Arduino or similar to do the signal processing. Of course, then you might not need the phone...

If you have mad electronic and soldering skills you might also be able to hack into an I2C bus line. You'd then need to add some driver (maybe kernel support) for the device(s). But this would probably only work for sensors other than microphones (they're probably too high bandwidth for this method and probably don't use I2C anyhow).
I've dreamed of adding a flash LED to my phone in this way but been put off by the difficulty of the electronics and programming of it all and the fact I'd need to make an ugly case mod
This is way dirtier then just using Bluetooth or USB but I'd love to see someone try it

Related

USB data input use on a non USB Host smartphone

Hy everyone,
First of all, thanks for this great forum which never fails to impress me.
I have a question which some of you might help answering: I'm wondering if it's possible to use the mini-usb port of my smartphone to get some data input.
Let me explain myself a bit more: I know that smartphones (HTC Touch for me) aren't USB hosts. However, the data connexions are still present.
Here's what I'd like to do: even though the smartphone can't control another peripheral, I'd like that external peripheral to send data to the smartphone, and the smartphone to use that data to control the screen. That would give an alternative way of controlling the screen.
The input would come from another touch surface, so my guess is that using the data to control the screen shouldn't be much of a problem.
So? Any idea if it's possible? What kind of platform/language would be nice to do that? C#?
(I have JAVA development experience, but I'm quite a newbie as far as Win Mobile devs are concerned. I'm willing to learn though
I think I searched this forum (and others) quite extensively before posting. If by any chance I missed a related post, I'd be glad to know about it
No ideas? Anyone?
Last up before I stop...
prob. not
i dont think that is technically possible. i think one has to be the host, and that host provides power. so to power the input device(im thinking keyboard) it would need the smartphone/ppc to be a host....
but i have no clue in this area...maybe someone could prove me wrong?
Hey, thanks for your answer.
The powering issues could be overcomed by cutting the cables and giving power from an external power source (I think several people have tried doing it, I need to find the links again). By the way, the peripheral itself is plugged on 110V, so there's plenty of available power
I'm not seeking here to "control" the device, just to aquire the signal it's sending... Does that seem feasible, or does the peripheral need to be somehow "activated" by a Host before sending anything?
Well, in order to get data, the host must ask the slave each time it needs some. Other things must be done by the host, like usb enumeration. That means there has to be a host or it won't work, unless you use usb on-the-go, but I do not know many devices that support it.
according to the qualcomm website, the msm chipsets support otg

Getting serial out of the USB port to control a robot

Hi,
As most of you have, I am getting a growing collection of old mobiles now, and I want to do something cool.
I have just bought a robosapien V2 and AXON robot serial controller. What I want to do is use my old XDA exec to replace the 'brain' of the robot, so to this end, I need to be able to squirt serial data out of the phone on a wire, of which the easiest would be the usb snyc/charge port.
I am using NET 3.5 as my dev language, and the idea being is to take advantage of the wifi chip to be able to, firstly send commands to the robot from anywear (cool huh?) and to be able to stream video & audio (using the skype SDK) from the robot back to the network.
Anyone have any ideas on how to go about doing this?
And if any of you are interested enough I can post my progress here, go on, you know you would all love a robot you could send down the road on its own
sounds nice, i have no guess what it needs to control the robot nor i know anything about serial ports but i really would LOVE a small gizmo that i can control this way to do important things like rolling here, rolling there and then rolling back here, following the cat and piling it on the floor, talking through the speaker to the neighbours or affront those selfinviters ).
i'm waiting for your progress
best regards, pucki
Bluetooth
bhermer said:
Hi,
As most of you have, I am getting a growing collection of old mobiles now, and I want to do something cool.
I have just bought a robosapien V2 and AXON robot serial controller. What I want to do is use my old XDA exec to replace the 'brain' of the robot, so to this end, I need to be able to squirt serial data out of the phone on a wire, of which the easiest would be the usb snyc/charge port.
I am using NET 3.5 as my dev language, and the idea being is to take advantage of the wifi chip to be able to, firstly send commands to the robot from anywear (cool huh?) and to be able to stream video & audio (using the skype SDK) from the robot back to the network.
Anyone have any ideas on how to go about doing this?
And if any of you are interested enough I can post my progress here, go on, you know you would all love a robot you could send down the road on its own
Click to expand...
Click to collapse
I suggest you take a look on BT to RS232/485 adaptors. There are some small nice ones out there. I think it'll be even cooler being all wireless, isn't it?
For example this ones here (from google, don't know the brand. Only used industrial ones until now on my projects):
http://www.alibaba.com/catalog/100402141/Bluetooth_To_Rs232_Adaptor_10m_Converter.html
This one can't be used because the phones are not class 1 devices (~100 mW , ~100m range) but just for the information:
http://www.alibaba.com/catalog/100402139/Bluetooth_Rs232_Adaptor_100m_603004.html
Good luck with your project!!
shmilson
shmilson said:
I suggest you take a look on BT to RS232/485 adaptors. There are some small nice ones out there. I think it'll be even cooler being all wireless, isn't it?
For example this ones here (from google, don't know the brand. Only used industrial ones until now on my projects):
http://www.alibaba.com/catalog/100402141/Bluetooth_To_Rs232_Adaptor_10m_Converter.html
This one can't be used because the phones are not class 1 devices (~100 mW , ~100m range) but just for the information:
http://www.alibaba.com/catalog/100402139/Bluetooth_Rs232_Adaptor_100m_603004.html
Good luck with your project!!
shmilson
Click to expand...
Click to collapse
I think this is the better way. Unless the phone has a USB host controller (I don't think a lot of them has, most the USB port as client. We can sync because it was the active sync from the PC that initiate and control the session, not from the phone), this bluetooth to RS232 converter seem to be the best solution. I've been looking for something like this for a while.
Thanks for the comments guys, for some reason XDA dev isnt emailing me when comments were placed!
Blue tooth seems like a cool idea, would be better able to hide the bt dongle in the robot! will get hold of one and have a play when I get more than a bunch of wires will post some pics

[Q] Android Universal remote

OK, well i have searched for about a week now and feel either it doesnt exist or im just not looking in the right place. I'm interested in programming a universal remote for my EVO but the problem i am having is finding the hardware to make it work.
What is needed:
Wifi to RF converter OR
Bluetooth to RF converter
Does anyone have any clue where to find one? You would think that with Iphones popularity with their phone attached junk someone would have gotten smart and made one that you could just sit next to your entertainment system so that you dont have to plug in a device to your phone....
Anyways, i didnt find anything on here, not online, nor in the underground layer of electronic geeks... jk. I dont have the skills to build my own device or i would. I'm taking computer engineering so maybe someday i will.
Any help from you gods at Xda would be appreciated.
You can buy a Bluetooth to Serial port converter, like this one:
http://www.totalpda.co.uk/+/Bluetooth-Serial-RS232-Adapter.7562.html
Maybe you could then find a serial or legacy IR transmitter device to send the IR signals to your devices. I'm assuming they are IR and not RF.
You could use something like this for the IR unit:
http://www.expansys.com/actisys-ird...=google&utm_medium=shopping&utm_campaign=base
So you connect both units near your equipment, Power them somehow, point the IR device towards the Equipment, Connect via Bluetooth to the Serial Port Profile and assuming you are sending the right signal for the device you should have control.
Of course because it works both ways, you could 'Read back' the signal from your remote control into your android application and store it against the event you want to fire via your GUI controls. Simples.
hmmmm yes...I think that'll work
Logicalstep
I think the easiest solution would be to write an android app to use the ir dongles that plug into the headphone Jack. There are a couple out there... most of the iPhone adapters plug into the headphone jacks, I believe. Also there was one out for winmo years ago.
Anyways, I think they just convert audio signals into ir remote signals, so the app would just need the collection of audio signals for the various ir signals needed. I bet you could get one of the iPhone ir dongle companies to help out in writing an app, cause that would mean another market to buy their hardware.
Sent from my HTC HD2 using XDA App
I'm liking the first one. But not the single idea. Not. Many people I know would want to buy a single and risk losing it when you could have a stationary device sitting right there. Plus if it could be wifi connected then you could control it from anywhere.
Maybe I did not look hard enough, but I could not find a "similar" Android Universal Remote systems like the ones below for the iPhone. I'm looking for an Android UR application that allows an Android Smartphone, that has no IR, to interface to an existing IR blaster via WiFi or Blutooth to control AV components. It is possible that I miss it, so if someone can point me to one I'd appreciate it. If none is available, maybe someone can write an Android UR app that can interface with one the "existing" IR blasters that work with the iPhone. These IR blasters, as you can see below, are not that expensive.
I was impressed by how the UI is easily customizable in the iPhone app in the video for the UnityRemote... Who knows... maybe gear4 is already writing an Android app for it.
http://us.gear4.com/product/_/93/unityremote/?cid=31
http://www.slashgear.com/griffin-beacon-makes-your-iphone-4-a-universal-remote-07124546/
http://www.slashgear.com/peel-fruit-turns-iphone-into-show-suggesting-universal-remote-08118392/

Home Automation [Ard vs Rasp vs IOIO]

Hello,
I would like to hear some opinions about my personal want-sth-to-do project. I want to use NFC to open my house doors, including the front door, garage and bedrooms door. In addition, I want to be able to control my air-conditioning system, TV and audio system. I want to integrate some sort of IP/CCTV cameras into my personal system. Just to improve the system, I will develop a Android App to control it via an API.
So, to make this project possible, come to my mind three ways:
1. [Arduino]
- Using the Arduino and its shields to develop the entire system. It will take a while and be hard in some points such as IPCAM recording.
2. [RaspberryPi + Arduino]
- Using the RaspberryPi connected to some Arduino shields using the GertDuino (GPIO expansion boards that make RaspberryPi compatible with Arduino Shields).
- This options seems to be the best option for now, but I dont know if RaspberryPi is able to handle the entire system.
3. [IOIO-OTG]
- IOIO-OTG is a board that make any android device as the heart of the system, making you just program in Java and control the GPIO and UART.
- The benefit is that I can develop it using some Android Stick, however, I need to search about available shields for it.
In addition, I need to think how to separate the core of the system from the sensors such as nfc readers. I do not think that wiring over the entire house is the best way... but I didn't found any wireless sensors...
Someone want to give some opinion? I will update the thread with the sensors I'm looking around and so...
I'd go the arduino (maybe more than one) + raspberry-pi (maybe more than one) way.
the ioio seems to be some µc that runs a firmware that connects to android and provides all i/o pins to android... so nothing you couldn't do yourself with an arduino or something similar.
I'd start with the devices you want to connect. Air conditioning might be controlled using Infrared emitters - would that work?
NFC Readers can be built from an arduino AFAIK, but you'll need some sort of field bus or wireless connection between all the parts...
SkzBR said:
Hello,
I would like to hear some opinions about my personal want-sth-to-do project. I want to use NFC to open my house doors, including the front door, garage and bedrooms door. In addition, I want to be able to control my air-conditioning system, TV and audio system. I want to integrate some sort of IP/CCTV cameras into my personal system. Just to improve the system, I will develop a Android App to control it via an API.
So, to make this project possible, come to my mind three ways:
1. [Arduino]
- Using the Arduino and its shields to develop the entire system. It will take a while and be hard in some points such as IPCAM recording.
2. [RaspberryPi + Arduino]
- Using the RaspberryPi connected to some Arduino shields using the GertDuino (GPIO expansion boards that make RaspberryPi compatible with Arduino Shields).
- This options seems to be the best option for now, but I dont know if RaspberryPi is able to handle the entire system.
3. [IOIO-OTG]
- IOIO-OTG is a board that make any android device as the heart of the system, making you just program in Java and control the GPIO and UART.
- The benefit is that I can develop it using some Android Stick, however, I need to search about available shields for it.
In addition, I need to think how to separate the core of the system from the sensors such as nfc readers. I do not think that wiring over the entire house is the best way... but I didn't found any wireless sensors...
Someone want to give some opinion? I will update the thread with the sensors I'm looking around and so...
Click to expand...
Click to collapse
I find your ambition high. But as someone running an Insteon Smart Home with an ISY994i, I can't help but feel you are trying to make a fairly cost effective and secure option more expensive and less secure. Mobilinc integrates with tasker, so you could set it up to unlock doors and stuff pretty easy with NFC.
Best of luck with your search.
me likes
DThought said:
I'd go the arduino (maybe more than one) + raspberry-pi (maybe more than one) way.
the ioio seems to be some µc that runs a firmware that connects to android and provides all i/o pins to android... so nothing you couldn't do yourself with an arduino or something similar.
I'd start with the devices you want to connect. Air conditioning might be controlled using Infrared emitters - would that work?
NFC Readers can be built from an arduino AFAIK, but you'll need some sort of field bus or wireless connection between all the parts...
Click to expand...
Click to collapse
I agree with DThought. Including a Raspberry Pi would allow some pretty intense processing power.
If you want to limit the amount of wiring you do, you could actually use a USB wifi dongle on the Raspberry Pi. You could then make some simple protoboards/PCBs with an Arduino with a wireless shield for each thing you want to control. This would likely be a more expensive solution than plain wiring but it would allow a lot of flexibility. Especially if you had each of the Arduino clients very similar so that they are interchangeable.
You could also try using Xbee Arduino wireless shields in case you don't want to use regular wifi.
This sounds like a very good project. I hope it works out for you. :laugh:

USB Synchronous and Asynchronous

Hi,
I am having a hard time trying to get a couple of USB devices to work properly on my headunit. One is a USB CarPlay dongle, and the other is an OTA tv tuner. Both USB devices get recognized by the headunit, however in the case of the first, it never gets passed a connection state where the dongle starts talking to the application. In case of the second, the OTA never finds TV stations after doing a complete scan.
USB devices like keyboards, mice, USB flash drives, even a webcam work fine. I contacted the manufacturer and they said they only support USB synchronous which may be the reason these devices can't work properly.
The unit is an Eonon GA7157 with the Allwinner R16 1.6GHz Cortex A7 Quad-Core CPU.
Questions:
Is it possible this is a valid claim?
My unit is rooted, can USB asynchronous be enabled via software?
I was also thinking this could be an OTG wiring issue, what do you think? I say so because the only way I could get the CarPlay dongle to work on my Samsung Tablet A, was with an OTG cable. A straight connector presented the same symptoms.
I am not too experienced with Android, so please be gentle
He was feeding you a load of horse manure.
Either that, or he meant something entirely different by "USB synchronous".
Precisely what do you mean by "get recognized by the headunit"?
What exactly *are* these two devices you are trying to use?
What *drivers* do they use?
Have you confirmed that the kernel is enumerating the devices?
Have you confirmed that the kernel is binding the proper drivers to them?
Have you confirmed that Android knows how to deal with the interfaces that the drivers are providing for these devices?
Have you confirmed that the interface permissions are such that a user application will be able to access it?
An OTG cable does two things;
1) It reverses the gender of the connector,
2) It sends a signal to the phone/tablet/whatever that it should switch its USB port from slave mode to host mode.
Nothing else.
Thanks for the tips. By recognize I mean that Android prompts me to confirm opening the accompanying apps when I plug in these devices to the USB port. E.g. I plug in the CarPlay dongle, Android prompts: do you want use Zbox (App) every time you use this device (Cancel or OK); I press OK and then the App stays in trying to connect mode forever.
The manufacturer has locked down USB debugging. Do you know of any apps (rooted or not) that will give me the information you pointed out?
thanks
It is unlikely that USB debugging is "locked down". More likely, its just because your USB device port is stuck perpetually in "host" mode on the wrong side of a USB hub, and therefore you can't connect to it. Try connecting to adb over IP instead.
I've never heard of any USB device on Android causing any kind of popup. That is very strange. Is it possible that the popup is being created by the program, i.e. "zbox"? Its possible that the system is sending a broadcast upon device enumeration, but the device access permissions are either wrong, or the kernel doesn't have the proper driver available.
luciusfox said:
It is unlikely that USB debugging is "locked down". More likely, its just because your USB device port is stuck perpetually in "host" mode on the wrong side of a USB hub, and therefore you can't connect to it. Try connecting to adb over IP instead.
I've never heard of any USB device on Android causing any kind of popup. That is very strange. Is it possible that the popup is being created by the program, i.e. "zbox"? Its possible that the system is sending a broadcast upon device enumeration, but the device access permissions are either wrong, or the kernel doesn't have the proper driver available.
Click to expand...
Click to collapse
Thanks again. I am including some pictures that may help explain the problem a little better. As far as the passcode, from what I can tell this unit has 3. One for the Advanced Car Settings, Developer Settings, and USB Debugging. The first 2 I found on another forum and are 123456 and the other 7890. The USB Debugging is an alphanumeric string which I haven't found anywhere, and the manufacturer refuses to release it. When I toggle the USB debugging on, I get prompted to input the passcode. I have tried a few codes but no go, the USB debugging switch goes back to the off position.
The other pictures show the USB port capabilities of the headunit. The unit has 3 USB ports: one is taken by the WiFi module, the other by a dashcam, and the remaining one is open and where I plugged in the CarPlay dongle. There is also another picture of the USB CarPlay dongle device plugged in and listed as Mass Storage Gadget. The dongle does have internal storage of a few MBs.
Finally, I include a picture of the application Zbox. This is the latest version and it starts automatically when I plug in the USB CarPlay dongle.
Well, I made some progress with the password for the USB debugging switch. To summarize:
Car Settings: 123456
Developer Options: 7890
USB Debugging: [email protected]
Now I just need to figure out how to make the USB port work properly. Any ideas? I have USB debugging access and the device is rooted.
Well according to your second-last picture, the device is being detected as UMS (Usb Mass Storage). I.e., like a usb flash disk.
VIDID of 0x0525:0xA4A5 looks to be an e-ink tablet called "Pocketbook Pro 903".
The problem may be that your "carplay dongle" is masquerading as something it isn't.
Well, the VIDID could be the problem; however, this same CarPlay dongle works fine on 2 other Android devices; moreover, a USB OTA tuner behaves the same way, meaning it does not work on the headunit but does on remix and a tablet.
Well guys, this unit is going back to the seller. After playing with it and not getting anywhere with customization and customer service, it’s out the door.
I am getting an xtron octacore px5 unit. It looks like these head units have better developer support.
Do you have the English version of 3.0 you can post?
bass_rock said:
Do you have the English version of 3.0 you can post?
Click to expand...
Click to collapse
You mean the Zbox firmware and software? if so, pm me, and I'll forward it to you.
isisyodin said:
You mean the Zbox firmware and software? if so, pm me, and I'll forward it to you.
Click to expand...
Click to collapse
Yea, and actually I was able to use the version on their site. It was al in English when I installed it and I’m now on version 3.0.2
bass_rock said:
Yea, and actually I was able to use the version on their site. It was al in English when I installed it and I’m now on version 3.0.2
Click to expand...
Click to collapse
Whats new on 3.0.2 compared to 3.0.0? Do you know what was updated?
isisyodin said:
Whats new on 3.0.2 compared to 3.0.0? Do you know what was updated?
Click to expand...
Click to collapse
According to Google Translate:
1. Optimize U disk upgrade USB recognition rate is higher
2. Optimize the phone connection, mobile phone recognition rate is better
3.carlife in the help page to add download guide
I was able to get it from here: https://translate.google.com/transl...=en&ie=UTF-8&u=http://zjinnova.com&edit-text=
bass_rock said:
According to Google Translate:
1. Optimize U disk upgrade USB recognition rate is higher
2. Optimize the phone connection, mobile phone recognition rate is better
3.carlife in the help page to add download guide
I was able to get it from here: https://translate.google.com/transl...=en&ie=UTF-8&u=http://zjinnova.com&edit-text=
Click to expand...
Click to collapse
My new Xtrons recognizes the Zbox dongle very quickly. I think it is now as quick as some of the dedicated Alpine and Pioneer units.
As far as software, crisper icons and bypassing the connection window would be nice option. It should only display when a problem occurs. One thing that is flimsy is the USB connector but no software upgrade will fix it. I am considering opening it up and soldering a better connector. Also, heat dissipation is an issue. It needs a heatsink. I may just add one when I crack it open.
I am looking forward to the next iteration with wireless CarPlay. Someday.
isisyodin said:
My new Xtrons recognizes the Zbox dongle very quickly. I think it is now as quick as some of the dedicated Alpine and Pioneer units.
As far as software, crisper icons and bypassing the connection window would be nice option. It should only display when a problem occurs. One thing that is flimsy is the USB connector but no software upgrade will fix it. I am considering opening it up and soldering a better connector. Also, heat dissipation is an issue. It needs a heatsink. I may just add one when I crack it open.
I am looking forward to the next iteration with wireless CarPlay. Someday.
Click to expand...
Click to collapse
Yea the update definitely enhanced it a lot. I used to have a pioneer and it feels close to the same now.
bass_rock said:
Yea the update definitely enhanced it a lot. I used to have a pioneer and it feels close to the same now.
Click to expand...
Click to collapse
Prior to 3.0.2, what firmware/software where you running?

Categories

Resources