BasicStation on DIY gateway

Did you get a chance to get this working ?

So far no success. @velev could you please give some feedback, I think you are more knowledgeable than me :slight_smile:

I am little busy these days… :smiley: But i keep digging on it.
BasicStation run (in some ways :slight_smile: ) on RAK831. The semtech test server cannot be accessed due to certificate problems! The Station to Packet Forwarder Protocol Bridge (st2pkfwd) seems to work but i have some problems with python environment. So for now i have nothing usefull . I’ll keep you posted if any progress :smiley:

Thanks for the update. Seems RAK internal@fomi also need similar issue in basic station. Look forward your result if have.

Hi all,

I’m glad to announce that we’ve just let RAK2245 Pi HAT to work with Basic Station successfully!


I’ll update more information after more testing.

1 Like

Good news.

Keep us posted of further results.

How is the testing going ?

Does that mean it will work with the outdoor gateway also ?

Hi, @abhishek2101

It just work on RAK2245/Pilot gateway pro which is based on RPi now, not the outdoor gateway yet.
I’ll update the source code on Github this week.

Hi,

I’m looking to use Basic Station with my RAK2245 Pi Hat. I’ve looked at the GitHub projects, but can’t tell which one was updated to support BasicStation can someone point me at the right project?

Thank You,
Kevin Runde

Need to change the spi rate in basicstation/deps/lgw/platform-xxx/libloragw/src/loragw_spi.native.c from 8000000 to 2000000.

2019-12-24 10:53:35

1 Like
  1. Is this spi change needed on the RAK831?
  2. Why is this spi change needed, what error does it solve?

I got this error on the RAK831:
[SYN:ERRO] Repeated excessive clock drifts between MCU/SX1301#0 (3 retries): -2.4ppm (threshold 2.0ppm)

1.Yes,RAK831 needs change it.
2.There is a high probability that high spi rate will cause sx1301 to fail to start.


Are you using BasicStation with Raspberry Pi?

Thanks for response.
I am working on a tutorial how to install BasicStation on the RAK831.

Hi @ZhuQI,

I’m running basic station on raspberry compute 3, with concentrator RAKWIRLESS 831(mpcie), i sucess to run the example live-s2.sm.tc and i can watch the led driver of the concentrator on, But the basic station stop running after connecting/deconnecting from mux, the log say that there is already process using spi, and i’m pretty sur that he talk about him( the process that fail), and i even can’t find this process running.

My station.conf :

{
/* If slave-X.conf present this acts as default settings /
“SX1301_conf”: { /
Actual channel plan is controlled by server /
“lorawan_public”: false, /
is default /
“clksrc”: 1, /
radio_1 provides clock to concentrator /
/
path to the SPI device, un-comment if not specified on the command line e.g., RADIODEV=/dev/spidev0.0 /
“device”: “/dev/spidev0.0”,
/
freq/enable provided by LNS - only HW specific settings listed here /
“radio_0”: {
“type”: “SX1257”,
“rssi_offset”: -166.0,
“tx_enable”: true,
“antenna_gain”: 0
},
“radio_1”: {
“type”: “SX1257”,
“rssi_offset”: -166.0,
“tx_enable”: false
}
/
chan_multiSF_X, chan_Lora_std, chan_FSK provided by LNS /
},
“station_conf”: {
“log_file”: “stderr”,
“log_level”: “DEBUG”, /
XDEBUG,DEBUG,VERBOSE,INFO,NOTICE,WARNING,ERROR,CRITICAL */
“log_size”: 10000000,
“log_rotate”: 3,
“CUPS_RESYNC_INTV”: “1s”
}
}

log basic station :

