EM-406A with OpenWRT on OM1P router

Greetings,

I am attempting to hook up an EM-406A to a wireless router that is running OpenWRT Kamikaze 8.09, and I am running into some snags.

The EM-406A came to me as part of the Globalsat BR-355 package. This package comes with an adapter that is a USB to serial, and also appears to have a level shifter in it. If I understand correctly, the EM-406A is using logic-level (TTL) voltages.

The router is an OM1P from www.open-mesh.com. This is a Accton MR3201A device, the same as the popular La Fonera FON2100 router. According to this documentation, the router is using 3.3v on its serial port:

http://wiki.openwrt.org/oldwiki/openwrt … fon/fonera

I presumed that 3.3v means TTL voltages, thus I presumed I could hook up the EM-406A to the serial port on the router with ease.

For my testing I am powering the EM-406A unit from a 5v power supply. I then hooked up the RX, TX and ground wires to the USB-serial adapter that came from Globalsat. I then plugged the adapter into my laptop.

On my laptop I used the gpsctl tool from gpsd to configure the EM-406A to send NMEA instead of binary. On my laptop I can now cat /dev/ttyUSB0 and see NMEA strings (after setting the serial port speed to 4800, of course).

Leaving the connections to the USB-Serial adapter I then make additional connections to the router: I hook up the TX and ground from the EM-406A to the router.

On the router I set the serial port to 4800 and try cat /dev/ttyS0

But all I get is garbage, no nice NMEA strings. Meanwhile, the laptop is still receiving the NMEA strings just fine. I’m not sure if my problem is software or hardware. I made many assumptions with the hardware so I don’t feel confident that the hardware is correct.

If someone could comment on the hardware hookup that would be much appreciated.

Cheers,

robert

After some more reading and some help from the folks on IRC, it would seem that I have a problem of inverted logic. This has been discussed before here:

viewtopic.php?t=17533&sid=c5bd69ce18504 … d61a7b1b53

The last poster, Johan Adler, has this circuit on his website which utilizes a 74HC240 to invert the logic from the GPS unit:

http://jarduino.com/2009/08/connect-br-355-gps/

Do you believe that his circuit would be a good solution for my problem?

Thanks,

Robert

(Also sent as reply to PM, copy here for other readers.)

For converting levels from classic RS232 to TTL UART any inverter should be fine, the '240 has more inverters than needed so you could use some other IC.

The GPS will need 5V, I think, so I can not promise that it will work with 3.3V. You may be able to use 3.3V signal levels, or you might need a level converter (Sparkfun has a nice little board for this).

My guess is that you will need to provide 5V Vcc to the GPS and maybe to the inverter IC too, and also a signal level converter in order to let the router use 3.3V tx/rx while the GPS can use 5V tx/rx.

Regards,

Johan Adler

PS Something is broken in my Wordpress installation for jarduino.com making comments and tags not working.