iC880/Raspi and Neo6 GPS problem

I mean on the Neo6 module itself. My eyes and hands aren’t quite as good as they used to be :wink:

OK, what’s going on here… this is (at least) the 3rd or 4th time I’ve enabled SPI, per your suggestion! I didn’t check this because I knew I’d done it. :confused: Doesn’t it persist?

It should persist. However I haven’t tested with recent Raspian images as I’m using resin.io exclusively for gateways lately.

Thanks - again - for your help.

I’ll check online and see if I can find anything.

I’m wondering if it isn’t losing SPI state, but rather than Raspi3 SPI timing problem you’ve mentioned on other threads? :think:

In the meantime I’ve got my magnifying lamp out and soldered up the PPS connection :slight_smile:

I’ve ordered a Pi 2B. If I can’t get this sorted I’ll give it a go with that.

Oddly, my production gateway doesn’t have this issue… but then it doesn’t get switched off!

In the meantime, on the off-chance that I messed something up at system level, I’ve reflashed the card from my safety copy again. Concentrator is coming up reliably…

GPS is giving errors tho. I’ve remapped the serial ports on the Pi3, so sudo cat /dev/ttyAMA0 gives this with the iC880a disconnected:

$GPGSV,3,3,10,27,84,096,24,30,13,316,*7D

$GPRMC,224213.630,V,080318,M*4D

$GPVTG,M*33

$GPZDA,224213.630,08,03,2018,00,00*57

$GPTXT,01,01,01,ANTENNA OK*35

$GPGGA,224214.630,0,00,25.5,*62

$GPGLL,224214.630,V,M*7F

$GPGSA,A,1,25.5,25.5,25.5*02

$GPGSV,3,1,10,07,16,291,08,51,294,28,10,53,118,11,10,263,*70

$GPGSV,3,2,10,15,08,034,16,38,179,21,21,067,26,12,168,*78

$GPGSV,3,3,10,27,84,096,24,30,13,316,*7D

$GPRMC,224214.630,V,080318,M*4A

$GPVTG,M*33

$GPZDA,224214.630,08,03,2018,00,00*50

$GPTXT,01,01,01,ANTENNA OK*35

$GPGGA,224215.630,0,00,25.5,*63

$GPGLL,224215.630,V,M*7E

$GPGSA,A,1,25.5,25.5,25.5*02

$GPGSV,3,1,10,07,16,291,08,51,294,28,10,53,118,11,10,263,*70

$GPGSV,3,2,10,15,08,034,16,38,179,21,21,067,26,12,168,*78

$GPGSV,3,3,10,27,84,096,24,30,13,316,*7D

$GPRMC,224215.630,V,080318,M*4B

$GPVTG,M*33

$GPZDA,224215.630,08,03,2018,00,00*51

$GPTXT,01,01,01,ANTENNA OK*35

$GPGGA,224216.630,0,00,25.5,60
$GPGLL,224216.630,V,M
7D
$GPGSA,A,1,25.5,25.5,25.5*02
$GPGSV,3,1,10,07,16,291,08,51,294,28,10,53,118,11,10,263,*70
$GPGSV,3,2,10,15,08,034,16,38,179,21,21,067,26,12,168,*78

Once I reconnect the concentrator, gps opens ok but I get all this spam:

Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: INFO: Contact email configured to "mark@annasach.net"
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: INFO: Description configured to "LoRaWAN Brentford Development"
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: INFO: [main] TTY port /dev/ttyAMA0 open for GPS synchronization
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: INFO: Successfully contacted server router.eu.thethings.network
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: INFO: [main] Starting the concentrator
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: INFO: [main] concentrator started, radio packets can now be received.
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: INFO: [up] Thread activated for all servers.
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: INFO: [down] Thread activated for all server router.eu.thethings.network
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: INFO: GPS thread activated.
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0
Mar 8 21:37:44 ttn-tw8 ttn-gateway[334]: WARNING: [gps] read() returned value <= 0

The two sentences that contain the location data, RMC and GGA do not actually contain any location data. If the GPS does not have a fix (you do have it outdoors I hope) then the empty lat and long fields are normally replaced by commas to indicate null fields. These commas are not there.

Is this a geniune Ublox Neo 6 that you got from a reputable supplier ?

1 Like

Hi there

