Experiece and Solutions with the SX1302 Packet Forwarder

Hi, Thought I would share some experiences with the Semtech SX1302 Packet Forwarder

To get it working with a RAK gateway I had to
1 - Change the Reset pin number from Pin23 to Pin 17 in the file reset_lgw.sh
2 - removed the use of the “Power Enable” pin in the same file as the gateway has no enable pin

I found the Stat Interval datagram in JSON format includes and extra data element “temp”. This is not included in the Stat Interval datagram for existing gateways which use the original SX1301 chip. When the extra “temp” data element is included the TTN server at Meshed ignored the Stat Interval signal. By modifying the code, removing “temp” and recompiling, it now works.

I also notice the SX1302 chip has its own EUI, from what I can see this is new to the SX1302 chip. So instead of deriving the gateway EUI from the Ethernet MAC, the gateway chip has its own EUI. Now its format is slightly different, instead of the two centre bytes being FF FE, in my case they were 01 FF. When I used this as the Gateway ID the TTN server would work fine, data packets from a Node would pass to the Application Server, the modified Stat Interval datagram would work and the Console’s “Last Seen” would update correctly, HOWEVER, the server does not send an acknowledgement packet to the Keep Alive datagram.

For your information, all of this testing was performed with the UDP packets (not MQTT).

There was no AU915 global.conf file available, so I created this. If anyone needs a config file created for another region, just let me know.

In the near future I will publish on Github a compiled version (along with instructions) ready to use on a Raspberry Pi.

Anyway, I am interested to hear other people’s experiences with this new gateway baseband receiver module.

3 Likes

helo @TonySmith
i am using raspberry pi with sx1302
i am using sx1302_hal-master packet forwarder code

but i am facing the following error while starting the packet forwarder

*** Packet Forwarder ***
Version: 2.1.0
*** SX1302 HAL library version info ***
Version: 2.1.0;


INFO: Little endian host
INFO: found configuration file global_conf.json.sx1250.CN490, parsing it
INFO: global_conf.json.sx1250.CN490 does contain a JSON object named SX130x_conf, parsing SX1302 parameters
INFO: com_type SPI, com_path /dev/spidev0.0, lorawan_public 1, clksrc 0, full_duplex 0
INFO: antenna_gain 0 dBi
INFO: Configuring legacy timestamp
INFO: no configuration for SX1261
INFO: Configuring Tx Gain LUT for rf_chain 0 with 16 indexes for sx1250
INFO: radio 0 enabled (type SX1250), center frequency 471400000, RSSI offset -207.000000, tx enabled 1, single input mode 1
INFO: radio 1 enabled (type SX1250), center frequency 475000000, RSSI offset -207.000000, tx enabled 0, single input mode 1
INFO: Lora multi-SF channel 0> radio 0, IF -300000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 1> radio 0, IF -100000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 2> radio 0, IF 100000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 3> radio 0, IF 300000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 4> radio 1, IF -300000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 5> radio 1, IF -100000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 6> radio 1, IF 100000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 7> radio 1, IF 300000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7, Explicit header
INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
INFO: global_conf.json.sx1250.CN490 does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to AA555A0000000000
INFO: server hostname or IP address is configured to “localhost”
INFO: upstream port is configured to “1730”
INFO: downstream port is configured to “1730”
INFO: downstream keep-alive interval is configured to 2 seconds
INFO: statistics display interval is configured to 30 seconds
INFO: upstream PUSH_DATA time-out is configured to 100 ms
INFO: packets received with a valid CRC will be forwarded
INFO: packets received with a CRC error will NOT be forwarded
INFO: packets received with no CRC will NOT be forwarded
INFO: GPS serial port path is configured to “/dev/ttyS0”
INFO: Reference latitude is configured to 0.000000 deg
INFO: Reference longitude is configured to 0.000000 deg
INFO: Reference altitude is configured to 0 meters
INFO: Beaconing period is configured to 0 seconds
INFO: Beaconing signal will be emitted at 869525000 Hz
INFO: Beaconing datarate is set to SF9
INFO: Beaconing modulation bandwidth is set to 125000Hz
INFO: Beaconing TX power is set to 14dBm
INFO: Beaconing information descriptor is set to 0
INFO: global_conf.json.sx1250.CN490 does contain a JSON object named debug_conf, parsing debug parameters
INFO: got 2 debug reference payload
INFO: reference payload ID 0 is 0xCAFE1234
INFO: reference payload ID 1 is 0xCAFE2345
INFO: setting debug log file name to loragw_hal.log
INFO: [main] TTY port /dev/ttyS0 open for GPS synchronization
CoreCell reset through GPIO23…
SX1261 reset through GPIO23…
CoreCell power enable through GPIO18…
CoreCell ADC reset through GPIO13…
Opening SPI communication interface
Note: chip version is 0x00 (v0.0)
ERROR: Failed to set SX1250_0 in STANDBY_XOSC mode
ERROR: failed to setup radio 0
ERROR: [main] failed to start the concentrator

