help with developing small app for usb/serial/relay control - General Questions and Answers

Hello i just signed up to forum so i couldnt put this in the appropriate forum but my question is
I would like to make a small app to control a usb to serial adapter that has 4 relays built in that i would like to switch on and off. i was thinking usb to rs232 adapter i saw ftdi has an android samples and hardware that may be suitable i also saw several usb serial adapters on fleabay i couldnt put links to any of it being new and other places but im not sure what would be best suited for the task. i have eclipse running along with android studio but im no programmer by any stretch of the word im able to mostly edit code or do things along that line. I did use the app inventer tool on mit website to make a concept apk but thats as far as i got so far. anyone offering any info on where to start on the hardware side and also im not sure of what to use as far as a designer/programmer/compiler the only programming i have done has been visually so something along those lines would be great.
the concept app was 4 on off sliders one for each relay
any advice or help appreciated thanks
Ryan

I wanted to add some more info my device is a in the family of AN-21 U 4.2.2 car stereo dvd nav unit devices from china i am not rooted but already have one ftdi usb serial device installed and working(obd interface) so my feeling is im all set with the ftdi drivers.
moderator can this be moved to appropriate forum? or do I need to make 10 posts to be able to make one there myself?

Related

[REQ][APP] Bluetooth communication

hello everyone,
Can anyone make an application which sends ASCII code via bluetooth to a PC or a bluetooth module??
I really need it for my mechatronics project.
Thanks before
Does it have to be Bluetooth? You might be able to cobble something together over USB with the USB host driver.
I'd like wireless communication for the system since cable is kinda out of date...
But when time is running out... I guess USB will be OK. But for now, since I still have plenty of time, I'd go with wireless.
You could use the chroot method and install Ubuntu on your Nexus One. I don't know if it exposes the phone's Bluetooth interface, but it might be worth looking at since you could code up anything you want in any language if that were the case.
ermmm... it's kinda advance...
any URL to the guide maybe???
is there no ordinary apps or so?
Basic serial over bluetooth is done using the RFCOMM profile, details on how to write an app can be found here:
http://developer.android.com/guide/topics/wireless/bluetooth.html
I'd guess you open a socket to the destination machine, just like normal network programming, just over bluetooth rather than tcp. Here is a stackoverflow article on the subject
http://stackoverflow.com/questions/...-sdp-connection-to-a-rs232-adapter-in-android
....
I'll try my best to understad it
complete noob on java programing here T^T

[Q] How to communicate with custom made hw board?

Hi Xda developers,
I might get involved in project during internship, where they want me to find way how to connect android device to custom made proprietary radio transmitter-receiver board without bluetooth or wifi, so it has to be direct wired connection.
This radio transmitter-receiver board has its own microchips and firmware so all low level work and functions will be done in this board alone.
Does anyone has idea how this could be done? is it possible to write some drivers (probably C) to communicate with this board over micro usb port present in all android devices? And than how could be data received over radio used in basic java-android application installed on device? (could this be done with use of a binary/text file as a link between these two programs?)
Thanks in advance
If nobody knows or has time to answer my questions, please give me some tips where to start searching for answers (websites, books, magazines .... )
Is it essential to learn Linux architecture properly before modifying anything in android?

OBD

Hello,
I saw that there is no OBD software in the marketplace, so I assume there's no API for the OBD in windows phone 7??
If anyone has informations, I could develop a new obd tool... but I can't find informations about OBD..
If you mean by OBD the On-Board Diagnostics, all handsets already has one (provided by manufacturers). And it's nothing what you can do (if you'll not start manufactoring your own WP7 ) - all native code should be signed.
No, sorry, I meant the automotive diagnostic tool eheh!
It's probably because niether the USB or the BT connection allow to connect OBD interfaces. USB lacks host support and BT lacks virtual com ports support, so you have no way to connect the OBD interface whether it being KKL / ELM or whatever with the phone.
figured it was something like that.. any luck we will have support about this in the future?
There is a device for the iPhone that plugs into the OBD and creates a wifi network. After that it is just sockets. I'm sure you could make a windows phone version of the tool.
Found it: http://www.obdkey.com/wifi/index.asp
my buddy has one for android it communicates via bluetooth and cost like $20. He ran the codes on my caddy, very useful
Hello i am the developer for OBDMobile for windows mobile:
http://www.rklenka.com/software/winmobile/obdmobile/
and Windows:
http://www.rklenka.com/software/obdmobile/
and as soon as its possible there will be a version for Windows Phone 7, but for right now it cant be done. In fact I am trying to work with some OBD Connector manufacturers in order to find a way to get it to work.
Right now there is no Bluetooth API and no Ad-Hoc support which is what OBDKey and KIWI Wifi supports. All the back end code has all ready be done so as soon as there is a way it will be up.
RKlenka said:
Hello i am the developer for OBDMobile for windows mobile:
http://www.rklenka.com/software/winmobile/obdmobile/
and Windows:
http://www.rklenka.com/software/obdmobile/
and as soon as its possible there will be a version for Windows Phone 7, but for right now it cant be done. In fact I am trying to work with some OBD Connector manufacturers in order to find a way to get it to work.
Right now there is no Bluetooth API and no Ad-Hoc support which is what OBDKey and KIWI Wifi supports. All the back end code has all ready be done so as soon as there is a way it will be up.
Click to expand...
Click to collapse
This would be amazing if you could get it to work matey
I use Torque on my Android Tablet and Digimoto on my laptop and connect to my Bluetooth OBD-II Reader, if i was able to use my Windows Phone this would be a GREAT help!
ODB aplication for WP7 would be very good.
I was looking around the internet about 2 months ago and ran across hardware and apps that do this for android,ios,wm, and I think even blackberry...
I remember thinking that would be sweet on my windows phone. Way to show up my boss... Lol
I showed him the website and I think he's gonna look into it when the software on the current scan tool gets outdated since he has an iphone4, I got the hd7, and another kid has an android phone.. Would be sweet to just carry around the little piece that plugs into the port and broadcast the signal to the phones.
Do you think there's gonna be live data support or just a basic tool to pull engine codes. Possible abs, srs scan too?
Sent from my HD7 T9292 using XDA Windows Phone 7 App
Didn't know the USB adapters could be gotten for under $20 never mind software for the PC for fairly cheap. I always thought these adapters could only be gotten for around $300+.
I dont work on cars for a living but, if this could be all gotten and working on my WP7 device for under $30, I'd be all over it. It's always usefull to have one of these type of things around when a code comes up on one of our cars and not have to run to a store that will not reset codes, etc.
I might even grab it for a old WM 6.5 device I keep around for a spare....
any app for OBDII gauges in WP7.5 ????
Bump, it's been a while, anyone find anything for WP7 or 7.5 to do this ?
It's been a while for this thread - any updates on Windows Phone and OBD-II? Wondering because I want to expand into Windows development too, rather than just Android.

