Parallel/Serial ports for PPCs - General Topics

Hi There
Does anyone know if there is such a thing as a mini-USB to Serial (or parallel) device on the market? Something that would provide PPCs like the K-JAM/WIZARD with a serial/parallel port.
I know they are available for desktop PCs, but what about hand-helds?
Ken

not without USB host. However you can use bluetooth to serial. I got ones of these:-
http://www.merlinbluetooth.co.uk/merlinbluetooth/promi-bluetooth-module-p-33.html

Bluetooth-serial
Thanks for that; it looks great, so I will (I imagine) need to get some software to read/write to that device.
At the device end I should be able to configure some Data Acquisition circuitry.
My problem is that I don't get access to the Vario/K-JAM until Christmas Day - it's a present from my wife - so I have no idea about writing stuff to access the bluetooth system Does it present itself as some sort of I/O?
I've just bought the NSBASIC/CE, so I was hoping to be able to write the necessary stuff with that.
The K-JAM looks a great bit of kit, but I'm never satisfied until I can get two-way interaction with the outside world in both Digital and analogue.
Thanks again,
Ken

It appears as a com port "COM5" on mine. You can open it just like normal using CreateFile / WriteFile etc

Related

MegaSquirt tuning or viewing software for windows mobile?

So does anyone know any software that can be used to connect to MegaSquirt with windows mobile based device? There has been one version for pocket pc (PockeTune) several years ago but now there is no such a program.
So if anyone knows anything about using megasquirt with HTC TyTn or any same kind of device it would be nice to get more info how to do it.
Altavista is a better bet when searching for odd balls like this, there is thread on the MS board http://www.msefi.com/viewtopic.php?p=161924&highlight=ppc#161924 just search for PPC on the forum, but I don't think this has been done from what I have read - Mike
I found the pocket pc project files for megasquirt tuning.
http://www.garysphotography.com/pockettune/index.htm
now it is time to take a look if this could be used with wm6.0 + hermes.. Sources are allso available.
Just try loading it, connect to the car and mess around with the vehicle stationary until you get some degree of confidence, a screw up at motorway speeds could prove costly let alone in terms of safety, I will be interested to hear how you get on with this though - I might even did the old box of tricks out and re-fit the Ovlov for some summer fun - Mike
I was thinking that if this could be used as rpm-, temperature- and lambdameter. I`m using megasquirt on ATV and there is that much of space for different meters.
Also it would be nice to get logs of different pulls to pda because logging with laptop in your rucksack is not so comfortable and may cause some injuries for laptops hard drive.
I tried this app but it does not have logging..

Serial port kernel and wlan.ko, ready to go

Find included a 2.6.27 kernel and corresponding wlan.ko with serial port enabled. This will work with JF, mikhael's build and so on that use the 2.6.27 kernel. Wifi works, bluetooth works, all that stuff works.
Serial port is /dev/ttyMSM2 with default at 9600 baud. I am turning my ADP into the brains of a UAV, so this should let me control servos with it.
Have fun! 2.6.29 (or whatever will be current) coming when I get off my lazy bum and move to it.
Installation is the usual "rename to update.zip, put in sdcard, start the phone in recovery mode" dealie.
BACK UP YOUR BOOT.IMG AND /SYSTEM/LIB/MODULES/WLAN.KO if you want to revert!
Here's a newer version with a terminal program (dterm, recompiled for g1/g2), or just the terminal by itself. If you flash the terminal ends up in /system/sbin and automatically goes to /dev/ttyMSM2 (see source), again it's just dterm with some cleanups.
By the way, does anyone care about this stuff at all?
I couldn't upload the kernel so here it is http://www.spirit-plumber.com/portfolio/robotics/kernel_serial_term.zip
It sounds very promising/interesting but I'm not exactly sure what it does. Does is it enable accessing the baseband via serial or something? This is something that was used on the original iPhone to try to unlock it.
I think if you explain more clearly what it does then more people will seem interested, & remember no contribution here is a bad one, someone will have a use for it.
It gives you a serial port that can be used as a device rather than just for debugging, as shown here
http://www.instructables.com/id/Android_G1_Serial_Cable/ (not by me btw) This software stuff makes it usable for general purpose IO. That allows a G1 and an inexpensive microcontroller, arduino/picaxe/etc to control servos, talk to a second GPS, and so on.
I develop autopilots for RC planes and the G1 would be a great platform for that since it has a gps, compass, accelerometer and camera already integrated in a relatively small/light package.
Also, ROBOTS! http://hackaday.com/2009/01/25/forknife-android-g1-controlled-robot/ This was done using the audio port, but having a serial port on board bypasses all the DTMF stuff and allows for a lot more bandwidth. (Also not by me, if you do want to see stuff by me, search spiritplumber on youtube!)
I'm also very interested in such a kernel as a friend and I are interested in interfacing a phone to a serial robot controller.
However, I am currently running Cyanogen 4.0.4 on a MyTouch and loading this kernel effectively breaks the phone. No radio, GPS, etc. and many apps are missing/broken. The serial port does work and we got it talking with our robot but otherwise it's not much use to me.
So atm it's either a phone or an overly expensive microcontroller but not both.
You could submit the patches to cyanogen to see if he'd be willing to incorporate it in his build.
this is kernel version 2.6.27 and i think the build you use has kernel 2.6.29 which is why everything'd break. i will build 2.6.29 at some point, for now use a build that still use .27? i useJF151 with good results.
Hi, I'm interested in this stuff, I just wonder how can I use this to interface G1 to Arduino? any idea/tips will be helpful. TIA.
You end up with a new device, /dev/ttyMSM2 which is a standard issue serial port that can be used to talk to microcontrollers. The voltage is 2.8V which means it will work with a 5V micro in the phone-->micro direction, but if you want to go the other way you'll need a divider.
(see the other thread i posted in for a schematic)
I should probably get cracking on a donut version
Wow
Interesting stuff. I just wish I had the ability to take advantage of this. I think this would bring it one step closer to being able to use the G1 as an OBD-II car scanner. But I'm afraid that will take way more technical ability than I have.
Not really...
http://www.suntekstore.com/OBD2-16Pin-to-DB9-Serial-Port-Adapter-Cable-.html
http://www.instructables.com/id/Android_G1_Serial_Cable/
+ my kernel
Nice work
spiritplumber said:
...
I develop autopilots for RC planes and the G1 would be a great platform for that since it has a gps, compass, accelerometer and camera already integrated in a relatively small/light package.
Click to expand...
Click to collapse
Genius! Well done for bringing this all together!!!!
I found your thread while trying to investigate the same project you've done already - making an autonomous drone using the G1 !!!
- I'd be very interested to see videos/info/photos of your drone.
I've seen all the bespoke UAV controllers on DIYdrone.com, but was more interested in the challenge of making my G1 with all it's sensors directly control a servo controller board via serial.
I'm a bit worried that the screen must stay on, which will burn through the G1's battery in no time! - is this still necessary?
I'm really impressed and thankful for what you have done, and making it public!!!
I'm currently on Cyanogen 4.0.4. so I guess the first step is to back track to an earlier Kernel version...
Unless you're close to rebuilding 2.6.29 ???
Thanks for the 'instructables' for the cable too, I've ordered the bits and hope to test in the next few days - ironically I found that before this thread!
Hmmm...
I've just studied your cable making instructions and have some questions!
The USB-Serial converter board... is that any use at all other than a PC interface?
I shouldnt actually need this to talk directly to another serial device from my G1?
- I got the impression the USB/Serial board was to convert the G1's USB to Serial...
Could I send a serial TX messages directly from the break-out board to a serial RX pin... (Servo controller) does that sounds correct?
Sorry for the torrent of questions...
If you want to talk to a different device you just need to flip pins 2 and 3 on the serial port and use a male rather than female connector so yes you can definitely do that!
In fact you can do two at the same time: Here's me using the G1 to relay data from a GPS to a servo controller. If you'd like the schematics for that let me know. If you have any sort of work related to this DEFINITELY let me know.
By the way, I'm using a 74HTC14 for doing the level shifting and inverting: it's a very cheap part and also has the advantage of cleaning up the waveform nicely. Or you can use some transistors.
EDIT: Attachment is being stupid so go here for photos: http://spirit-plumber.com/robotseverywhere/gallery/images/other/gphone/
spiritplumber said:
If you want to talk to a different device you just need to flip pins 2 and 3 on the serial port and use a male rather than female connector so yes you can definitely do that!
In fact you can do two at the same time: Here's me using the G1 to relay data from a GPS to a servo controller. If you'd like the schematics for that let me know. If you have any sort of work related to this DEFINITELY let me know.
By the way, I'm using a 74HTC14 for doing the level shifting and inverting: it's a very cheap part and also has the advantage of cleaning up the waveform nicely. Or you can use some transistors.
EDIT: Attachment is being stupid so go here for photos: http://spirit-plumber.com/robotseverywhere/gallery/images/other/gphone/
Click to expand...
Click to collapse
Hi Spiritp,
Thanks for your comments, I'll give that a whirl then!
I'll definitely keep you posted!
My basic plan is:
Use accelerometer for auto-leveling control, use pre-defined GPS routes so I know the take-off / landing site altitude above sea level, and eventually get the G1 to take photo's at GPS waypoints.
Probably ambitious considering my electronics knowledge, but I'll keep you posted with progress.
If you have any pointers of how to send Serial commands from within the Android App layer, I'd really appreciate it.
With so many 'rooted' applications doing kernel based tasks I'm pretty sure it'll be possible... but I'm also fairly green on linux & java, so this will be a challenge for sure. (Time to hack my way through other people's work and understand what's going on!!!)
Thanks for your response,
Andy
spiritplumber said:
By the way, I'm using a 74HTC14 for doing the level shifting and inverting: it's a very cheap part and also has the advantage of cleaning up the waveform nicely. Or you can use some transistors.
Click to expand...
Click to collapse
Question 1:
When you say 'level shifting' is this to bring the TX/RX voltage to the same level? (i.e. 5v --> 5v, rather than 2.8v --> 5v)
Question 2:
If I plugged a 5v serial device into the G1's RX connector, would this damage the G1?
Question 3:
Please help explain how non-printing byte-level data (Servo commands) can be sent from DTerm... I've had a poke around on the internet but with no success...
Question 4:
I have installed your Kernel/DTerm... which runs DTerm ok, but the commands 'ls' return the error 'not found'.
- which worked before adopting your kernel..
Is this normal? How can I fix this?
EDIT:
Ok, I think I'm half way there... I've now bought one of these:
http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=194
//
spiritplumber said:
If you want to talk to a different device you just need to flip pins 2 and 3 on the serial port and use a male rather than female connector so yes you can definitely do that!
Click to expand...
Click to collapse
Reminds me of the HP48 token ring networks. http://www.hpcalc.org/details.php?id=3603 In essence, device 1 would transmit data to device 2. Device 2 would see that the packet was meant for a different device and retransmit the packet to device 3, the intended recipient. If device 2 had been transmitting a packet to device 1, it would have passed through 3 on the way back around. Adding another device to the network was as simple as breaking the chain and adding a new one. Building the cables to do that wouldn't be too difficult.
Level shifting:
Internally the G1 uses 2.8 volts. This is nice if you've a 5V interface because:
On going G1--->other part, 2.8 is high enough to register as "high", you may need a pullup resistor (try 10k).
On going other part--->G1 you just need a voltage divider! That's two resistors of equal value, this makes the other part effectively output at 2.5v which the G1 will happily accept! (If this confuses you, see "voltage divider" on wikipedia..... it's literally just 2 parts). Here's a picture on page 5: http://forum.xda-developers.com/showthread.php?t=496976&page=2
If you need to do stuff in that sense I recommend just having the servo controller take in ascii stuff. Or you can modify dterm. Or I can give you a modified copy of dterm that has that functionality let me know!
If you use a 3.3V microcontroller such as the Parallax Propeller, just slap two 1KOhm resistors on the rx and tx lines and go do stuff: it works.
Controlling servos via G1 is very painless and easy, I already do that, let me know if you want tips.T
spiritplumber said:
Level shifting:
Internally the G1 uses 2.8 volts. This is nice if you've a 5V interface because:
On going G1--->other part, 2.8 is high enough to register as "high", you may need a pullup resistor (try 10k).
On going other part--->G1 you just need a voltage divider! That's two resistors of equal value, this makes the other part effectively output at 2.5v which the G1 will happily accept! (If this confuses you, see "voltage divider" on wikipedia..... it's literally just 2 parts). Here's a picture on page 5: http://forum.xda-developers.com/showthread.php?t=496976&page=2
Click to expand...
Click to collapse
That's excellent, I think I have a solution for the voltage, but thanks a lot for your electronics expertise!!!!!!!
spiritplumber said:
If you need to do stuff in that sense I recommend just having the servo controller take in ascii stuff. Or you can modify dterm. Or I can give you a modified copy of dterm that has that functionality let me know!
Click to expand...
Click to collapse
I'm actually using a Pololu micro serial servo controller (SSC) - I'm fairly sure it doesnt support ASCII characters, the manual only explains how to compile a '3 byte sequence' :
To set the servo position, send a sequence of three bytes. The first byte is a syncronization value that must always be 255. Byte 2 is the servo number, and it can be 0-254. Byte 3 is the position to which you want the servo to move, also 0-254. (sync= 0xFF,servo= 0x00-0xFE,position= 0x00-0xFE)
If you can help / let me know how to modify dterm I would really appreciate it!!
Although I'm still not sure how I'm going to access this from the Android Application layer - making calculations from accelerometer & GPS, then sending the calculated servo movement down to a kernel app?
Any help in this area would be greatly appreciated!
spiritplumber said:
Controlling servos via G1 is very painless and easy, I already do that, let me know if you want tips.T
Click to expand...
Click to collapse
I would find any tips interesting !!!
Thanks again for your comments & help, you're making this project far easier than I could have hoped!!!!! hopefully I will be able offer you help in my areas of expertise some day!
- I'm an application developer by day, using VB.net/Sybase Powerbuilder/Pocketbuilder/SQL/Microsoft-based network admin.
Just a quick final question (for today!!) - my Wlan seems to have been knocked out by your kernel image... the android manager can see AP's but always reports that it was unsuccessful when trying to connect.. and ideas?
- I'm on JF1.51 ADP1, no other mods or changes.
Andy

Music dock for Android?

Hey all, I was wondering if there is something like a music dock for Android phones. Something like the Logitech Pure-Fi Anywhere 2 would look great. Something that has a remote control and communicates with the device (not just headphone jack in). If it works with iProducts then even better.
Suggestions?
If i am not mistaken a new mode was have to be incorporated into android as unlike the iphone that has a dock mode using its cable all the android devices either have mini usb or propriatary jacks that use the same usb specs in a different form factor!!
The best bet would be to use the standard audio jack but sell a bluetooth remote control to go with it, then using a modded open source music player and bluetooth drivers supplied by the dock maker do the functions you have suggested!!
I would buy one!!
Bluetooth remote hey? Haven't seen any around (that would work with android). I'd still prefer a dock like I described since I would then need only one remote control, not two.
zeusalmighty said:
Bluetooth remote hey? Haven't seen any around (that would work with android). I'd still prefer a dock like I described since I would then need only one remote control, not two.
Click to expand...
Click to collapse
yeah your way sounds the best, its just getting that feature added to Android as as ASOP so the phone would be able to take commands via usb as it seems it would need to be a system level command chain! so pluggin it in and seeing it popping up saying mass storage, pc suite, charge only and also have an Audio docking option would be the ultimate goal before the docks go into the design room!
Or maybe the dock is bluetooth 2.0 and all it does is hold the phone and charge it? that would take hardly any modification!! these are the ideas that need putting to companies like creative etc!! they should have no bother making models for the HTC ranges! and maybe samsung
No bluetooth please, sound quality over AD2P sucks.
A decent solution would be a standard 3,5mm-connected remote interface, just like on corded Nokia or Apple handsfree; luckily enough SGS's sound quality is decent.
A USB connector would simply be astounding, although quite difficult to implement: remember the iphone has a line out in its bottom connector so a dock is kinda straight-forward to make; going through USB either means rerouting the line out from the DAC (impossible to realize just with software) or creating a standardized driver to connect an external DAC. Read: nobody is gonna do it, as no big company is willing to go through the trouble of making something (very) hi-end only.
*Drools while dreaming of an USB attached DAC/amp*
Considering that most Android phones can connect in USB mode, there could be an external dock that plays the mp3s' on the phone. On the other hand, this makes your phone no different than a flash disk.
Shouldn't there be a protocol for docking this kind of devices? I think phone makers are really losing the game by not creating a protocol for wired music docking, the result is that there is a TON of peripheral for iProducts (from hifi to cars) but almost none for anything else. Crying shame.
In the end a 3.5mm would be the most realistic solution but still, i'd like some sort of remote control.
i would be quite happy with a cable that has a male 3.5mm on one end and a female apple dock connector on the other.
you wouldnt have problems then when you were round at a party and all they got is an ipod dock with no line in.
cant the enterprising chinese come up with a solution?
EDIT**on closer inspection i found that cablejive are doing something called a dock input cable. i would post a link but im not allowed
it may be what im looking for
Didnt seen anything abaut a dock...
However i got this product from Belkin and it works very cool for my intentions.
**cant post since im "new user" tho, google it: "BELKIN bluetooth music receiver F8Z492"
Its just tap 1 button and play the music via bluetooth (A2DP), very nice quality.
I suppose the above are both working solutions, though I don't really like the Dock input cable. I mean, you lose the ability of remote controlling your player and you would use that only with iPod / iPhone enabled hifi systems, which I find redundant (why buy such a hifi system if you have Android? Then again if you already have one, that changes things).
to be honest it wouldnt take much to develope the librarys for the controls through a usb cable, but with no ones builds being asop and a non general development tree with the xda scene as it is, it would be virtually impossible to the get this now very fragmented market of phones to have a standard for docks! heh i might even put this to someone I have consulted for in the US about bluetooth technologys to see what he thinks!
anarchyuk said:
to be honest it wouldnt take much to develope the librarys for the controls through a usb cable, but with no ones builds being asop and a non general development tree with the xda scene as it is, it would be virtually impossible to the get this now very fragmented market of phones to have a standard for docks! heh i might even put this to someone I have consulted for in the US about bluetooth technologys to see what he thinks!
Click to expand...
Click to collapse
I think the idea would best apply to "personal hifi systems". Something like boom-boxes or even small audio systems. These could provide basic functionality through their standard lcd screen and remote control, but when you add a phone on, they'd have a really nice looking screen and new features (depending on the phone itself). Bluetooth can already music-pair with other devices but I think there are better prossiblities using USB (not to mention that your phone would be charging at the same time).
I think it's time for people to stop looking at docking as gimmicky and start developing docking methods that actually add to the user experience as well as functions.
zeusalmighty said:
I think the idea would best apply to "personal hifi systems". Something like boom-boxes or even small audio systems. These could provide basic functionality through their standard lcd screen and remote control, but when you add a phone on, they'd have a really nice looking screen and new features (depending on the phone itself). Bluetooth can already music-pair with other devices but I think there are better prossiblities using USB (not to mention that your phone would be charging at the same time).
I think it's time for people to stop looking at docking as gimmicky and start developing docking methods that actually add to the user experience as well as functions.
Click to expand...
Click to collapse
When you think about how many media functions a modern smart phone has its crazy even samsung dont start shipping range specific docks for android devices!
I would love nothing more than my phone being on a dock over night charging! when i wake up to the alarm/custom song/internet radio station i press a button that keeps the music on then pops up todays appointments and meetings on my calendar! Then to top it off a text to speech engine reads out the headers from all my emails before cooking my breakfast and kissing me on the cheek goodbye
someone please make one before christmas time!
dan 6a said:
someone please make one before christmas time!
Click to expand...
Click to collapse
Unfortunately I think we may have missed Christmas (!!) but I believe there is something in the pipeline from one manufacturer that is developing Android docking solutions for later this year.

[Q] Using gps-500 with tablet?

I have a gps-500 (a usb based GPS receiver) from when my laptop worked and wondered if some guru out there found a way to make it useful with the tablet.
For the price, $19 or so to purchase the 'sensor', it would make the tablet become a cool GPS for any others where tethering is not an option.
(http: preceeds the line below, since I'm too new to post links)
//linux-tablet-pc.dhs.org/2010/12/13/gps-receiver-microsoft-pharos-gps-500-iii-gps-receiver/
googling "pharos gps-500 linux" turned up quite a few places of interest
I also wanted to thank the devs for the wonderful work they are doing to let us use with our newest toy.. i mean tool
Regards,
fuzzy
i'm using a bt-1000x travel recorder, it's a bluetooth gps, i't working great, all i have to do is use a special program on the gtab so it knows about the gps, works perfectly with google maps
fuzzyfuzzy104 said:
I have a gps-500 (a usb based GPS receiver) from when my laptop worked and wondered if some guru out there found a way to make it useful with the tablet.
For the price, $19 or so to purchase the 'sensor', it would make the tablet become a cool GPS for any others where tethering is not an option.
(http: preceeds the line below, since I'm too new to post links)
//linux-tablet-pc.dhs.org/2010/12/13/gps-receiver-microsoft-pharos-gps-500-iii-gps-receiver/
googling "pharos gps-500 linux" turned up quite a few places of interest
I also wanted to thank the devs for the wonderful work they are doing to let us use with our newest toy.. i mean tool
Regards,
fuzzy
Click to expand...
Click to collapse
was wondering if you had gotten this going yet? I have a BU-353 usb gps receiver and haven't gotten it to work yet. also haven't found (so far) any threads in the Gtab forums talking about if usb gps work or not with the modified firmwares.
Nothing working for mine so far. I had looked at this,
wiki.navit-project.org/index.php/Navit_on_Android
it "works", as in 'it wont crash', no maps show though. I have not yet posted any questions or such to see if anyone knows a way to make the program take its input from my gps receiver. Though it may be as simple as linking the programs expected input device to /dev/USB (or whatever the proper syntax is)
The nasty thing is I had to get the Google Market working on the dev kits virtual device so I could use the virtual device to download a supplementary apk which was required by Navit (a text to speech apk) ...(the market via my tablet couldn't find it, or GPSTether either)
And found this as well, still no joy
androlib.com/android.application.com-gpstether-xAzq.aspx
I'm so new to all this android stuff, 3 weeks, but I'm having a wonderful time playing and experimenting
Regards and have fun,
Fuzzy
Was there any more info on this? I just bought one of these GPS units and can't get it to work.

ADB interface for microcontrollers

After all the messing around with the serial port kernels (disadvantage: needs rooting, only works on some fones) and more recently the serial out using the headphone jacks (disadvantage: output only, and kinda slow at 24000bps max) I set out to do an ADB interface for a microcontroller, so as to allow for sensor and motor control from the phone from there. So far so good. If you want to see my results so far (and get the yummy software and schematics -- I sell kits, but it's all free-as-in-speech) check the instructions out.
http://robots-everywhere.com/re_wiki/index.php?title=PropBridge (only source for now)
http://robots-everywhere.com/re_wiki/index.php?title=Serial_on_Android_using_the_audio_port (also available on market, search "serial out" and it'll show up)
Heh, guess nobody cares. Anyway, the relevant apps are now on market, if anyone wants the source just message me.
Last bump...
It's on hackaday http://hackaday.com/2011/03/29/propeller-android-communications-using-debug-mode/ also a number of cool android hacks, usually hardware related.

Categories

Resources