Rak5146 USB GPS and SF

i bought 20 RAK5146, assembled and connected to a remote chirpstack server.
As far as I can see it works ok, but it doesn’t send gps and I don’t know how to enable sf5 to sf12 in the chirpstack server?
I installed the firmware on rp4 from GitHub - RAKWireless/rak_common_for_gateway

Can anyone advise me on this issue?


Have you received an actual LoRaWAN packets from a node? That’s primarily where the GPS position of the gateway would be reported.

Also have you checked the packet forwarder logs to see if it’s found the GPS, and the GPS has gotten a fix (primarily, you’d be looking to see that it’s accepting the GPS timestamps)

Feb 5 18:40:02 rak-gateway ttn-gateway[458]: src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: ### [GPS] ###
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # Invalid time reference (age: 1644086345 sec)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # no valid GPS coordinates available yet
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: ##### END #####
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: JSON up: {“stat”:{“time”:“2022-02-05 18:39:05 GMT”,“rxnb”:0,“rxok”:0,“rxfw”:0,“ackr”:100.0,“dwnb”:0,“txnb”:0,“temp”:34.8}}
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [up] PUSH_ACK received in 1 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [down] PULL_ACK received in 0 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [down] PULL_ACK received in 0 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [down] PULL_ACK received in 0 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: ##### 2022-02-05 18:39:35 GMT #####
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: ### [UPSTREAM] ###
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # RF packets received by concentrator: 0
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # RF packets forwarded: 0 (0 bytes)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # PUSH_DATA datagrams sent: 1 (125 bytes)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # PUSH_DATA acknowledged: 100.00%
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: ### [DOWNSTREAM] ###
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # PULL_DATA sent: 3 (100.00% acknowledged)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # RF packets sent to concentrator: 0 (0 bytes)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # TX errors: 0
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # TX rejected (collision packet): 50.00% (req:4, rej:2)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # TX rejected (collision beacon): 0.00% (req:4, rej:0)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # TX rejected (too late): 0.00% (req:4, rej:0)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # TX rejected (too early): 0.00% (req:4, rej:0)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: ### SX1302 Status ###
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # SX1302 counter (INST): 450874372
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # SX1302 counter (PPS): 316419876
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # BEACON queued: 0
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # BEACON sent so far: 0
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # BEACON rejected: 0
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: ### [JIT] ###
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: #--------
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: ### [GPS] ###
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # Invalid time reference (age: 1644086375 sec)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: # no valid GPS coordinates available yet
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: ##### END #####
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: JSON up: {“stat”:{“time”:“2022-02-05 18:39:35 GMT”,“rxnb”:0,“rxok”:0,“rxfw”:0,“ackr”:100.0,“dwnb”:0,“txnb”:0,“temp”:34.4}}
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [up] PUSH_ACK received in 1 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: Received pkt from mote: 4C570001 (fcnt=16707)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: Received pkt from mote: 4C570001 (fcnt=16707)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: JSON up: {“rxpk”:[{“jver”:1,“tmst”:452255135,“chan”:1,“rfch”:1,“freq”:868.300000,“mid”: 0,“stat”:1,“modu”:“LORA”,“datr”:“SF12BW125”,“codr”:“4/5”,“rssis”:-56,“lsnr”:8.5,“foff”:-1356,“rssi”:-56,“size”:23,“data”:“AAEAV0xNQ0FIQBEAAiFpM4PrsyltvIM=”},{“jver”:1,“tmst”:452255135,“chan”:4,“rfch”:0,“freq”:867.300000,“mid”: 3,“stat”:1,“modu”:“LORA”,“datr”:“SF12BW125”,“codr”:“4/5”,“rssis”:-129,“lsnr”:-14.2,“foff”:-1357,“rssi”:-116,“size”:23,“data”:“AAEAV0xNQ0FIQBEAAiFpM4PrsyltvIM=”}]}
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [up] PUSH_ACK received in 2 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [down] PULL_ACK received in 0 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: Received pkt from mote: 4C570001 (fcnt=16707)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: JSON up: {“rxpk”:[{“jver”:1,“tmst”:460337135,“chan”:0,“rfch”:1,“freq”:868.100000,“mid”: 0,“stat”:1,“modu”:“LORA”,“datr”:“SF12BW125”,“codr”:“4/5”,“rssis”:-56,“lsnr”:7.8,“foff”:-1339,“rssi”:-56,“size”:23,“data”:“AAEAV0xNQ0FIQBEAAiFpM4MsABjdueM=”}]}
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [up] PUSH_ACK received in 0 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: Received pkt from mote: 4C570001 (fcnt=16707)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: JSON up: {“rxpk”:[{“jver”:1,“tmst”:462071148,“chan”:2,“rfch”:1,“freq”:868.500000,“mid”: 0,“stat”:1,“modu”:“LORA”,“datr”:“SF12BW125”,“codr”:“4/5”,“rssis”:-61,“lsnr”:6.2,“foff”:-3294,“rssi”:-60,“size”:23,“data”:“AAEAV0xNQ0FIhSQAAiFpM4PdSKc2h1E=”}]}
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [up] PUSH_ACK received in 0 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [down] PULL_ACK received in 0 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: Received pkt from mote: 4C570001 (fcnt=16707)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: JSON up: {“rxpk”:[{“jver”:1,“tmst”:468418772,“chan”:1,“rfch”:1,“freq”:868.300000,“mid”: 0,“stat”:1,“modu”:“LORA”,“datr”:“SF12BW125”,“codr”:“4/5”,“rssis”:-56,“lsnr”:7.5,“foff”:-1351,“rssi”:-55,“size”:23,“data”:“AAEAV0xNQ0FIQBEAAiFpM4Nfs07opmA=”}]}
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [up] PUSH_ACK received in 0 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: Received pkt from mote: 4C570001 (fcnt=16707)
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: JSON up: {“rxpk”:[{“jver”:1,“tmst”:470154251,“chan”:2,“rfch”:1,“freq”:868.500000,“mid”: 0,“stat”:1,“modu”:“LORA”,“datr”:“SF12BW125”,“codr”:“4/5”,“rssis”:-60,“lsnr”:6.8,“foff”:-3258,“rssi”:-59,“size”:23,“data”:“AAEAV0xNQ0FIhSQAAiFpM4Me3Abeil8=”}]}
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [up] PUSH_ACK received in 0 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: Received pkt from mote: 4C570001 (fcnt=16707)
Feb 5 18:40:02 rak-gateway chirpstack-gateway-bridge[590]: time=“2022-02-05T18:40:02.598130031Z” level=info msg=“integration/mqtt: publishing event” event=up qos=0 topic=gateway/e45f01fffe7c7251/event/up uplink_id=5b6968fb-438d-4ae7-8074-c2232e3a12c9
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: JSON up: {“rxpk”:[{“jver”:1,“tmst”:473655532,“chan”:0,“rfch”:1,“freq”:868.100000,“mid”: 0,“stat”:1,“modu”:“LORA”,“datr”:“SF12BW125”,“codr”:“4/5”,“rssis”:-66,“lsnr”:8.2,“foff”:-3296,“rssi”:-65,“size”:23,“data”:“AAEAV0xNQ0FIYCUAAiFpM4Omu1LVvtg=”}]}
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [up] PUSH_ACK received in 1 ms
Feb 5 18:40:02 rak-gateway ttn-gateway[458]: INFO: [down] PULL_ACK received in 0 ms
Feb 5 18:40:05 rak-gateway chirpstack-gateway-bridge[590]: time=“2022-02-05T18:40:05.221060322Z” level=info msg=“integration/mqtt: publishing event” event=stats qos=0 stats_id=eb43d2c6-2ed5-4c46-ad8e-1746a9814a69 topic=gateway/e45f01fffe7c7251/event/stats
Feb 5 18:40:06 rak-gateway chirpstack-gateway-bridge[590]: time=“2022-02-05T18:40:06.104259258Z” level=info msg=“integration/mqtt: publishing event” event=up qos=0 topic=gateway/e45f01fffe7c7251/event/up uplink_id=d88a9610-11ab-45c5-90a6-1b9d494bda9b
Feb 5 18:40:14 rak-gateway chirpstack-gateway-bridge[590]: time=“2022-02-05T18:40:14.175970065Z” level=info msg=“integration/mqtt: publishing event” event=up qos=0 topic=gateway/e45f01fffe7c7251/event/up uplink_id=13a0e3a4-536f-4977-9fff-2e271e633c28
Feb 5 18:40:35 rak-gateway chirpstack-gateway-bridge[590]: time=“2022-02-05T18:40:35.222948774Z” level=info msg=“integration/mqtt: publishing event” event=stats qos=0 stats_id=c9f52656-a9c5-40b8-b221-4e10c84b83c9 topic=gateway/e45f01fffe7c7251/event/stats
Feb 5 18:40:45 rak-gateway chirpstack-gateway-bridge[590]: time=“2022-02-05T18:40:45.011682493Z” level=info msg=“integration/mqtt: publishing event” event=up qos=0 topic=gateway/e45f01fffe7c7251/event/up uplink_id=05ab8f30-e3f5-490a-9888-bc12b08619fe

