#164638 - 10/06/2003 17:29
Re: GPS and serial problems
[Re: oliver]
|
journeyman
Registered: 14/03/2002
Posts: 94
Loc: Pennsylvania
|
You could try communicating with it in hyper terminal just to see if it works. Set hyper terminal to 9600 baud, 8 bits, no parity, 1 stop bit, no flow control. It should say "EARTHA" over and over. If you type "EARTHA" and press enter it will start spewing binary data.
|
Top
|
|
|
|
#164639 - 10/06/2003 17:33
Re: GPS and serial problems
[Re: DomoKun]
|
addict
Registered: 02/04/2002
Posts: 691
|
I guess, sometimes i don't think that much, because connecting with hyperterm never crossed my mind
_________________________
Oliver
mk1 30gb: 129 | mk2a 30gb: 040104126
|
Top
|
|
|
|
#164640 - 10/06/2003 19:07
Re: GPS and serial problems
[Re: DomoKun]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
9600 baud If that's the case, I'd imagine that you'd need to set the empeg to run at that speed, too. (It's possible it could negotiate to a different speed, but you know it works, at least to some extent, at 9600.)
_________________________
Bitt Faulk
|
Top
|
|
|
|
#164641 - 10/06/2003 19:31
Re: GPS and serial problems
[Re: wfaulk]
|
journeyman
Registered: 14/03/2002
Posts: 94
Loc: Pennsylvania
|
In the config.ini I have car_rate set to 9600 and I browsed through the gpsapp source code and see that it opens the serial port at 9600 baud when protocol=earthmate is in the config.ini which I also have set.
I'm not too much of an electronics person, but can I simply apply a 6v voltage from a 3rd source to pin 4 and add another wire to pin 5 for ground? Is that dangerours to the gps receiver or the empeg in any way if i try that?
According to http://www.qsl.net/ka9mva/earthmate.htm it says I can power the unit from pin 9 with 6 volts. Is it safe to try to send 6 volts there? The page doesn't say where I should ground it, should that be grounded to pin 5 as well if I do that? Maybe if the unit is power from pin 9 instead of batteries it won't require the DTR signal.
|
Top
|
|
|
|
#164642 - 11/06/2003 11:29
Re: GPS and serial problems
[Re: DomoKun]
|
journeyman
Registered: 14/03/2002
Posts: 94
Loc: Pennsylvania
|
Ok, I rigged up my serial cable as illustrated in the attached picture. I no longer need batteries to power the gps unit and this setup works perfectly with my laptop. But it still won't work with gpsapp. And I tried switching pins 2 and 3 just in case, but I think I don't need to because of how I connect my laptop to the empeg.
So I think I got the hardware part of this problem solved and now it is some software problem. I'll try going through all the software suggestions in this thread again to see if it makes a difference.
Attachments
163420-gps-empeg.gif (178 downloads)
|
Top
|
|
|
|
#164643 - 11/06/2003 11:44
Re: GPS and serial problems
[Re: DomoKun]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Silly question, did you try just connecting pin 9 straight-through to the GPS and seeing if it would power the unit without the batteries (i.e., foregoing the transformer)? Based on the quote you posted about pin 9 earlier in this thread.
I know that's not useful for the empeg connection (since empeg doesn't use pin 9), but I was wondering if it worked for the laptop connection.
|
Top
|
|
|
|
#164644 - 11/06/2003 11:59
Re: GPS and serial problems
[Re: tfabris]
|
journeyman
Registered: 14/03/2002
Posts: 94
Loc: Pennsylvania
|
I'm not sure if I totally understand your question. But I just tried the following tests between my laptop and the gps:
Pins 2,3,5,9 straight-thru, no batteries: doesn't work
Pins 2,3,4,5,9 straight-thru, no batteries: doesn't work
Pins 2,3,5,9 straight-thru, with batteries: doesn't work
Pins 2,3,4,5,9 straight-thru, with batteries: works
Pins 2,3,4,5 straight-thru, with batteries: works
Pins 2,3,5 straight-thru, 6v to pin 4 with batteries: works
Pins 2,3,5 straight-thru, 6v to pin 4 no batteries: doesn't work
Pins 2,3,5 straight-thru, 6v to pin 9 with no batteries: doesn't work
Pins 2,3,5 straight-thru, 6v to pin 4 and 6v to pin 9 with no batteries: works
|
Top
|
|
|
|
#164645 - 11/06/2003 12:46
Re: GPS and serial problems
[Re: DomoKun]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Wow, that's a useful chart.
It's telling us that yes, for sure, the earthmate needs DTR high to work.
But you're saying that the 6v adapter setup that works for your laptop doesn't work with the empeg. Interesting. Assuming the connection to the empeg is a good connection, then you're right, it's down to software issues.
And you're sure you can communicate with the empeg at all? For instance, laptop connected to empeg via Hyperterminal at 9600bps works? (i.e., are we sure the serial port on the empeg sled is working and at the correct speed?)
|
Top
|
|
|
|
#164646 - 11/06/2003 12:48
Re: GPS and serial problems
[Re: tfabris]
|
journeyman
Registered: 14/03/2002
Posts: 94
Loc: Pennsylvania
|
I've tried doing a lot of config changes and I still can't get it to work. I tried to do a little test though. When the earthmate has power and DTR is on, it starts sending "EARTHA" and a linefeed over and over. It expects the computer or empeg to respond with "EARTHA" and a return after which it will start giving binary data. Browsing through the gpsapp source code it should be doing exactly that.
So I thought I would do a little test and connect hyper terminal to gpsapp and just type "EARTHA" and see if it would respond with "EARTHA", but nothing happens. It sits there at the "waiting for data from gps receiver" screen and responds nothing to hyper terminal. What could this mean?
|
Top
|
|
|
|
#164647 - 11/06/2003 12:52
Re: GPS and serial problems
[Re: DomoKun]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
So I thought I would do a little test and connect hyper terminal to gpsapp and just type "EARTHA" and see if it would respond with "EARTHA", but nothing happens. Great test! Good idea.
Are you sure that the serial connection to the player is working? Can you "Q" to a shell prompt, for example?
What could this mean? It means that either GPSapp isn't seeing the EARTHA (i.e., serial problems either software or hardware or cabling), or that there's a bug in GPSapp that's preventing it from responding. You sure the GPSapp binary is the most recent one?
|
Top
|
|
|
|
#164648 - 11/06/2003 12:56
Re: GPS and serial problems
[Re: tfabris]
|
journeyman
Registered: 14/03/2002
Posts: 94
Loc: Pennsylvania
|
Are you sure that the serial connection to the player is working? Can you "Q" to a shell prompt, for example? I've been always forcing AC mode to connect my laptop to the empeg, and that works fine. In car mode, I can't Q to a shell prompt, but I think that is by design since the player is started with -s- in car.
|
Top
|
|
|
|
#164649 - 11/06/2003 12:57
Re: GPS and serial problems
[Re: tfabris]
|
journeyman
Registered: 14/03/2002
Posts: 94
Loc: Pennsylvania
|
I have gpsapp-0.17, is that the newest one?
|
Top
|
|
|
|
#164650 - 11/06/2003 12:58
Re: GPS and serial problems
[Re: DomoKun]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
In car mode, I can't Q to a shell prompt, but I think that is by design since the player is started with -s- in car. Since that's optional in the latest hijack, try turning that off and seeing if you can get a 9600bps shell. Remember you have to reboot the player after changing that hijack setting.
|
Top
|
|
|
|
#164651 - 11/06/2003 13:00
Re: GPS and serial problems
[Re: DomoKun]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
I have gpsapp-0.17, is that the newest one? Yeah. I'm assuming you have a way to check the binary on the player to be sure... I don't remember an "about" screen in GPSapp (my apologies if I'm wrong about that).
|
Top
|
|
|
|
#164652 - 11/06/2003 13:20
Re: GPS and serial problems
[Re: DomoKun]
|
enthusiast
Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
|
Wow, long thread. I just skimmed through it, so I probably missed half of it.
A couple of notes. gpsapp sets the baudrate on the serial port when it opens it during startup (nmea & earthmate use 4800, trimble tsip uses 9600 etc.)
I've had trouble myself with having the [gpsapp] section in config.ini. Just try to pass the protocol on the command line, i.e. start it as 'gpsapp earthmate'.
Finally, the serial connector on my sled turned out to be not entirely swapped, things worked with a null-modem adapter when the cable only passed RX,TX and ground, but didn't work right with a full cable. In fact it looks like only RX and TX are swapped, but the rest (RTS/CTS/DTR/DCD) are in a straight through configuration. So the best thing to try would be a straight through cable with only RX and TX swapped.
You can derive power from one of the serial pins, I forgot which but it is in the faq somewhere. But you can't just plug a 12v->6v transformer in the middle because it is a DC current, and the transformer needs alternating current to work. I used a PT-5101A, which is a switching regulator that turns 9-38V into a stabilized 5V without turning half of the drained energy into heat. However this part is pretty expensive and the 6V one even more so ($15), so you'd probably want to go for a simple 7806 regulator.
Also your picture was strange, why was (+) connected to the GND, and the (-) to the DTR pin on the gps?
_________________________
40GB - serial #40104051 gpsapp
|
Top
|
|
|
|
#164653 - 11/06/2003 13:32
Re: GPS and serial problems
[Re: jaharkes]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Which serial connector are you attaching the Earthmate to, DomoKun? The one on the sled or the one on the back of the empeg itself? The sled one is wired funny, as I remember.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#164654 - 11/06/2003 13:54
Re: GPS and serial problems
[Re: wfaulk]
|
journeyman
Registered: 14/03/2002
Posts: 94
Loc: Pennsylvania
|
Since that's optional in the latest hijack, try turning that off and seeing if you can get a 9600bps shell. Remember you have to reboot the player after changing that hijack setting. In the config.ini I have car_rate=9600 set, I set hijack to give the player control of the serial. This is in car thru the sled, no mode forced hijack. I have my laptop connected and hyper terminal set to 9600 baud. I press q and exits the player as expected. Hijack says it removed some menu entries and then i get a bunch of gibberish and it no longer accepts keyboard input. This gibberish is probably the empeg switching to 115200 baud, because if I reconnect at 115200 baud I am in the shell. Is this the expected behavior?
I've had trouble myself with having the [gpsapp] section in config.ini. Just try to pass the protocol on the command line, i.e. start it as 'gpsapp earthmate'. I tried that, still doesn't work.
You can derive power from one of the serial pins, I forgot which but it is in the faq somewhere. But you can't just plug a 12v->6v transformer in the middle because it is a DC current, and the transformer needs alternating current to work. I'm probably just using the wrong terminology. I think maybe I should call it a "voltage converter" not a "transformer" that I'm using. Its basically an old cigarrete lighter adapter for a cd player that I took apart and connected to the ignition and to pin 9 of the gps. Whatever it is, it converts the cars 12v DC to 6v DC 500mA.
Also your picture was strange, why was (+) connected to the GND, and the (-) to the DTR pin on the gps? Probably me just not knowing how to properly label things. I always thought that power was labeled as a negative - and flowed to the ground which was positive +, like on a battery? But the way I have the power connected works well with my laptop, so I think everything is right.
Which serial connector are you attaching the Earthmate to, DomoKun? The one on the sled or the one on the back of the empeg itself? The sled one is wired funny, as I remember I'm using the car's sled. I only have pins 2,3,5 connected to the sled, and it works with my laptop, so I'm pretty sure it should work with the gps.
|
Top
|
|
|
|
#164655 - 11/06/2003 14:05
Re: GPS and serial problems
[Re: DomoKun]
|
enthusiast
Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
|
n the config.ini I have car_rate=9600 set, I set hijack to give the player control of the serial. This is in car thru the sled, no mode forced hijack. I have my laptop connected and hyper terminal set to 9600 baud. I press q and exits the player as expected. Hijack says it removed some menu entries and then i get a bunch of gibberish and it no longer accepts keyboard input. This gibberish is probably the empeg switching to 115200 baud, because if I reconnect at 115200 baud I am in the shell. Is this the expected behavior?
No that it not the expected behaviour, in fact it seems to be behaving as if it is in AC mode. How does it behave when you force the player to DC mode with hijack?
_________________________
40GB - serial #40104051 gpsapp
|
Top
|
|
|
|
#164656 - 11/06/2003 14:20
Re: GPS and serial problems
[Re: jaharkes]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
gpsapp sets the baudrate on the serial port when it opens it during startup (nmea & earthmate use 4800, trimble tsip uses 9600 etc.) Aha, that's it then. His earthmate needs 9600, not 4800.
Right?
Maybe just break out the serial port speed for GPSapp into a separate config.ini entry?
|
Top
|
|
|
|
#164657 - 11/06/2003 14:21
Re: GPS and serial problems
[Re: DomoKun]
|
carpal tunnel
Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
|
Its basically an old cigarrete lighter adapter for a cd player that I took apart and connected to the ignition and to pin 9 of the gps. And if I recall correctly, those cig adapters just use a bunch of diodes in series to drop the voltage. Cheesy way to do it, but works.:)
|
Top
|
|
|
|
#164658 - 11/06/2003 14:33
Re: GPS and serial problems
[Re: tfabris]
|
enthusiast
Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
|
My memory is failing, the source actually has,
REGISTER_PROTOCOL("EARTHMATE", 9600, 'N', NULL, NULL, em_update);
So gpsapp is setting the right baudrate for earthmate.
_________________________
40GB - serial #40104051 gpsapp
|
Top
|
|
|
|
#164659 - 11/06/2003 15:15
Re: GPS and serial problems
[Re: jaharkes]
|
journeyman
Registered: 14/03/2002
Posts: 94
Loc: Pennsylvania
|
No that it not the expected behaviour, in fact it seems to be behaving as if it is in AC mode. How does it behave when you force the player to DC mode with hijack? Same behavior. The empeg boots and gives it bootup messages at 115200, once the player starts it goes down to 9600, once i hit q and press enter it goes back to 115200 at the shell.
|
Top
|
|
|
|
|
|