what am i missing ??

I think you are using the wrong GPIO pin to reset the Lora module. You might try GPIO pin 17 instead of pin 23. See this in my post under item 1.

If you are using a RAK gateway module I would suggest you edit the file “reset_lgw.sh”
Change from SX1302_RESET_PIN=23
To SX1302_RESET_PIN=17

Wish you luck

Tony

You will probably also need to edit your global_config.json, unless you plan on using CN490 channel plan on a localhost with port 1730

i tried changing the reset pin also

but same error…

Which exact model of concentrator product? Connected to the pi how? Powered how?

Which exact repository?

Hello how are you? :grin:
My experience goes with the RAK2287 hub with the USB version with GPS. The truth is that I find it a bit difficult to make it work since I am not using an Rpi itself. Instead I am using a Rock Pi 4C+ which is very similar to the Rpi4.

I had a terrible experience :fearful: updating the firmware on this as it kept charging and then didn’t detect the STM USB device. So it was necessary to disassemble the RAK2287 concentrator and solder some cables to be able to upload the Bin using STM32CubeProgrammer. It was really annoying to have to do this, but it is possible to recover the hub if it crashes.

In order to make the RAK287 USB work on a card other than an RPI, download the binary and install it. The difficulty is in configuring the global_conf.json file for AU915. Since the default settings are not very useful.

I am using LoRaWAN, TTN as a server but my purpose is to use Chirpstack since it is for a local server for remote places.

At the moment I have not yet been able to find the correct configurator for the AU915-928 frequency range. :smiling_face_with_tear:

I feel that a little more documentation is needed on the subject of these hubs.

You certainly set yourself a challenge there with that configuration but not one I’d expect to be documented - if it was used as intended with a Pi, the setup scripts do all the work for you and the TTS console will provide the settings as well.

We don’t recommend running a concentrator (not a hub) over USB due to timing issues but there is no reason for it not to work with a locally compiled version of the packet forwarder software.

I’m not aware of there being any firmware updates for the RAK2287 - or indeed anything on it that needs firmware updates, so can you clarify what it was that needed the updates.

The TTS console will provide you with a properly configured global_conf.json file once you have registered your gateway.

This seems like a good example of asking for help right at the beginning - this is really what the forum is for rather than the usual of pointing people at the docs!

Good luck with your Chirpstack implementation, please be aware that discussions on that would be off-topic for this forum.

Hi Tony,

I was wondering if your AU915 global.conf for lora_pkw_fwd is somewhere available for download.
If not and you could send it to me that would be greatly appreciated.

Thanks in advance.

Kind regards

Johan Leroy

When you register your gateway, you can download your very own personal global.conf using the download button.

Particularly important given this topic is 2 years old and since then v3 has come online.

1 Like