A13 and MOD-GPS

Started by antonio.pisano, February 15, 2016, 05:35:54 PM

Previous topic - Next topic

antonio.pisano

Hello everyone,

I am having problem using UEXT MOD-GPS on an A13 board. I know this has been asked many times in this forum, but I could not find a through answer nowhere. I have looked at

https://www.olimex.com/forum/index.php?topic=190.msg1943#msg1943
https://www.olimex.com/forum/index.php?topic=4416.msg18598#msg18598
https://www.olimex.com/forum/index.php?topic=190.msg1943#msg1943

on the blog https://olimex.wordpress.com/2013/03/08/connecting-gps-to-olinuxino-and-raspberrypi/

other than other documentation scattered around the Internet, but I could not come out with the definitive resource.

I am running stock Debian image from Olimex, A13_debian_34_90_mainline_u-boot_release_11_3. I connect MOD-GPSD to UEXT slot, near pins labelled as UART1. When A13 is booted with MOD-GPS attached, this is somehow mistaken as a keyboard and prevents me from booting. This is not a big deal for now, as I am more interested in getting an output from the sensor.

From blog, I expected the sensor file descriptor to be located at /dev/ttyS0. This was not the case, as this device is occupied by kernel console. I have moved kernel console from /dev/ttyS0 to /dev/ttyS3 acting in the uboot parameters and /etc/inittab (commenting the line as told in other posts).

In this github page https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A13/A13-OLinuXino-WIFI-MOD-GPS-LOGGER I read one should also disable UART1, and I have done so by acting in the fex file and converting in the script.bin. Proof of this change was I could not see entries for sunxi.uart1 in dmesg.

All this efforts never gave me a device file with a GPS output... I have seen there is chance one has to remap UART output so other slots can be used, but before I go there I'd like to know this:

is there anyone who could resume for me the passages required to get stock A13 Debian image to work with MOD-GPS from Olimex?

Thanks in advance, and feel free to ask for more information.

Antonio

antonio.pisano

In the end I found what I was missing here:

https://www.olimex.com/forum/index.php?topic=1933.0


In short, based on stock image for A13:
- in UBOOT partition, modify boot.cmd file to remove the 'console' part
- rebuild uboot image by 'mkimage -C none -A arm -T script -d boot.cmd boot.scr'
- get current fex configuration from UBOOT partition by converting script.bin into its original fex using bin2fex from sunxi-tools
- in the fex, set value for line saying 'uart_debug_port' to 0
- rebuild script.bin using fex2bin from sunxi-tools
- in system partition, modify /etc/inittab commenting the line at the bottom about /dev/ttyS0
- boot the system

Now using 'cat /dev/ttyS0' I can see my sensor spitting out nmea sentences. The problem of not being able too boot remains though:

how can I boot/reboot my A13 keeping MOD-GPS attached?

Thanks a lot for any hint on this.


Antonio

JohnS

Ideally you'd disable the MOD-GPS, i.e. shut it up, until the system is up and you're ready to use it.

You could use a relay to switch it out of connection.

In case it's just interrupting u-boot you should be able to see that by trying to boot then when it doesn't, disconnect the MOD-GPS and connect a serial console to see if you're stuck in u-boot.

In that case I suppose you could build a u-boot that does not look at its console.

Or rebuild u-boot to look at uart0.

John

Gerrit

cut of the UEXT connector and wire it to to uart.3 all problems solved.

GPIO-2 connector

pin3 3.3 Volt
pin4 GND
pin8 RX
pin10 TX

antonio.pisano

Thanks for your replies, I was going to look for a way to ignore any input before booting, but I would have hoped for a "soft, software" way  :)

So you say there's no way by u-boot configuration to tell it "stay deaf until boot"? I must enter the sources or move the UEXT on the board physically?


antonio.pisano

Found out the poorest man solution: set boot delay to 0!

in uboot console just type

setenv bootdelay 0
saveenv


Boot won't hang anymore and so there will be no chance for MOD-GPS to mess things around. To stop booting one can hold Ctrl+C while system boots and set delay value greater than 0 again, or just operate into boot.cfg.

That's all folks! :)