thanks for the advice but no gps coordinates …

That suggests either a configuration problem, or that your GPS antenna can’t see the sky. Is it indoors?

enabled spi, i2c, serial, the antenna is out and sees the sky … I really don’t know what could be more


“gateway_conf”: {
“gateway_ID”: “AA555A0000000000”,
/* change with default server address/ports /
“server_address”: “127.0.0.1”,
“serv_port_up”: 1700,
“serv_port_down”: 1700,
/
adjust the following parameters for your network /
“keepalive_interval”: 10,
“stat_interval”: 30,
“push_timeout_ms”: 100,
/
forward only valid packets /
“forward_crc_valid”: true,
“forward_crc_error”: false,
“forward_crc_disabled”: false,
/
GPS configuration /
“gps_tty_path”: “/dev/ttyAMA0”,
/
GPS reference coordinates /
“ref_latitude”: 0.0,
“ref_longitude”: 0.0,
“ref_altitude”: 0,
/
Beaconing parameters /
“beacon_period”: 0, /
disable class B beacon, set to 128 enable beacon */
“beacon_freq_hz”: 869525000,
“beacon_freq_nb”: 1,
“beacon_freq_step”: 0,
“beacon_datarate”: 9,
“beacon_bw_hz”: 125000,
“beacon_power”: 27

Raspberry Pi 4 Model B Rev 1.4, OS “10 (buster)”, 5.10.63-v7l+.
RAKWireless gateway RAK5146 for USB version 4.2.7R install from source code.
Gateway ID: E45F01FFFE7C7251.

dmesg|grep tty
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=E4:5F:01:7C:72:51 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=tty1 root=PARTUUID=3f3b41ab-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles modules-load=dwc2,g_ether
[ 0.001104] printk: console [tty1] enabled
[ 1.436188] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
[ 3.083938] systemd[1]: Created slice system-getty.slice.
[ 4.862939] cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device

I also put an external gps antenna but nothing
from the technical support when buying,
They told me that the usb adapter and this card have lbt and gps … but obviously it doesn’t work … I tried the original firmware and firmware from github … all possible settings and nothing …
I’m asking someone from RAKL Wireless to tell me if they tested it so I don’t waste any more time…
Regards
Nikola

You have the board in a USB-mPCIe adapter card made for an LTE modem rather than a LoRaWAN concentrator. That provides only USB connectivity, but no way for your pi’s processor to interact with the GPS chip on the RAK5146.

To use the GPS, you’ll need to put the card in something that provides a path from the modules I2C pins or UART pins to the pi’s processor - pins 30 & 32 or 31 & 33 - see RAK5146 WisLink LPWAN Concentrator Datasheet | RAKwireless Documentation Center and then configure the packet forwarder to use that interface.

With a lot of care, you might be able to solder some wires onto the mPCIe connector of the modem carrier board, but it would really be better to put it in a carrier designed for this purpose.

Typically when using a pi as the host it would make more sense to chose an SPI version and one of the existing hats that stacks on the GPIO connector to hold the module. The main benefit of a USB-based concentrator is for use in embedded systems that have a standard mPCIe slot, which doesn’t have SPI available and probably would not support GPS.

Thanks a lot for the help!

On your advice, I did the following:

config.txt

dtoverlay=uart1,txd1_pin=14,rxd1_pin=15

global_conf.json.sx1250.EU868.USB

“gps_tty_path”: “/dev/ttyS0”,

soldered
31 and 33 on adapter to gpio14 and 15 of RPI4


1 Like

can anyone tell me how to enable finetimestamp?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.