RAK2245 packet forwarder


#1

Hello @brocaar ,
Trying to run “lora-gateway-os-full-raspberrypi3–20190127122018.sdimg.gz” on a raspi - RAK2245, but having problem with packet forwarder
I contacted RAKwireless and they told me that you tried it with RAK2245 and it worked and they suggested that I lower the SPI frequency so it this the problem?
I also noticed that in your upcoming version update you will include the RAK2245
but till then to test it should I do some simple modification to make it work or wait for the future release
Mike

*** Beacon Packet Forwarder for Lora Gateway ***
Version: 4.0.1
*** Lora concentrator HAL library version info ***
Version: 5.0.1;


INFO: Little endian host
INFO: found global configuration file global_conf.json, parsing it
INFO: global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
INFO: lorawan_public 1, clksrc 1
lgw_board_setconf:427: Note: board configuration; lorawan_public:1, clksrc:1
INFO: no configuration for LBT
INFO: antenna_gain 0 dBi
INFO: no configuration for tx gain lut 12
INFO: no configuration for tx gain lut 13
INFO: no configuration for tx gain lut 14
INFO: no configuration for tx gain lut 15
INFO: Configuring TX LUT with 12 indexes
INFO: radio 0 enabled (type SX1257), center frequency 867500000, RSSI offset -166.000000, tx enabled 1, tx_notch_freq 0
lgw_rxrf_setconf:476: WARNING: NOT A VALID TX NOTCH FILTER FREQUENCY [126000…250000]Hz
lgw_rxrf_setconf:488: Note: rf_chain 0 configuration; en:1 freq:867500000 rssi_offset:-166.000000 radio_type:2 tx_enable:1 tx_notch_freq:0
INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -166.000000, tx enabled 0, tx_notch_freq 0
lgw_rxrf_setconf:488: Note: rf_chain 1 configuration; en:1 freq:868500000 rssi_offset:-166.000000 radio_type:2 tx_enable:0 tx_notch_freq:0
INFO: Lora multi-SF channel 0> radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 0 configuration; en:1 freq:-400000 SF_mask:0x7e
INFO: Lora multi-SF channel 1> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 1 configuration; en:1 freq:-200000 SF_mask:0x7e
INFO: Lora multi-SF channel 2> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 2 configuration; en:1 freq:0 SF_mask:0x7e
INFO: Lora multi-SF channel 3> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 3 configuration; en:1 freq:-400000 SF_mask:0x7e
INFO: Lora multi-SF channel 4> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 4 configuration; en:1 freq:-200000 SF_mask:0x7e
INFO: Lora multi-SF channel 5> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 5 configuration; en:1 freq:0 SF_mask:0x7e
INFO: Lora multi-SF channel 6> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 6 configuration; en:1 freq:200000 SF_mask:0x7e
INFO: Lora multi-SF channel 7> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 7 configuration; en:1 freq:400000 SF_mask:0x7e
INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7
lgw_rxif_setconf:581: Note: LoRa ‘std’ if_chain 8 configuration; en:1 freq:-200000 bw:2 dr:2
INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
lgw_rxif_setconf:637: Note: FSK if_chain 9 configuration; en:1 freq:300000 bw:3 dr:50000 (50000 real dr) sync:0xC194C1
INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to B827EBFFFEXXXXXX
INFO: server hostname or IP address is configured to “localhost”
INFO: upstream port is configured to “1700”
INFO: downstream port is configured to “1700”
INFO: downstream keep-alive interval is configured to 10 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/ttyAMA0”
INFO: Beaconing period is configured to 128 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: [main] TTY port /dev/ttyAMA0 open for GPS synchronization
ERROR: FAIL TO CONNECT BOARD
ERROR: [main] failed to start the concentrator
raspberrypi3:/etc/lora-packet-forwarder

and monit status gives
Process ‘lora-packet-forwarder’
status Execution failed | Does not exist
monitoring status Monitored
monitoring mode active
on reboot start
data collected Thu, 11 Apr 2019 21:39:41


