Can we use the USB port to a serial device? - Xoom Q&A, Help & Troubleshooting

I have a piece of old equipment at work that i use a DOS program and a USB to serial adapter with a null modem cable to back up files off of the equipment. I installed DOS box and it runs my equipments program perfectly. Is it possible to communicate through the XOOM's USB port to my equipment using a USB to Serial adapter and null modem cable to do this with? Any help or advice would be great.
Thank You,
-Nathan

I guess I should take that as a NO!!!. I will pay to make this happen though!!

Bump
Sent from my PC36100 using XDA App

those usb to serial adapters use a Prolific chipset. Linux requires a kernel module to work with them. I suspect you'll need to build the kernel module and add a script to insmod it.

My boss will gladly pay someone to get this to work. If there are any Devs that want this project contact me and we can get this going. I know i can approve 1K to make this happen.

It can be done.
I have currently got my xoom setup so that I have a usb serial adapter connected to it for debugging purposes.
Do you know what chipset your usb to serial adaptor uses? I can then check if it is supported by the linux kernel.

evonate said:
My boss will gladly pay someone to get this to work. If there are any Devs that want this project contact me and we can get this going. I know i can approve 1K to make this happen.
Click to expand...
Click to collapse
I'm in. We'll start research. Sounds like fun.

Sign me up too. I would love to serial into Cisco devices with my xoom.
The following pieces of information i have already:
My usb2serial Adapter uses the prolific pl-2303 chipset
it is driven by the pl2303 kernel module.
the module depends on the usbserial module, which is already in tiamat as well as stock (its needed for the 3g modem i think)
So if i am correct we need the pl-2303 kernel module and a piece of software (minicom, cu) to use the serial (as far as i know there is no software in the market for this)

ok, i took a quick look at the tiamat git repository and it contains the pl2303 driver.
Now i am going to try to compile my own tiamat kernel
First time compiling linux for an android device

