mpous / basicstation

LoRa Basics™ Station - The LoRaWAN Gateway Software
https://doc.sm.tc/station
60 stars 30 forks source link

IMST 880a Lite Gateway concentrator start failed #29

Open huberse opened 3 years ago

huberse commented 3 years ago

Trying to move to v3. So i replaced the Pi B+ from my original Lite Gateway that was running for ~3 years on v2 to use Balena Basicstation for easy use - that was the plan. Went trough the very good steps you provide and i see the Gateway in the console connecting but only for a second, then again after 10 seconds and so on.

05.07.21 22:31:53 (+0200)

2021-07-05 20:31:53.029 [TCE:VERB] Connecting to MUXS... 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.011 [TCE:VERB] Connected to MUXS. 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.023 [RAL:INFO] Lora gateway library version: Version: 5.0.1; 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.024 [RAL:VERB] Connecting to device: /dev/spidev0.0 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.024 [RAL:DEBU] SX130x txlut table (0 entries) 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.024 [RAL:VERB] SX1301 rxrfchain 0: enable=1 freq=867.5MHz rssi_offset=-166.000000 type=2 tx_enable=1 tx_notch_freq=0 / */ 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.025 [RAL:VERB] SX130x LBT not enabled

05.07.21 22:31:57 (+0200)

2021-07-05 20:31:57.025 [RAL:VERB] Station device: /dev/spidev0.0 (PPS capture disabled) 05.07.21 22:56:01 (+0200)
ERROR: Failed to load fw 1 05.07.21 22:56:01 (+0200)
ERROR: Version of calibration firmware not expected, actual:0 expected:2 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.028 [RAL:ERRO] _Concentrator start failed: lgwstart 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.028 [RAL:ERRO] ral_config failed with status 0x08 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.028 [any:ERRO] Closing connection to muxs - error in s2e_onMsg 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.028 [AIO:DEBU] [3] ws_close reason=1000 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.028 [AIO:DEBU] Echoing close - reason=1000 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.063 [AIO:DEBU] [3|WS] Server sent close: reason=1000 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.063 [AIO:DEBU] [3] WS connection shutdown... 05.07.21 22:31:57 (+0200)
2021-07-05 20:31:57.063 [TCE:VERB] Connection to MUXS closed in state -1

i found some similar issues and started to add SPI_SPEED Device variable with all kind of different values reported to work with the IMST 880a and a Pi3 but without success. The only thing i saw when set the speed to 2000000 the Failed to load Firmware error is gone, but the concentrator still fails to start.

any other hint i could try? as i would really love to use Balena

mpous commented 3 years ago

@huberse could you please confirm the device are you testing? Pi 3? Could you please share all the logs and the device variables you have configured? Thanks :)

xoseperez commented 3 years ago

I've just tested with an IMST iC880A and it works great, so my guess is that the problem has to do with the specific hardware configuration for the WiMOD Lite Gateway.

I found this old thread about the device and apparently the RESET GPIO is #5. I think this could be the issue since this is not the default value for the concentrator reset GPIO in the project.

Please brose to the balena dashboard and under the device scope try adding an environment variable named GW_RESET_GPIO with value 5 and see if it works.

huberse commented 3 years ago

@mpous I can confirm : Raspberry Pi 3 Model B Rev 1.2 log.txt or let me know what other logs are needed

@xoseperez Reset is alread set to GPIO5 on Pin29, according the log, its correct -

Resetting gateway concentrator on GPIO 5 Screenshot 2021-07-14 151208

mpous commented 3 years ago

I can see

<main> 2021-07-14 13:06:54.494 [RAL:VERB] SX130x LBT not enabled
<main> 2021-07-14 13:06:54.494 [RAL:VERB] Station device: /dev/spidev0.0 (PPS capture disabled)
<main> 2021-07-14 13:06:54.496 [RAL:ERRO] Concentrator start failed: lgw_start
<main> 2021-07-14 13:06:54.496 [RAL:ERRO] ral_config failed with status 0x08
<main> 2021-07-14 13:06:54.496 [any:ERRO] Closing connection to muxs - error in s2e_onMsg
mpous commented 3 years ago

@huberse could you please power off the Raspberry Pi, remove the LoRa concentrator power up again without concentrator. Then wait for a minute, power off the Pi. Connect the LoRa concentrator and power up again. Let me know what is the result of this operation.

huberse commented 3 years ago

@mpous , this did not help. Interesting point that the log file shows exactly the same messages without the concentrator connected. I also did a quick check with the old PI B+ v1.2 that was original in and it connected straigth to v2 , so i can exclude that the concentrator has failed while changing the PI. Also i changed the PI - that made no difference. btw i use armv7hf and will also try it with a spare PI4

thanks so far for all the help

zone11 commented 3 years ago

I can confirm the exact same behaviour with the IMST Gateway Lite and a Raspberry Pi 3. The same concentrator board used with an other backplane and the Pi 3 works perfect..

mpous commented 3 years ago

Thank you for reporting @zone11 @huberse

i don't have this concentrator. Let's see if @xoseperez can help here!

huberse commented 3 years ago

Thanks @zone11 for the confirmation. I ripped the Lite Gateway apart and wired it up according the ISMT Backplane wich looks the following

iC880a pin Description RPi physical pin
21 Supply 5V 2
22 GND 6
13 Reset 29
14 SPI CLK 23
15 MISO 21
16 MOSI 19
17 NSS 24

still no success. What backplane did you sucessfully used? Perhaps i can find out the correct wiring.

zone11 commented 3 years ago

@huberse I'm using the Backplane from the Coredump Mackerspace: Github Project The schematics can be found here: Schematics 1.4

Would be great if you find some time to wire your concentrator up the same way.

huberse commented 3 years ago

@zone11 thanks, i was actually just at that schematic and wired the reset pin to GPIO 25 removed the SPI Speed Variable and this happend

image

It connected ! rewired again to GPIO 5 on PIN 29 and i can confirm this is not working. Here the logs with Reset on GPIO 25 : ttn-gw-v3-pi3_ismt 880a @ home-26.07.21_22_4516(+0200).txt

@mpous is this something that could be corrected on the software side? if not i will modify the IMST Backplane

thanks to all bringing me on the rigth track so far

jellyfish-bot commented 2 years ago

[mpous] This issue has attached support thread https://jel.ly.fish/c81ed3b5-d764-4b86-a96e-c2fbac1ffef5

jellyfish-bot commented 2 years ago

[mpous] This issue has attached support thread https://jel.ly.fish/147ab5fd-50b7-43b9-b4d2-666ac01a5974