pi@B827EBFFFEF65A01:/opt/basicstation/examples/live-s2.sm.tc $ station
2020-05-14 01:13:15.576 [SYS:INFO] Logging : stderr (maxsize=10000000, rotate=3)
2020-05-14 01:13:15.576 [SYS:INFO] Station Ver : 2.0.3(rpi/std) 2020-05-13 11:08:10
2020-05-14 01:13:15.577 [SYS:INFO] Package Ver : 1.0.0
2020-05-14 01:13:15.577 [SYS:INFO] proto EUI : 0:b827:ebf6:5a01 (/sys/class/net/eth0/address)
2020-05-14 01:13:15.577 [SYS:INFO] prefix EUI : ::1 (builtin)
2020-05-14 01:13:15.578 [SYS:INFO] Station EUI : b827:ebff:fef6:5a01
2020-05-14 01:13:15.578 [SYS:INFO] Station home: ./ (builtin)
2020-05-14 01:13:15.578 [SYS:INFO] Station temp: /var/tmp/ (builtin)
2020-05-14 01:13:15.578 [SYS:WARN] Station in NO-CUPS mode
2020-05-14 01:13:15.780 [TCE:INFO] Starting TC engine
2020-05-14 01:13:15.780 [TCE:INFO] Connecting to INFOS: ws://127.0.0.1:3001
2020-05-14 01:13:15.789 [TCE:INFO] Infos: b827:ebff:fef6:5a01 b827:ebff:fef6:5a01 ws://127.0.0.1:3001/gateway/b827ebfffef65a01
2020-05-14 01:13:15.789 [AIO:DEBU] [3] ws_close reason=1000
2020-05-14 01:13:15.789 [AIO:DEBU] Echoing close - reason=1000
2020-05-14 01:13:15.790 [AIO:ERRO] Recv failed: NET - Connection was reset by peer
2020-05-14 01:13:15.795 [AIO:DEBU] [3] WS connection shutdown…
2020-05-14 01:13:15.796 [TCE:VERB] Connecting to MUXS…
2020-05-14 01:13:15.796 [TCE:VERB] Connected to MUXS.
2020-05-14 01:13:15.807 [RAL:INFO] Lora gateway library version: Version: 5.0.1;
2020-05-14 01:13:15.807 [RAL:DEBU] SX1301 txlut table (0 entries)
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 rxrfchain 0: enable=1 freq=867500000 rssi_offset=-166.000000 type=2 tx_enable=1 tx_notch_freq=0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 rxrfchain 1: enable=1 freq=868500000 rssi_offset=-166.000000 type=2 tx_enable=0 tx_notch_freq=0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 ifchain 0: enable=1 rf_chain=0 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 ifchain 1: enable=1 rf_chain=0 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 ifchain 2: enable=1 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 ifchain 3: enable=1 rf_chain=0 freq=200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 ifchain 4: enable=1 rf_chain=0 freq=400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 ifchain 5: enable=1 rf_chain=1 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 ifchain 6: enable=1 rf_chain=1 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 ifchain 7: enable=1 rf_chain=1 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 ifchain 8: enable=1 rf_chain=1 freq=-200000 bandwidth=2 datarate=2 sync_word=0/0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 ifchain 9: enable=0 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:15.807 [RAL:VERB] SX1301 LBT not enabled
2020-05-14 01:13:15.807 [RAL:INFO] Station device: /dev/spidev0.0 (PPS capture disabled)
2020-05-14 01:13:16.321 [RAL:ERRO] lgw_start failed: /dev/spidev0.0
2020-05-14 01:13:16.321 [any:ERRO] Closing connection to muxs - error in s2e_onMsg
2020-05-14 01:13:16.321 [AIO:DEBU] [3] ws_close reason=1000
2020-05-14 01:13:16.321 [AIO:DEBU] Echoing close - reason=1000
2020-05-14 01:13:16.322 [AIO:DEBU] [3] Server sent close: reason=1000
2020-05-14 01:13:16.322 [AIO:DEBU] [3] WS connection shutdown…
2020-05-14 01:13:16.322 [TCE:VERB] Connection to MUXS closed in state -1
2020-05-14 01:13:16.322 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)
2020-05-14 01:13:26.324 [TCE:INFO] Connecting to INFOS: ws://127.0.0.1:3001
2020-05-14 01:13:26.326 [TCE:INFO] Infos: b827:ebff:fef6:5a01 b827:ebff:fef6:5a01 ws://127.0.0.1:3001/gateway/b827ebfffef65a01
2020-05-14 01:13:26.326 [AIO:DEBU] [3] ws_close reason=1000
2020-05-14 01:13:26.326 [AIO:DEBU] [3] Connection closed unexpectedly
2020-05-14 01:13:26.326 [AIO:DEBU] [3] WS connection shutdown…
2020-05-14 01:13:26.326 [TCE:VERB] Connecting to MUXS…
2020-05-14 01:13:26.328 [TCE:VERB] Connected to MUXS.
2020-05-14 01:13:26.336 [RAL:INFO] Lora gateway library version: Version: 5.0.1;
2020-05-14 01:13:26.336 [RAL:DEBU] SX1301 txlut table (0 entries)
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 rxrfchain 0: enable=1 freq=867500000 rssi_offset=-166.000000 type=2 tx_enable=1 tx_notch_freq=0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 rxrfchain 1: enable=1 freq=868500000 rssi_offset=-166.000000 type=2 tx_enable=0 tx_notch_freq=0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 ifchain 0: enable=1 rf_chain=0 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 ifchain 1: enable=1 rf_chain=0 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 ifchain 2: enable=1 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 ifchain 3: enable=1 rf_chain=0 freq=200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 ifchain 4: enable=1 rf_chain=0 freq=400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 ifchain 5: enable=1 rf_chain=1 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 ifchain 6: enable=1 rf_chain=1 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 ifchain 7: enable=1 rf_chain=1 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 ifchain 8: enable=1 rf_chain=1 freq=-200000 bandwidth=2 datarate=2 sync_word=0/0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 ifchain 9: enable=0 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:26.336 [RAL:VERB] SX1301 LBT not enabled
2020-05-14 01:13:26.336 [RAL:INFO] Station device: /dev/spidev0.0 (PPS capture disabled)
2020-05-14 01:13:26.855 [RAL:ERRO] lgw_start failed: /dev/spidev0.0
2020-05-14 01:13:26.855 [any:ERRO] Closing connection to muxs - error in s2e_onMsg
2020-05-14 01:13:26.855 [AIO:DEBU] [3] ws_close reason=1000
2020-05-14 01:13:26.855 [AIO:DEBU] Echoing close - reason=1000
2020-05-14 01:13:26.856 [AIO:DEBU] [3] Server sent close: reason=1000
2020-05-14 01:13:26.857 [AIO:DEBU] [3] WS connection shutdown…
2020-05-14 01:13:26.858 [TCE:VERB] Connection to MUXS closed in state -1
2020-05-14 01:13:26.858 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)
2020-05-14 01:13:36.860 [TCE:INFO] Connecting to INFOS: ws://127.0.0.1:3001
2020-05-14 01:13:36.862 [TCE:INFO] Infos: b827:ebff:fef6:5a01 b827:ebff:fef6:5a01 ws://127.0.0.1:3001/gateway/b827ebfffef65a01
2020-05-14 01:13:36.862 [AIO:DEBU] [3] ws_close reason=1000
2020-05-14 01:13:36.862 [AIO:DEBU] Echoing close - reason=1000
2020-05-14 01:13:36.862 [AIO:ERRO] Recv failed: NET - Connection was reset by peer
2020-05-14 01:13:36.862 [AIO:DEBU] [3] WS connection shutdown…
2020-05-14 01:13:36.863 [TCE:VERB] Connecting to MUXS…
2020-05-14 01:13:36.864 [TCE:VERB] Connected to MUXS.
2020-05-14 01:13:36.878 [RAL:INFO] Lora gateway library version: Version: 5.0.1;
2020-05-14 01:13:36.878 [RAL:DEBU] SX1301 txlut table (0 entries)
2020-05-14 01:13:36.878 [RAL:VERB] SX1301 rxrfchain 0: enable=1 freq=867500000 rssi_offset=-166.000000 type=2 tx_enable=1 tx_notch_freq=0
2020-05-14 01:13:36.878 [RAL:VERB] SX1301 rxrfchain 1: enable=1 freq=868500000 rssi_offset=-166.000000 type=2 tx_enable=0 tx_notch_freq=0
2020-05-14 01:13:36.878 [RAL:VERB] SX1301 ifchain 0: enable=1 rf_chain=0 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:36.878 [RAL:VERB] SX1301 ifchain 1: enable=1 rf_chain=0 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:36.878 [RAL:VERB] SX1301 ifchain 2: enable=1 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:36.878 [RAL:VERB] SX1301 ifchain 3: enable=1 rf_chain=0 freq=200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:36.878 [RAL:VERB] SX1301 ifchain 4: enable=1 rf_chain=0 freq=400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:36.878 [RAL:VERB] SX1301 ifchain 5: enable=1 rf_chain=1 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:36.878 [RAL:VERB] SX1301 ifchain 6: enable=1 rf_chain=1 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:36.879 [RAL:VERB] SX1301 ifchain 7: enable=1 rf_chain=1 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:36.879 [RAL:VERB] SX1301 ifchain 8: enable=1 rf_chain=1 freq=-200000 bandwidth=2 datarate=2 sync_word=0/0
2020-05-14 01:13:36.879 [RAL:VERB] SX1301 ifchain 9: enable=0 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:36.879 [RAL:VERB] SX1301 LBT not enabled
2020-05-14 01:13:36.879 [RAL:INFO] Station device: /dev/spidev0.0 (PPS capture disabled)
2020-05-14 01:13:37.393 [RAL:ERRO] lgw_start failed: /dev/spidev0.0
2020-05-14 01:13:37.393 [any:ERRO] Closing connection to muxs - error in s2e_onMsg
2020-05-14 01:13:37.393 [AIO:DEBU] [3] ws_close reason=1000
2020-05-14 01:13:37.393 [AIO:DEBU] Echoing close - reason=1000
2020-05-14 01:13:37.394 [AIO:DEBU] [3] Server sent close: reason=1000
2020-05-14 01:13:37.394 [AIO:DEBU] [3] WS connection shutdown…
2020-05-14 01:13:37.394 [TCE:VERB] Connection to MUXS closed in state -1
2020-05-14 01:13:37.394 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)
2020-05-14 01:13:47.396 [TCE:INFO] Connecting to INFOS: ws://127.0.0.1:3001
2020-05-14 01:13:47.398 [TCE:INFO] Infos: b827:ebff:fef6:5a01 b827:ebff:fef6:5a01 ws://127.0.0.1:3001/gateway/b827ebfffef65a01
2020-05-14 01:13:47.398 [AIO:DEBU] [3] ws_close reason=1000
2020-05-14 01:13:47.398 [AIO:DEBU] Echoing close - reason=1000
2020-05-14 01:13:47.398 [AIO:ERRO] Recv failed: NET - Connection was reset by peer
2020-05-14 01:13:47.398 [AIO:DEBU] [3] WS connection shutdown…
2020-05-14 01:13:47.399 [TCE:VERB] Connecting to MUXS…
2020-05-14 01:13:47.400 [TCE:VERB] Connected to MUXS.
2020-05-14 01:13:47.415 [RAL:INFO] Lora gateway library version: Version: 5.0.1;
2020-05-14 01:13:47.415 [RAL:DEBU] SX1301 txlut table (0 entries)
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 rxrfchain 0: enable=1 freq=867500000 rssi_offset=-166.000000 type=2 tx_enable=1 tx_notch_freq=0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 rxrfchain 1: enable=1 freq=868500000 rssi_offset=-166.000000 type=2 tx_enable=0 tx_notch_freq=0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 ifchain 0: enable=1 rf_chain=0 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 ifchain 1: enable=1 rf_chain=0 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 ifchain 2: enable=1 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 ifchain 3: enable=1 rf_chain=0 freq=200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 ifchain 4: enable=1 rf_chain=0 freq=400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 ifchain 5: enable=1 rf_chain=1 freq=-400000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 ifchain 6: enable=1 rf_chain=1 freq=-200000 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 ifchain 7: enable=1 rf_chain=1 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 ifchain 8: enable=1 rf_chain=1 freq=-200000 bandwidth=2 datarate=2 sync_word=0/0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 ifchain 9: enable=0 rf_chain=0 freq=0 bandwidth=0 datarate=0 sync_word=0/0
2020-05-14 01:13:47.416 [RAL:VERB] SX1301 LBT not enabled
2020-05-14 01:13:47.416 [RAL:INFO] Station device: /dev/spidev0.0 (PPS capture disabled)
2020-05-14 01:13:50.326 [S2E:INFO] Configuring for region: EU863 – 863.0MHz…870.0MHz
2020-05-14 01:13:50.326 [S2E:VERB] DR0 SF12/BW125
2020-05-14 01:13:50.326 [S2E:VERB] DR1 SF11/BW125
2020-05-14 01:13:50.326 [S2E:VERB] DR2 SF10/BW125
2020-05-14 01:13:50.326 [S2E:VERB] DR3 SF9/BW125
2020-05-14 01:13:50.326 [S2E:VERB] DR4 SF8/BW125
2020-05-14 01:13:50.326 [S2E:VERB] DR5 SF7/BW125
2020-05-14 01:13:50.326 [S2E:VERB] DR6 SF7/BW250
2020-05-14 01:13:50.326 [S2E:VERB] DR7 FSK
2020-05-14 01:13:50.326 [S2E:VERB] DR8 undefined
2020-05-14 01:13:50.326 [S2E:VERB] DR9 undefined
2020-05-14 01:13:50.326 [S2E:VERB] DR10 undefined
2020-05-14 01:13:50.326 [S2E:VERB] DR11 undefined
2020-05-14 01:13:50.326 [S2E:VERB] DR12 undefined
2020-05-14 01:13:50.326 [S2E:VERB] DR13 undefined
2020-05-14 01:13:50.326 [S2E:VERB] DR14 undefined
2020-05-14 01:13:50.326 [S2E:VERB] DR15 undefined
2020-05-14 01:13:50.326 [S2E:VERB] TX power: 16.0 dBm EIRP
2020-05-14 01:13:50.326 [S2E:VERB] 27.0 dBm EIRP for 869.4MHz…869.65MHz
2020-05-14 01:13:50.326 [S2E:VERB] JoinEui list: 0 entries
2020-05-14 01:13:50.326 [S2E:VERB] NetID filter: FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF
2020-05-14 01:13:50.326 [S2E:VERB] Dev/test settings: nocca=0 nodc=0 nodwell=0
2020-05-14 01:14:32.331 [SYN:INFO] MCU/SX1301 drift stats: min: 0.0ppm q50: 1.4ppm q80: 2.4ppm max: 16.7ppm - threshold q90: -11.9ppm
2020-05-14 01:14:32.331 [SYN:INFO] Avg MCU drift vs SX1301#0: 1.0ppm
2020-05-14 01:14:47.401 [AIO:WARN] [3] Ignoring WS ping/pong message
2020-05-14 01:14:51.232 [SYN:INFO] Time sync qualities: min=39 q90=83 max=111 (previous q90=2147483647)
2020-05-14 01:14:52.403 [AIO:DEBU] [3] Connection closed unexpectedly
2020-05-14 01:14:52.403 [AIO:DEBU] [3] WS connection shutdown…
2020-05-14 01:14:52.403 [TCE:VERB] Connection to MUXS closed in state 4
2020-05-14 01:14:52.403 [TCE:INFO] MUXS reconnect backoff 4s (retry 2)
2020-05-14 01:14:56.404 [TCE:VERB] Connecting to MUXS…
2020-05-14 01:14:56.405 [TCE:VERB] Connected to MUXS.
2020-05-14 01:14:56.418 [any:CRIT] Radio device ‘/dev/spidev0.0’ in use by process: 1000
`

gateway_bridge log :

pi@B827EBFFFEF65A01:~ $ bridge_log
– Logs begin at Wed 2020-05-13 23:17:02 BST. –
May 13 23:17:13 B827EBFFFEF65A01 systemd[1]: Started ChirpStack Gateway Bridge.
May 13 23:17:15 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-13T23:17:15+01:00” level=info msg=“starting ChirpStack Gateway Bridge” docs=“Introduction - ChirpStack open-source LoRaWAN<sup>®</sup> Network Server” version=3.5.0
May 13 23:17:15 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-13T23:17:15+01:00” level=info msg=“backend/basicstation: starting websocket listener” bind=“[::]:3001” ca_cert= tls_cert= tls_key=
May 13 23:17:15 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-13T23:17:15+01:00” level=info msg=“integration/mqtt: connected to mqtt broker”
May 14 02:13:15 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:15+01:00” level=info msg=“backend/basicstation: router-info request received” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43632” router_uri=“ws://127.0.0.1:3001/gateway/b827ebfffef65a01”
May 14 02:13:15 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:15+01:00” level=info msg=“backend/basicstation: gateway connected” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43634”
May 14 02:13:15 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:15+01:00” level=info msg=“integration/mqtt: subscribing to topic” qos=0 topic=“gateway/b827ebfffef65a01/command/#”
May 14 02:13:15 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:15+01:00” level=info msg=“backend/basicstation: gateway version received” firmware=1.0.0 gateway_id=b827ebfffef65a01 model=rpi package=1.0.0 protocol=2 station=“2.0.3(rpi/std)”
May 14 02:13:15 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:15+01:00” level=info msg=“backend/basicstation: router-config message sent to gateway” gateway_id=b827ebfffef65a01
May 14 02:13:16 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:16+01:00” level=info msg=“backend/basicstation: gateway disconnected” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43634”
May 14 02:13:16 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:16+01:00” level=info msg=“integration/mqtt: unsubscribe topic” topic=“gateway/b827ebfffef65a01/command/#”
May 14 02:13:26 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:26+01:00” level=info msg=“backend/basicstation: router-info request received” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43636” router_uri=“ws://127.0.0.1:3001/gateway/b827ebfffef65a01”
May 14 02:13:26 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:26+01:00” level=info msg=“backend/basicstation: gateway connected” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43638”
May 14 02:13:26 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:26+01:00” level=info msg=“integration/mqtt: subscribing to topic” qos=0 topic=“gateway/b827ebfffef65a01/command/#”
May 14 02:13:26 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:26+01:00” level=info msg=“backend/basicstation: gateway version received” firmware=1.0.0 gateway_id=b827ebfffef65a01 model=rpi package=1.0.0 protocol=2 station=“2.0.3(rpi/std)”
May 14 02:13:26 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:26+01:00” level=info msg=“backend/basicstation: router-config message sent to gateway” gateway_id=b827ebfffef65a01
May 14 02:13:26 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:26+01:00” level=info msg=“backend/basicstation: gateway disconnected” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43638”
May 14 02:13:26 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:26+01:00” level=info msg=“integration/mqtt: unsubscribe topic” topic=“gateway/b827ebfffef65a01/command/#”
May 14 02:13:36 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:36+01:00” level=info msg=“backend/basicstation: router-info request received” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43640” router_uri=“ws://127.0.0.1:3001/gateway/b827ebfffef65a01”
May 14 02:13:36 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:36+01:00” level=info msg=“backend/basicstation: gateway connected” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43642”
May 14 02:13:36 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:36+01:00” level=info msg=“integration/mqtt: subscribing to topic” qos=0 topic=“gateway/b827ebfffef65a01/command/#”
May 14 02:13:36 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:36+01:00” level=info msg=“backend/basicstation: gateway version received” firmware=1.0.0 gateway_id=b827ebfffef65a01 model=rpi package=1.0.0 protocol=2 station=“2.0.3(rpi/std)”
May 14 02:13:36 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:36+01:00” level=info msg=“backend/basicstation: router-config message sent to gateway” gateway_id=b827ebfffef65a01
May 14 02:13:37 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:37+01:00” level=info msg=“backend/basicstation: gateway disconnected” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43642”
May 14 02:13:37 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:37+01:00” level=info msg=“integration/mqtt: unsubscribe topic” topic=“gateway/b827ebfffef65a01/command/#”
May 14 02:13:47 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:47+01:00” level=info msg=“backend/basicstation: router-info request received” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43644” router_uri=“ws://127.0.0.1:3001/gateway/b827ebfffef65a01”
May 14 02:13:47 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:47+01:00” level=info msg=“backend/basicstation: gateway connected” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43646”
May 14 02:13:47 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:47+01:00” level=info msg=“integration/mqtt: subscribing to topic” qos=0 topic=“gateway/b827ebfffef65a01/command/#”
May 14 02:13:47 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:47+01:00” level=info msg=“backend/basicstation: gateway version received” firmware=1.0.0 gateway_id=b827ebfffef65a01 model=rpi package=1.0.0 protocol=2 station=“2.0.3(rpi/std)”
May 14 02:13:47 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:13:47+01:00” level=info msg=“backend/basicstation: router-config message sent to gateway” gateway_id=b827ebfffef65a01
May 14 02:14:52 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:14:52+01:00” level=info msg=“backend/basicstation: gateway disconnected” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43646”
May 14 02:14:52 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:14:52+01:00” level=info msg=“integration/mqtt: unsubscribe topic” topic=“gateway/b827ebfffef65a01/command/#”
May 14 02:14:56 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:14:56+01:00” level=info msg=“backend/basicstation: gateway connected” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43648”
May 14 02:14:56 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:14:56+01:00” level=info msg=“integration/mqtt: subscribing to topic” qos=0 topic=“gateway/b827ebfffef65a01/command/#”
May 14 02:14:56 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:14:56+01:00” level=info msg=“backend/basicstation: gateway version received” firmware=1.0.0 gateway_id=b827ebfffef65a01 model=rpi package=1.0.0 protocol=2 station=“2.0.3(rpi/std)”
May 14 02:14:56 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:14:56+01:00” level=info msg=“backend/basicstation: router-config message sent to gateway” gateway_id=b827ebfffef65a01
May 14 02:14:56 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:14:56+01:00” level=info msg=“backend/basicstation: gateway disconnected” gateway_id=b827ebfffef65a01 remote_addr=“127.0.0.1:43648”
May 14 02:14:56 B827EBFFFEF65A01 chirpstack-gateway-bridge[559]: time=“2020-05-14T02:14:56+01:00” level=info msg=“integration/mqtt: unsubscribe topic” topic=“gateway/b827ebfffef65a01/command/#”
`