I would love to see this happen. I have tons of Cisco swithes and routers that I always have to configure on the fly. I know I can buy a bluetooth adapter but still have to power that :-( Would love to be able to hookup my otg cable, then my usb to serial, then to my console cable to configure everything.
Just not sure how to get the usb serial drivers installed on android :-(
If this ever gets working then my IT dept. will be getting a Xoom as well.
Thanks,
Ken~

Any updated news on getting this to work? Really don't want to spend $60 for a bluetooth serial adapter.
Ken~

I can try and include a few optional modules for the next tiamat release for usb serial devices

This is an old thread but in case ...
I also have to do serial communication with an old printer.
For now, I'm trying to prototype with an arduino mega using a trendnet usb to serial adapter.
I'm using the sample app on the market of this lib :
http://slickdevlabs.com/slick-usb-2-serial-library/
I actually can send and receive bytes on the xoom.
The only problem for now is that characters receive or send are not correct. I Don't understnd but still searching.
Any way, it should work ...
Mike

install bt5 and then install minicom under bt5. The pl2303 module with the pl2303 usb serial adapter does this very well.

bt5 you mean "backtrack 5" ?
I must use default rom ... My customer doesn't wan't to loose it's warranty ...
And usage of Motorola xoom is sure.
It might be another tablet.
Using capabilities that only requre Android 3.1 (without root) and a USB Host allow to change of device easily.

Related

Howto: Android G1 Serial cable

Hey folks. I put some instructions up that state how to make a G1 Serial to USB adapter. This could be handy for kernel hackers and could be modified too for other purposes which I plan to explore...
http://www.instructables.com/id/Android_G1_Serial_Cable/
Enjoy, and please leave comments on the instructables website if you see something wrong or confusing!
CMOS vs TTL levels can mean the difference between a functional device and a dead UART.
anyone know if it's actually 5v tolerant or does in fact require CMOS voltage level?
I can tell you the G1's pins output 2.8v. I think I would stick close to that. The only reason I used the 3.3v cable is because I have seen pictures of a cable an actual android dev has allegedly used 3.3v levels.
Did you find the instructions confusing since I claimed CMOS-TTL? I actually switched it to just say 2.8v levels now to be safe. I guess saying TTL was a bad word choice since it can go up to 5v although I do specify you need a 2.8 or 3.3v serial to usb adapter in the required materials section.
Nice.
Next step is to disconnect the console and allow control of rs232 devices from the phone.
Working on it You need to disable H2W and PIQ AFIK.
ya it was the TTL that made me second guess.
I have several TTL level uarts that will smoke CMOS level inputs. I wasn't about to try one of them unless you had said you did with no problems.
2.8 is odd, but i imagine it's still some form of low voltage MOS and can handle 3.3v without problems.
macpod said:
Working on it You need to disable H2W and PIQ AFIK.
Click to expand...
Click to collapse
Thanks for the great tutorial !
I've compiled a kernel with CONFIG_TROUT_H2W, CONFIG_MSM_FIQ_SUPPORT and CONFIG_MSM_SERIAL_DEBUGGER unset
I understand that the UART port appears as /dev/ttyMSM2, however I can't measure anything on the TX pin when sending data from the Dream, i.e :
echo "Hello" > /dev/ttyMSM2
Have you succeeded in transmitting data in any direction ?
What are you using to measure? A multimeter isn't going to work.. you would need a scope.. or serial device of compatible voltage levels able to run at the g1's baud rate.
I didn't have a build env setup on my computer and I only got everything setup/compiled last night because of the cupcake merge into master (I might post instructions on how to build everything before the march 18th merge if there is interest).. so I haven't had a chance to disable the debug console/etc and test yet. I plan to work on that tonight and tommorow.
Some interesting things I have found sofar and questions if you guys happen to be researching this stuff:
-Booted normally you get a "debug>" prompt. ps works.. but I haven't researched what other commands are possible. What have you guys found?
-With the phone powered off, if you plug the serial cable in and read it, it tells you the charging mode and some other characteristics/etc.
-The engineering spl has a serial console you can send commands to. I haven't research what commands are possible yet.. again, what have you folks found?
edit: I bet if you attached a piezoelectric speaker between the tx and gnd pins.. then piped /dev/urandom to /dev/ttyMSM2, you could test that way too.. but that's unconfirmed.
Thanks for your answer, I was measuring with a scope.
I'll try again with a default msm_defconfig'd kernel and see if I get a console.
Looking forward to hearing of your tests !
macpod said:
-The engineering spl has a serial console you can send commands to. I haven't research what commands are possible yet.. again, what have you folks found?
Click to expand...
Click to collapse
Not only the engineering spl has that. You can use either usb or serial to talk to the interface. What is more interesting : Serial lets you talk to the radio directly (oemsbl) and outputs debug info. Access to all commands is only given using engineering spl and security unlocked device. The commands however are already in the wiki.
macpod said:
edit: I bet if you attached a piezoelectric speaker between the tx and gnd pins.. then piped /dev/urandom to /dev/ttyMSM2, you could test that way too.. but that's unconfirmed.
Click to expand...
Click to collapse
Totally confirmed. Sounds just like a good old modem
Cya,
Viper BJK
Ok, taxes put me on hold.. but I'm back and have it working. Here is the config file I used to compile the kernel.
Speed is set to 9600 8N1, the G1 serial device is /dev/ttyMSM2. If you were curious, /dev/ttyMSM0 is bluetooth related.
I'll post up instructions later on how to compile and install it as well as a boot.img for convenience if folks are interested.
macpod said:
Ok, taxes put me on hold.. but I'm back and have it working. Here is the config file I used to compile the kernel.
Speed is set to 9600 8N1, the G1 serial device is /dev/ttyMSM2. If you were curious, /dev/ttyMSM0 is bluetooth related.
I'll post up instructions later on how to compile and install it as well as a boot.img for convenience if folks are interested.
Click to expand...
Click to collapse
Great, thanks a lot for all your contributions! I am looking forward to your instructions.
Hi all xda users ,
Thank you for your work macpod.
I am looking forward to your instructions also.
TIA
regards,
Maciej
I would love to get a boot.img as well, I'm not very skilled with all that and only want the serial console to interface the G1 with my Arduino.
Just ordered the parts for this. Thanks.
Okay, I got it working! Instructions are for Ubuntu only, sorry. I believe you need a rooted phone with engineering (or hardspl or comparable fastboot-enabled) bootloader and macpods serial to usb cable (or something comparable).
1) Compile Android source with Dream-specifics as described by this. You probably only need prebuilt and kernel, but I'm not very familiar with git and just got everything.
2) cd into the kernel directory, copy macpods serial9600config from above as .config there
3) "make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi- oldconfig" I don't remember if this asks for anything at all, if it does, go with the suggested answers
4) "make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-" - You now have a kernel image for Android 1.0 (I think), but for me it works with JFv1.51 as well
5) You can now compile fastboot in $ANDROIDSOURCE/system/core/fastboot or grab the precompiled binary from http://android-dls.com/files/linux/fastboot
6) Hook up your phone, power off, start with camera+power. Press back when the skating androids appear to switch to fastboot mode.
6) Do ./fastboot boot $ANDROIDSOURCE/kernel/arch/arm/boot/zImage and wait. This takes a moment, then it should start.
You know should have /dev/ttyMSM2 which you can echo into (echo "hello world" > /dev/ttyMSM2) or listen to (cat /dev/ttyMSM2). For instance, I'm building an Android app that passes GPS coordinates over the console to an ArduPilot board and will provide telemetry to a ground station. Testing it with "Serial port terminal" from the Ubuntu repository works as well (remember to choose 9600 bauds and the right port).
Thanks to to macpod for his excellent work and help with building the cable, Google for providing such a kick-ass (somewhat) open phone and all the kernel hackers and rooters for their work.
I just wrote this from the top of my head, just post if you have trouble getting this to work.
edit: I attached my kernel image, which should allow you to skip steps 1 - 4 if you're so inclined.
do you guys think this will help all the bricked devices? just a question i don't have a bricked device to test but would be nice if did
So let me get this straight? The cable allows direct access to the motherboard and all the hard were in it? Sorry i am a complete noob
Well, I don't know nothing about bricked devices, but if you can still get them into fastboot mode, you can flash every partition on the phone, so you should be able to resurrect it.
The cable normally allows you access to a debug console (you see kernel outputs while booting, then get a console). I don't know what that is for (maybe USB debugging for developing apps, dunno. I read somewhere that you can directly access the GSM chip, issue AT commands and the like). You'd need to look into that. And with a custom kernel you get a regular serial console trough that extended USB port on your phone, just like telnet'ing into your phone or whatever. Normal unix stuff. And this console can be accessed from Android apps as well.
do we know what config options/boot options should be used, so we can receive the kernel output while it loads from serial?