Docker image to .sdimg.gz
#2

The RAK2245 runs the same as the RAK831 configuration.

Just check (it should already be there) the file /boot/config.txt and look for “core_freq=250”. This stops the GPU changing speed which also affects the SPI clock speed.


#3

I tried this too, but I ran into the same issue:

ERROR: FAIL TO CONNECT BOARD

What I did notice is that in their RAK2245 source, they changed the SPI speed. I need to re-test this, but I haven’t had the time yet to do this (also since this means I need to re-test all the other shields to make sure they also keep working).


#4

I have a RAK2245 running where I compiled the Packet Forwarder myself. I also check the configuration and report back on the speed.


#5

@Tony I checked the config.txt file and “core_freq=250” is there at the end of the file but as @borcaar mentioned in RAK image they changed
#define SPI_SPEED 8000000
to
#define SPI_SPEED 2000000
in the “loragw_spi.native.c”
don’t know if they changed anything else!!
@Toni did you modified the SPI speed or anything in the packet forwarder to make it work?


#6

Just to let you know, I had success with running their (modified / patched) packet-forwarder, so it should work in the end :slight_smile:


#7

Great @brocaar good to hear that
so it is not an SPI speed issue?
and when will the release of the updated image including RAK2245?


#8

I compiled a packet forwarder from https://github.com/Lora-net/lora_gateway and this runs both the RAK831 and a RAK2245 at 8MHz which is the standard SPI speed for SX1301 chipset. Combined with Gateway server and these work just fine with LoraServer.io


#9

In my case this didn’t work. I had to change it to:

#define SPI_SPEED 2000000

In order to make it work (just tested). With the default value of 8000000 the RAK2245 failed to start (the RAK831 did work with 8000000).


#10

@brocaar, I’ve gone back and rechecked my source code and I was wrong, I did change SPI_SPEED to 2MHz from 8MHz. For your information, the RAK2245 works on both a Pi3 and a PiZero, (as you would expect).


#11

That’s unfortunate - it suggests something wrong with the signal routing or electrical design or SPI mode settings. Do these plug directly into the pi such that the purchaser does no wiring themselves? I know I saw some issues early on testing an RAK831 with long jumper wires which went away when I rewired it with more care.


#12

The module is plugged directly onto the Raspberry Pi. See also:

What I noticed with other shields is that in combination with a Raspberry Pi 3 it always takes a couple of attempts before the packet-forwarder starts. Changing the SPI speed to 2MHz fixes this. It might as well be a Raspberry Pi 3 related issue.


#13

Talking to RAK I’ve been informed the reduction of SPI speed to 2MHz relates to the driver circuit inside the RAK2245 module. RAK have release 3 products using the same base product. One is a RAK2245 Stamp Version, the second is the same with a header to suit “96 Boards” and the third is the same product mounted on a sub-board to suit the 40 pin header and layout of a Raspberry Pi. Pi’s work on 3.3 Volts, while the 96 Board standard is 1.8 volts. As a result RAK installed a level shifting circuit in the RAK2245 to accommodate the different voltage standards. It’s this level shifting circuit that’s reducing the SPI speed.

I’ve been running a RAK2245 Stamp Version as a prototype for about 4 weeks now with the SPI running at 2MHz. It’s not given any problems and works just as well as my RAK831 with an SPI speed of 8MHz.

As a result there is a logical explanation for speed change.


#14

Thanks for the explanation. Unfortunately when I asked RAK about the changes between the 831 and the 2245 they did not inform me about this, but this explains the difference :slight_smile:

I’ve just uploaded a new release: [release] LoRa Gateway OS v2.0.0-test.4.


#15

It sounds more like a board design error than merely a “difference”. There’s no reason a proper 1.8v level translator can’t run at 8MHz, or even twice that.

But if they did something like MOSFETs with 10K pullups…