Audio port (headphone) jack and RS232

dmtulsa

Member
Licensed User
Longtime User
Does anyone know if the audio port (headphone) jack doubles as a RS232 port? If so how would I talk to it with B4A?

I ask this because I've seen devices like the "Square credit card reader" plugs into the audio jack. How does that work? I have an Asus Transformer Prime and since it does not have a usb port unless the docking station is used I'd rather use the audio jack port instead of a usb-232 converter.

After looking into it some more I'm not sure its possible

Thank you
Doug
 
Last edited:

walterf25

Expert
Licensed User
Longtime User
Audio RS232

Yes, i have created a library that does that exactly, since the audio jack is Stereo, you can use left channel as one RS232 port and the right channel as a second RS232 Port.

check out the library here

You will have to build the circuit in order to translate the output signal to TTL level, just follow the thread above.

if you have any questions, let me know!

Enjoy!
 
Upvote 0

dmtulsa

Member
Licensed User
Longtime User
I saw that in another post, correct me if I'm wrong but it's only for TX and not RX correct. It would be great if it does both.

I'm just trying to find a cheap way to talk to a PIC MCU. The IOIO is pretty cool but cost way too much.

There is the Slick 2 lib for FTDI and some other USB-serial I'm looking at. And FDTI came out with an android driver for their new usb-serial chip that I'm also looking at.

Lastly there is USB HID but reading some posts its a bit unstable. I need to see if my USB descriptor will work with the USB lib

Thanks
Doug
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Audio Serial Library

you are correct at the moment is only for Transmission, the way i do 2 way serial communication is with a Bluetooth module, I use the RN-42 module, from roving networks, it's actually very simple to use, i have done many projects with this module already, let me know if you need any help with this.

here's the datasheet for the module



Cheers,
 
Upvote 0

dmtulsa

Member
Licensed User
Longtime User
Ok thank you! Please let us know when the RX is working. This will fantastic even at slow baud rates.

Doug
 
Upvote 0
Top