OpenWrt Forum Archive

Topic: GPS doesn´t work on WRT54GL

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello!

(Sorry for my bad english! wink )

I connected a GPS receiver to the serial port of my wrt54gl. The power supply to the gps receiver with 3.3 volt instead of 5 volt seems to be enough to run the receiver.

My Problem is: When I try the command "cat /dev/tts/1" I can see some symbols but not gps data.
gps data must look like this I think ("$GPRMC") but I get this for example:

®Åõ� ëvö¶v¶v­ÙÙ¶6mVöÖvmÖÚÖÖvö6-Övv­×ÚvíövíÚ

As bootscript I use this one:

setserial /dev/tts/1 irq 3
./stty -F /dev/tts/1 raw speed 4800

What Im doing wrong?

Thank you very much!!!!! big_smile

(Last edited by Cypher on 14 Nov 2007, 19:29)

At least Kamikaze's Busybox is compiled with stty disabled by default.

grep STTY .config

# CONFIG_BUSYBOX_CONFIG_STTY is not set

So, enable this option in menuconfig (Base System -> Busybox -> Configuration -> Coreutils -> [*] stty) then recompile and reflash.

(Last edited by forum2006 on 14 Nov 2007, 19:54)

No idea. I don't use third-party binaries. I always compile by myself and I don't use WR.

Maybe you need to invert/not invert the serial line?

I use 3 pins on the router: Pin 1 (VCC), Pin 9 (Ground) and Pin 5 (Rx).
I dont use Tx because the gps doesnt need it to run.
Thats right or?

What do you mean with invert the serial line? Invert Rx und Tx?

Thank you!! smile

Before we go further compile Busybox with STTY support and reflash your router. Everything else is wasting of time...

I thought it can run with the white russian but when there is no other way...

thx

(Last edited by Cypher on 15 Nov 2007, 18:20)

Is the GPS intended for direct connection to a RS232 port? If so, it is inverted. Use an inverter to undo the inversion.

For PC I use an USB-to-COM adapter when you mean that.
Does an inverter only invert rx and tx or manipulates it the data stream / electrical signals?

Hm my english is too bad. I cant follow. xD

My gps receiver is "TTL".
And the WRT is RS232. <- Is that right?

So I must invert it?

If it uses a DB type connector, it's most likely RS232 level.
If your router does not have a RS232 translator chip, it is TTL.

Now I have measured the voltage.
The WRT54GL must have an RS232 because the voltage is always +3 volt (logical 0 when RS232) and the GPS is TTL because the voltage is only 0 volt or +3 volt. (no -3 volt like rs232). Is that right?

Okay thank you! Now I try to get or make an TTL to RS232 converter for the TX line of the gps receiver.

Yes, try inverting it.

big_smile It works!! smile
I buyed the MAX233 Chip from www.reichelt.de
Thank you for help me!! smile

The discussion might have continued from here.