I’m really stuck about this, can you help me please ?

what i should do after change the spi rate in basicstation/deps/lgw/platform-xxx/libloragw/src/loragw_spi.native.c from 8000000 to 2000000 , i’m suppose i should to compile with some make? whatis allthenext steps !

I will test the basic station on the Raspberry Pi, but I can’t reply to you immediately.
I will reply to you within 8-72 hours, is it okay?

I am on the same boat. Changed the spi rate, compiled the code, have pretty much the same error. lwg failed to start. Could you share any extra steps ? Thanks

@jaja_iot
I am very, very sorry. I forgot to reply to you because I was busy with other work.

@momotaroliu408

Try the following operation.

  1. git clone https://github.com/lorabasics/basicstation.git
  2. cd basicstation
  3. make platform=rpi variant=std
  4. make clean
  5. rm ./build-rpi-std/lib/liblgw.a
  6. rm ./deps/lgw/platform-rpi/libloragw/libloragw.a

Please complete steps 7 to 12 in the basicstation directory.

  1. Modify ./deps/lgw/platform-rpi/libloragw/src/loragw_spi.native.c, change spi rate 8000000 to 2000000.
  2. make platform=rpi variant=std
  3. Download the https://github.com/RAKWireless/rak_common_for_gateway/blob/master/lora/start.sh file to any directory, and delete the content after line 15 of start.sh, including line 15.
  4. Use the command sudo ./start.sh to execute the script
  5. If your gateway hardware is 470 frequency band or 433 frequency band, modify the examples/live-s2.sm.tc/station.conf file and change 1257 to 1255 in two places. If your gateway hardware is other frequency band, please ignore this step.
  6. cd examples/live-s2.sm.tc
  7. RADIODEV=/dev/spidev0.0 ../../build-rpi-std/bin/station

@ZhuQI
Thanks, these are helpful, I can now connect and see lgw starting. However, I am getting this error:

[SYN:ERRO} Repeated excessive clock drifts between MCU/SX1031#0 (xxx retries): xxx ppm (threshold yyy ppm)

Do you have any suggestion on how to fix this? Any device data frame received are dropped with bad CRC (or no CRC). Thanks