-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
basicstation fails to connect to Chirpstack gateway bridge using rak2245 on orangepi zero #60
Comments
It looks like the radio is failing to start:
Note that in the station.conf file you can specify a script to be executed before radio startup ( |
Just checking, have you set the SPI speed in the orangepi to 2MHz as the RAK2245 has internal level shifters to work on either 1.8 volts or 3.3 volts and they limit the SPI port speed to 2MHz. This would certainly prevent the gateway starting. |
Thanks for the help @beitler. I will turn on the DEBUG flags and run again. But like I said, the RAK2245 does work fine with the semtech udp lora packet forwarder. So it is definitely someting on the lgw/basicstation side. The SPI speed is set when you start SPI communication, so would be the responsibility of lgw I think. |
Ok, I am getting somewhere. It turns out the libloragw version and packet_forwarder that I was using was a slightly modified version by rakk. They use libloragw 5.0.1 as well, but also modify it slightly. First of all, they don't apply the patch that you give for platform linux and platform rpi. I also did a diff between the vanilla libloragw 5.0.1 and the files they supply for the RAKK2445. They changed 2 files for libloragw: I applied those changes to my libgw for basicstation, and turned the DEBUG flag on in library.cfg. Now I am getting a CALIBRATION FAILURE:
Any ideas? |
Could the patch that you apply fort platform-linux and platform-rpi be causing the calibration error? I am unclear what the patches do. They seem to be identical for linux and rpi. |
Any ideas? |
In the log above you already identified an important low level symptom of your issue:
To find the root cause, you should use the low level testing tools that come with the HAL library. A) Test loragw v5.0.1 with LBS patch
B) Test loragw v5.0.1 original without LBS patch
|
I ran the tests, with a small twist: RAKK Wireless also provides a libloragw with their packet forwarder, which also has the same tests, so I ran them there as well. TLDR; there is no difference with or without any of the patches, or between the RAKK provided libloragw or the one basicstation provides. As long as I first reset the concentrator with Unfortunately RAKK wireless doesn't seem willing/able to answer any questions (RAKWireless/rak_common_for_gateway#17). So does the register test and calibration test output point towards the issue? I have a hard time understanding what the output is saying. I ran all the tests with RAKK supplied libloragwtest_loragw_reg
(left out the MATCH'es for brevity) test_loragw_cal
Basicstation supplied libloragw, with LBS patchtest_loragw_reg test_loragw_cal
Basicstation supplied libloragw, without LBS patchDo need to manually change test_loragw_cal
|
You mention that you need to run the
Adjust the path and make sure the script is executable ( You further mention that you need to change SPI_SPEED to 2000000 in |
Yes I added the reset script to the station.conf already before. And I also changed the SPI_SPEED before (I already mentioned it in earlier posts). Is there any output in the calibration an reg tests above that makes you understand why calibration fails? I can't really understand if the tests failed or succeeded. It does say |
In my ticket over at RAKWireless/rak_common_for_gateway#17 tony noticed I had TX enabled on both radios, which it shouldn't be.... :) Whoopsy. My bad. When changing So for now, I needed to change a few things to get the rak2245 working with basicstation. I'll document them here, but I'd be happy to contribute a patch for it needed. What kind of patch would it need to be? A rak2245 variant for the rpi and linux platforms? How would that work? This is to give the reset script enough time to complete:
And I modified the patch file to also change the SPI speed from 8MHz to 2MHz:
And then I am using this as my station.conf:
The number |
I am trying to get basicstation to run on my orangepi zero with a rak2245 concentrator, with chirpstack-gateway-bridge but I am failing sofar. I managed to get it to work with the semtech udp packet forwarder quite easily. The only thing I needed to do there was change the spidev to /dev/spidev1.0 (spidev0 is not available) and change the reset pin to GPIO1 instead of 17 for the rpi.
With basicstation I get an error that the websocket connection is closed, and that it failed to
lgw_start /dev/spidev1.0
. I am wondering if I am having an SPIDEV issue, or a LNS/websocket issue with chirpstack.I tried resetting it with the
reset_lgw.sh start 1
script (using the-i
parameter) but that didn't help either. I am using the US915 band and setup sub-bad 1 (903.9-905.3MHz) as the multi_sf frequencies and didn't specify an tls certificates on the chirpstack-gateway-bridge side.This is my station.conf:
On the chirpstack side I do see basicstation trying to connect, send the version info and chirpstack responding with a router_config message:
The text was updated successfully, but these errors were encountered: