Author Topic: Converting USB back to UART  (Read 4214 times)

0 Members and 1 Guest are viewing this topic.

Offline tiofilo75Topic starter

  • Contributor
  • Posts: 37
Converting USB back to UART
« on: October 05, 2013, 07:27:34 am »
I have a BU-353 GPS receiver that I can plug to my computer and see my current position. My computer is able to recognize the device as a serial comport, so I decided to run it through putty to see if it works. Well needless to say I got a lot of random variables. The module has a  PL-2303HX which convert the UART into to USB, now my question is if its possible to convert back to UART through a micro controller? I could mod it where I can tap into the TX pin before it gets converted but I want to avoid this. Thanks.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10207
  • Country: nz
Re: Converting USB back to UART
« Reply #1 on: October 05, 2013, 07:38:38 am »
It is possible, yes.

The quickest way would be to write some simple code on a Raspberry pi to pass the data to its real serial port. Since its linux it should already have the USB-Serial driver.

Otherwise, to do it yourself on a mcu, you'd have to stuff around with USB host support and write a usb driver. It wouldn't be a very productive use of time.

A mod to get at the TX/RX inside the device really is the best solution.

If you want to avoid cutting holes in the case for another connector you could mount a bluetooth serial module inside. Then you can use another externally to receive the data and do with it whatever you want. Arduino etc..
« Last Edit: October 05, 2013, 07:42:45 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Converting USB back to UART
« Reply #2 on: October 05, 2013, 08:01:10 am »
The conversion back to UART will not fix your original problem - that you get random data on the virtual com port.

The PL-2303HX is transparent for the data. It just packs the serial data into USB. The virtual com port driver on your PC unpacks the data from USB and presents it to you - unaltered.

If you see random data now on the virtual com port you either have somehow messed up the communication parameters or it is indeed that the device sends exactly this random data.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10207
  • Country: nz
Re: Converting USB back to UART
« Reply #3 on: October 05, 2013, 08:36:48 am »
True, i assumed when he said "random variables" that he meant all the nema data variables.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27801
  • Country: nl
    • NCT Developments
Re: Converting USB back to UART
« Reply #4 on: October 05, 2013, 11:31:29 pm »
IMHO the baudrate is wrong. Look at the manual of the GPS receiver and setup Putty properly.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline eliocor

  • Supporter
  • ****
  • Posts: 522
  • Country: it
    • rhodiatoce
Re: Converting USB back to UART
« Reply #5 on: October 06, 2013, 02:19:51 am »
according to manual: http://www.globalsat.com.tw/products-page.php?menu=2&gs_en_product_id=2&gs_en_product_cnt_id=28&img_id=409&product_cnt_folder=8
you have to:
Quote
IMPORTANT:
1. You must change the default rate setting of your mapping software ‘s Baud Rate to 4800 if this is not currently set as such otherwise GPS data cannot be received.
2. Set Baud Rate 4800, Data Bit: 8, Parity: None, Stop Bit: 1, Flow Control: None
Have you done this? At what speed have you set putty? RTFM?

 

Offline tiofilo75Topic starter

  • Contributor
  • Posts: 37
Re: Converting USB back to UART
« Reply #6 on: October 07, 2013, 07:40:28 am »
O.k so my baud rate was in fact set up wrong. After I changed to 4800 it worked correctly with putty. Thanks. So I went ahead and tapped into the GPS so that I can get the TRX and was able to read the serial data. Now my problem is that I cannot get a satellite lock since I guess I was a little to brutal with the antenna  |O. I'm new to this and initially thought that the ceramic antenna was attached with a wire to a trace but it seems that it is not the case. I'm sure I screwed up the thing but I am now curios as to how the receiver picks up the signals. I am gonna try and see if there is a way to repair the antenna so that I can get my position again. I attached some pictures of how the antenna mates with the PCB. Thanks for the help so far, anymore recommendations will be appreciated.
 

Offline magiccow

  • Contributor
  • Posts: 18
  • Country: gb
Re: Converting USB back to UART
« Reply #7 on: October 07, 2013, 02:20:50 pm »
Many of the older external units (like the eTrex units) are unwanted now and turn up cheaply on ebay.  You could probably get eTrex + serial cable for a comparable price to the BU-353 and save hacking it apart.
c:\> format c: /s
 

Offline RMS95

  • Contributor
  • Posts: 12
  • Country: nl
    • RMS95
Re: Converting USB back to UART
« Reply #8 on: October 07, 2013, 06:08:56 pm »
For your problem
Check out the datasheet, probably you have to convert the data.
A while ago I saw some tutorials about bad GPS antennas, try googling a bit =)

For converting back to serial (in case someone just landed on this page with Google :p)
Temporary
Try hooking up an FT232 breakout board or something that does the same job. (you can mirror/echo them with your PC) That should work I guess.

Permanent
In my opinion, an acceptable permanent solution, is any microcontroller with USB built in.
Something like PSoC5 is quite easy to program and should do the job.
The advantage of using a microcontroller is that it's smaller, more efficient and cheaper.
Note that USB usually is a lot quicker than UART of course.

Quote
I could mod it where I can tap into the TX pin before it gets converted but I want to avoid this. Thanks.
Still, you really are turning water into wine and trying to get the water back....
 

Offline PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5192
  • Country: nl
Re: Converting USB back to UART
« Reply #9 on: October 07, 2013, 06:47:15 pm »
I'm new to this and initially thought that the ceramic antenna was attached with a wire to a trace but it seems that it is not the case. I'm sure I screwed up the thing but I am now curios as to how the receiver picks up the signals. I am gonna try and see if there is a way to repair the antenna so that I can get my position again. I attached some pictures of how the antenna mates with the PCB. Thanks for the help so far, anymore recommendations will be appreciated.

Well, there is a pin and there is a hole (J1), so what else do you need to put it back together again?
Keyboard error: Press F1 to continue.
 

Offline tiofilo75Topic starter

  • Contributor
  • Posts: 37
Re: Converting USB back to UART
« Reply #10 on: October 07, 2013, 07:22:45 pm »
Quote
Well, there is a pin and there is a hole (J1), so what else do you need to put it back together again?

I don't know, I thought that it would be just that simple but the GPS cannot get a satellite lock anymore.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27801
  • Country: nl
    • NCT Developments
Re: Converting USB back to UART
« Reply #11 on: October 08, 2013, 12:43:13 am »
Its seems to me the PCB got damaged during disassembly of the receiver.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf