| | 62 | |
| | 63 | == GPS == |
| | 64 | On /dev/ttyUSB2 |
| | 65 | |
| | 66 | {{{ |
| | 67 | AT+QGPS=1 Starts GPS service + NMEA Feed on /dev/modemGPS |
| | 68 | AT+QGPSEND Stops GPS Service + NMEA Feed on /dev/modemGPS |
| | 69 | AT+QGPSCFG="gpsnmeatype",xxx Configure which NMEA output sentences are generated (See SIMCOM GPS Page) |
| | 70 | AT+QGPSLOC? Run on AT command port to give a one-shot reading |
| | 71 | AT+QGPSGNMEA="GGA" Run on AT command port to give a one-shot reading of GPS Fix Data, Time, Position and related fix data |
| | 72 | }}} |
| | 73 | |
| | 74 | Ex. |
| | 75 | {{{ |
| | 76 | AT+QGPSLOC? |
| | 77 | +QGPSLOC: 232222.0,1343.4258N,10039.1887E,0.8,2.1,2,0.00,0.0,0.0,231122,09 |
| | 78 | }}} |
| | 79 | |
| | 80 | Read Lat,Lon ref [https://receiverhelp.trimble.com/alloy-gnss/en-us/NMEA-0183messages_GGA.html here] [[br]] |
| | 81 | 13+(43.4258/60) = 13.723763 [[br]] |
| | 82 | 100+(39.1887/60) = 100.653145 [[br]] |
| | 83 | |
| | 84 | On /dev/ttyUSB1 the data will continue update GPS location |
| | 85 | {{{ |
| | 86 | root@OpenWrt:~# picocom -b 115200 /dev/ttyUSB1 |
| | 87 | $GPGGA,233253.00,1343.426109,N,10039.188521,E,1,08,0.8,2.5,M,-25.0,M,,*46 |
| | 88 | }}} |
| | 89 | We use ser2net to stream out the lat,lon |
| | 90 | {{{ |
| | 91 | root@GL-X300B:/etc# tail -2 ser2net.conf |
| | 92 | 8888:raw:400:/dev/ttyUSB1:115200 8DATABITS NONE 1STOPBIT |
| | 93 | }}} |
| | 94 | Then on other terminal run |
| | 95 | {{{ |
| | 96 | root@GL-X300B:~# curl -v --http0.9 192.168.8.1:8888 |
| | 97 | > GET / HTTP/1.1 |
| | 98 | > Host: 192.168.8.1:8888 |
| | 99 | > User-Agent: curl/7.66.0 |
| | 100 | > Accept: */* |
| | 101 | > |
| | 102 | $GPGGA,235831.00,1343.426963,N,10039.186482,E,1,08,0.8,1.9,M,-25.0,M,,*43 |
| | 103 | $GPRMC,235831.00,A,1343.426963,N,10039.186482,E,0.0,201.3,231122,1.1,W,A,V*51 |
| | 104 | }}} |