Problems with basicstation

Okay thanks. I’ll keep an eye out for any updates. Appreciate all your hard work.

it works, isn’t it @barryjump ?

Yes, thank you! It’s odd that the SPI speed would have anything to do with the certs, but it certainly seems to have fixed the issues. Thanks a million.

One side question: Why does balena show two different MAC addresses? Is that one for the pi and one for the rak hat?

Hi, most likely yes. You can use the webterminal and ssh in the hostOS and check with ifconfig to see which MAC is assigned to which interface.

Great thanks @floion

In separate news, unfortunately @mpous I think we have a new problem. The gateway’s been running for 2 hours, but lost connection with TTN shortly after because of a time sync problem. I just rebooted and it confirmed that it does connect initially no problem, but time drifts cause a disconnect within minutes.

Did you encounter these errors?

25.08.20 18:26:25 (-0400)  main  2020-08-25 22:26:25.098 [SYN:INFO] Mean MCU drift vs SX130X#0: -0.5ppm
25.08.20 18:26:33 (-0400)  main  2020-08-25 22:26:33.499 [SYN:INFO] Time sync qualities: min=72 q90=122 max=3736 (previous q90=129)
25.08.20 18:26:37 (-0400)  main  2020-08-25 22:26:37.703 [SYN:VERB] Time sync rejected: quality=3350 threshold=122
25.08.20 18:26:48 (-0400)  main  2020-08-25 22:26:48.207 [SYN:VERB] Time sync rejected: quality=3369 threshold=122
25.08.20 18:26:50 (-0400)  main  2020-08-25 22:26:50.308 [SYN:VERB] Time sync rejected: quality=135 threshold=122
25.08.20 18:27:10 (-0400)  main  2020-08-25 22:27:10.260 [SYN:INFO] MCU/SX130X drift stats: min: +0.0ppm  q50: -0.5ppm  q80: +4.8ppm  max: -15.7ppm - threshold q90: -9.8ppm

Might that be a GPS problem since the RAK gets time from the gps?

Hey @barryjump i have been speaking with Jose and this “Time sync” issue seems like a normal issue for this code. We will talk with Semtech to see how to solve this and create a new PR to solve this.

having said that, it seems that this time sync issue, does not affect the uplinks and downlinks of the gateway. We have been testing gateways during the last month, i can see on mine the same logs and it looks like it works good.

We will keep you updated once we solve this issue.

BTW were you able to send the GPS information from your gateway?

Let’s stay connected

Marc

1 Like

Okay, makes sense. Yes I was able to get GPS data out - pretty accurate too.

I’ll keep an eye on your reply from Semtech and watch the repo too for the new PR.

I am getting almost identical error messages:

27.08.20 14:19:54 (-0500)  main  2020-08-27 19:19:54.893 [SYS:WARN] Station in NO-CUPS mode
27.08.20 14:19:55 (-0500)  main  2020-08-27 19:19:55.094 [TCE:INFO] Starting TC engine
27.08.20 14:19:55 (-0500)  main  2020-08-27 19:19:55.095 [any:INFO] ./tc.trust: 
27.08.20 14:19:55 (-0500)  main  cert. version     : 3
27.08.20 14:19:55 (-0500)  main  serial number     : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
27.08.20 14:19:55 (-0500)  main  issuer name       : O=Digital Signature Trust Co., CN=DST Root CA X3
27.08.20 14:19:55 (-0500)  main  subject name      : O=Digital Signature Trust Co., CN=DST Root CA X3
27.08.20 14:19:55 (-0500)  main  issued  on        : 2000-09-30 21:12:19
27.08.20 14:19:55 (-0500)  main  expires on        : 2021-09-30 14:01:15
27.08.20 14:19:55 (-0500)  main  signed using      : RSA with SHA1
27.08.20 14:19:55 (-0500)  main  RSA key size      : 2048 bits
27.08.20 14:19:55 (-0500)  main  basic constraints : CA=true
27.08.20 14:19:55 (-0500)  main  key usage         : Key Cert Sign, CRL Sign
27.08.20 14:19:55 (-0500)  main  2020-08-27 19:19:55.095 [AIO:INFO] tc has no key+cert configured - running server auth only
27.08.20 14:19:55 (-0500)  main  2020-08-27 19:19:55.428 [TCE:INFO] Connecting to INFOS: wss://lns.us.thethings.network:443
27.08.20 14:19:55 (-0500)  main  2020-08-27 19:19:55.852 [TCE:INFO] Infos: dca6:32ff:fe36:a8e4 muxs-::0 wss://lns.us.thethings.network:443/traffic/eui-DCA632FFFE36A8E4
27.08.20 14:19:55 (-0500)  main  2020-08-27 19:19:55.852 [AIO:DEBU] [3] ws_close reason=1000
27.08.20 14:19:55 (-0500)  main  2020-08-27 19:19:55.852 [AIO:DEBU] Echoing close - reason=1000
27.08.20 14:19:55 (-0500)  main  2020-08-27 19:19:55.853 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
27.08.20 14:19:55 (-0500)  main  2020-08-27 19:19:55.853 [AIO:DEBU] [3] WS connection shutdown...

Here is a screenshot of my environmental variables:

@barryjump do you notice any major differences between my setup and yours? If it’s working for you, I would like to try to replicate your setup.

Override the SPI speed to 8000000 on icy-river

Also make sure you’ve pushed the latest release from here:

They did some updates to the repo in the last two days.

Setting the SPI speed to 8000000 didn’t seem to make any difference, and I downloaded the repo today. But thanks anyway for sharing @barryjump.

@mpous do you have any ideas?

Sorry - have you tried setting GW_GPS to true, you have it set to false on icy-river.

@barryjump and @whm Actually, SPI SPEED now is set in the code to 200000. We are working to improve the code when we will be able to talk with Semtech, as there is no source code of this part. On the GPS part i’m testing this, i will keep you updated :slight_smile:

I did enable GPS, thanks for the suggestion!

@mpous thanks for clarifying about the SPI speed. though I have to admit I was a little confused by the 800000 override since I believe you did that yourself in my app?

Anyway, let’s definitely keep the momentum on this one I think the Semtech feedback will be very useful.

BTW, I’m a little out of my depth on docker/multicontainer/makefiles so if anyone has more dummy proof advice on how to get basicstation running alongside other apps that would be VERY helpful!

PS. You guys are incredible with the support, keep it up! Balena rocks.

Also @mpous I saw Pycom retweeted your FiPy & gateway post. If you get your FiPy talking to your basicstation please let us know the setup details! Literally just bought the RAK gateway and some FiPy’s explicitly for this purpose. Small world.

1 Like

Hello!
I stil didn’t had time to test my FiPy with the basicsstation LoRa gateway! in theory it should work great as the Basics Station is just the way the gateway sends data to TTN or TTI (or others). As far as i tested, at the moment it worked well with the TTN Arduino Uno from Kickstarter and the TTN button. I think there shouldn’t be a problem with FiPy.

If you can test it earlier than me let me know if you get any results! Have fun!

I didn’t get a chance yet to test with the FiPy, but I did have another question:

Is basicstation compatible with Chirpstack? Curious if anyone has tried integrating a Balena deployed basicstation with a self hosted Chripstack deployment.

Hi
It looks like one of our former engineers was trying to do this - see chirpstack forum thread here - https://forum.chirpstack.io/t/optimise-lora-app-server-for-raspberry-pi/5622/8
I am not sure if Odysseas is still working on that - but by the looks of it, this requires some attention from the Chirpstack devs.