It’s a genuine module. It does struggle to get a fix as my workbench is indoors, although the final location is in my roof space. I’ll try moving it!

Thanks

Well… I think it’s kosher:

Thats the whole point about fakes, they make them look kosher.

Anyway, the forum software is the case of the confusion, it is omitting the strings of commas that are normally present in a NMEA sentence without a fix, below is two copies of a sentence from one on my GPSs, the first is a straight copy to the forum, the second I deleberatly put spaces between the groups of commas;

$GPGGA,091258.00,0,00,99.99,*61
$GPGGA,091258.00, , , , ,0,00,99.99, , , , , ,*61

One wonders what other characters the forum software strips out …

Hmm. I did have it running and getting a fix with cgps and gpsd properly under raspbian. Checked that before I moved on to trying to get it working with the concentrator.

Still could be a formatting issue I suppose…

May-be put this kind of information in a code block? [ code ] … [ /code ] (skip the spaces)

Just some comma's without spaces
,,,,,,,
Idem with spaces
, , , , 

What do you mean ‘forum software’?

Something’s seriously wrong… syslog and daemon.log are filling up and /var is running out of space.

Could you try mp_pkt_fwd? (Easiest is resin.io.) There have been a couple of updates to low level libraries after the version you are using that are included in MP forwarder.

OK, some progress.

First of all there was a dry joint on my TX wiring :roll_eyes: Fixing that means I get reliable data from the module.

In case I’d screwed something up at system level, I did a clean install of Stretch and got the GPS module set up and working first. That gets me reliable position information on ttyAMA0. Yay.

$GPRMC,225036.000,A,51xx.xxxx,N,000xx.xx,W,0.00,200.38,090318,A*71

I then installed and configured the LoRa software per the ttn-zh wiki (https://github.com/ttn-zh/ic880a-gateway/wiki). Everything is up and running and the concentrator appears to be seeing the GPS:

Mar 9 22:47:09 ttn-dev-gw ttn-gateway[538]: INFO: Reference longitude is configured to 0.000000 deg
Mar 9 22:47:09 ttn-dev-gw ttn-gateway[538]: INFO: Reference altitude is configured to 0 meters
Mar 9 22:47:09 ttn-dev-gw ttn-gateway[538]: INFO: GPS is enabled

I say ‘appears’… it isn’t throwing any errors about opening the serial port. I’m slightly suspicious that I can still cat /ttyAMA0 in another shell. However:

Mar 9 22:49:32 ttn-dev-gw ttn-gateway[538]: ### [GPS] ###
Mar 9 22:49:32 ttn-dev-gw ttn-gateway[538]: # Invalid gps time reference (age: 1520635659 sec)
Mar 9 22:49:32 ttn-dev-gw ttn-gateway[538]: # Manual GPS coordinates: latitude 0.00000, longitude 0.00000, altitude 0 m
Mar 9 22:49:32 ttn-dev-gw ttn-gateway[538]: ##### END #####

I’m getting this despite the fact that the timestamp on each sentence format is correct. I’ve also patched the PPS output from the GPS module to pin 19 on the iC880a concentrator.

I’m prepared to look at the resin option, but it feels like I’m so close that I’d really like to get it working as it stands…!

Mark

PS: fun fact - another problem I found was that with the module and antenna in the case, it doesn’t get a fix; with them out of the case, it works. The module (not antenna) was sandwiched between Raspi and concentrator - is it possible RFI was interfering with the signal? It’s still indoors by the way.

PS - I know the time ref in the log is unix 1970 default date.

GPSs are highly marginal indoors, just about anything could make reception worse, or indeed better.

1 Like

I’ll see how it performs in the final location. Assuming I can get it working!

I’ve posted an issue on git: https://github.com/ttn-zh/ic880a-gateway/issues/34

I built a new instance with resin and it all works first time. Still annoyed that I couldn’t get it working by the traditional method, but resin FTW - first time I’ve sued this tool, I love it.

One thing which is probably a simple one:

11.03.18 12:56:03 (+0000) main # Valid gps time reference (age: 2 sec)
11.03.18 12:56:03 (+0000) main # System GPS coordinates: latitude 51.4xxx, longitude -0.xxx, altitude 56 m

Is there a way to get the gateway to automatically update its position in the console? It’s keeping whatever lat/long I set there and ignoring the GPS co-ords.

1 Like