USB host capabilities.

After searching and not finding what I was looking for, I always go to XDA. What android phones from Verizon have usb hosting capabilities. Specifically I want to connect and external hard drive to transfer files. I know you're probably wondering why I just don't use a computer, well my 4 year old son made my computer unusable. Thanks in advance for any help.
Sent from my DINC2
Just look at the market
Search: "usb host"
First result is okay
The problem is:
- Your hardware need to support it
- You need to be root.
But you can try!
---------------------------------
Fernando Setien
I've tried the usb host controllers app, but that was a no go. I have an incredible 2 that is rooted. I should have included this in my first post, but I failed to.
Sent from my DINC2
Also the kernel needs to support it and no stock kernel does that I know of.
Supposedly, Android 3.1 and newer support USB host mode. In some cases you'll need special adapters and/or a powered USB hub. Unfortunately, I'm too new of a user to post outside links (the forum won't let me), but there's much documentation on the Android developer site regarding host mode v. accessory mode, and at least one article/forum thread showing an Android 3.1 tablet with an Android 2.2 phone plugged into it, the tablet reading the phone's logs over the USB connection.
In other words, it's possible, but hardware limitations may make it difficult, as will whatever version of Android you're using.
YellowApple said:
Supposedly, Android 3.1 and newer support USB host mode. In some cases you'll need special adapters and/or a powered USB hub. Unfortunately, I'm too new of a user to post outside links (the forum won't let me), but there's much documentation on the Android developer site regarding host mode v. accessory mode, and at least one article/forum thread showing an Android 3.1 tablet with an Android 2.2 phone plugged into it, the tablet reading the phone's logs over the USB connection.
In other words, it's possible, but hardware limitations may make it difficult, as will whatever version of Android you're using.
Click to expand...
Click to collapse
I am running a ICS and it is not enabled by default. It maybe on Tablets but not mobile phones. A search will lead you to threads about it asking for it to be add to the kernel but you remove options when you do and there has not been alot of want for it.
Native support
At least Samsung Galaxy SII and Note does usb Host with the default ROM. You can see with cable you need (witch could be an issue too) on many blogs.

Anyone know about USB Dev?

Hi,
Android Dev Noob and just looking at the SDK I have this question which probably someone will be able to tell be straight away.
I want to relay USB Host port data to a USB accessory port.
I am looking at the USB Host APIs >= Andriod 3.1
What I want to do is be able to relay the keyboard, mouse and touchscreen that I have connected on the host port and relay that to the OTG.
So here is my noob questions before I waste loads of time.
1... Is it possible to create device manifests on the fly.
I was thinking I could just make devices connected on the host appear as if they are on the accessory port.
If not then I guess I could create some default manifests and pick the most relevant.
2... This is hardware related but many tablets and android boxes have separate usb host & otg ports?
It is possible to have a host and accessory going at the same time.
This might makes things a little easier as the rationale is that I have a windows 8 machine and an RK3288 android box and I want to share the keyboard, mouse and touchscreen.
Video is easy as I can just swap the input between pc & hdmi.
I was thinking if I plugged all my devices into android I could just have a hot Key to redirect to windows 8 or don't capture and use devices on android.
I thought it might be a much simpler way without network needs and have read there are gesture problems with KVM products such as Synergy.
What do you think is it possible, does anyone know if this has already been done and there is an app?
Also if you have any better ideas or some pointers where to start all will be welcome.
Many Thanks
Stuart

Categories

Resources