[Q] Serial Output on Android Phone

Hello! I am new to this forum, I figured you guys may be able to provide some input on a project I want to undertake.
I would like to use an Android phone (Probably an unlocked Chinese model running 2.2) as the brains for a remote control project. Since the phone has a GPS, Camera, and GSM connectivity all built in (and low power consumption) it seems it would be the perfect solution. To control the device, I was hoping connect a serial/usb servo controller (Pololu Micro Maestro) to the phone. However, I am having trouble finding any information on the viability of connecting a serial device to the phone – can this be *reasonably* done?
I appreciate any information you can provide!
try a google search for bluetooth to serial adapter. that will be the quickest/easiest/most likely to be workable hack.
next up would involve USB-Serial adapter(choppin wires to attach your necessary connector), generics are dirt cheap, but you would need kernel support. drivers/usb/serial/ is most likely where you would be looking, most of the generics use prolific chips. quick check would be to lsusb in a terminal and see if something pops up.
yea id go with bluetooth - serial adapter.
That is a good idea... I will do some checking. Thank you!

[Q] android tablet to use as point of sale

Hi. At the company I work for, we are looking for a tablet pc to use as point of sale on small stores. The idea is to stop using desktop pcs, and use tablets instead.
The exact requirement is a tablet that is:
1. Cheap (US$ 500 max)
2. Has USB Host ports or USB OTG. USB accesories to be connected include keyboard, USB to Serial, USB to Parallel converter, or USB Dot Matrix Ticket printer(Epson TMU), and a USB Wired network adapter.
3. If possible, one that has Wired network conectivity(RJ-45)
4. Has unlockable bootloader. It's best if it's provided by the manufacturer, but as long as it works, it's okay.
5. Tha manufacturer provides kernel source code.
Other conectivity options, such as WiFi or 3G really don't matter, as those will be disabled, because they are not needed.
The tablet would go inside a specially designed case, together with the ticket printer, the power adapters for both, and maybe the keyboard.
Any suggestions? Thanks in advance

[Q] ARHD latest and serial 2 usb, help?

I am running ARHD 3.2.2 on a TF101 and I really need a usb 2 serial adapter to work. It appears that I need the following: ftdi_sio.ko, usbserial.ko and also the prolific usb<>serial adapter module since I use both chipset adapters.
Does anyone have a compiled version of these for this kernal?
Thanks Matt
Nobody doing anything with serial on ICS? I am a network support person and could really use the ability to console into equipment.
Please
I'm in a simaler predicament with getting a usb headphone adapter to work, android lacks many of the usb drivers needed.
You'd have to make it yourself most likely, but it's a relatively simple cut and paste from the linux drivers.
Run a lsusb in terminal emulator before and after you plug in the device, and get the id number, then look for linux drivers to port.
Sorry I couldn't be of more help.

Serial to USB adapter

I have a Prolific 2303-based USB to serial adapter that I've used before with my Galaxy SII on my tablet with the keyboard dock. The device is detected according to dmesg, and is attached to ttyUSB0. But, all of the serial communication apps I've tried can't find it. There is an error with the Slick apps that says it could not find all necessary endpoints. Is anyone else using a cable for this purpose with their tablet? Care to share app, rom, kernel info? I'm using the nightly CM10.1 build from today(3/12/2013).

Categories

Resources