Start.sh is overwritten - 2287

I have to change my SX1301_RESET_BCM_PIN=17 from the original build to SX1301_RESET_BCM_PIN=25 as support described the process from an earlier post below. I do this for my start.sh in /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd, but it keeps getting overwritten whenever I reboot. There must be another config file somewhere?

Hello all,

If you wish to use the RAK2287 concentrator module from a RAK Helium Miner as a regular LoRa concentrator, you will probably get some or all these errors:

rak-gateway ttn-gateway[1419]: ERROR: Failed to set SX1250_0 in STANDBY_RC mode

rak-gateway ttn-gateway[1419]: ERROR: failed to setup radio 0

rak-gateway ttn-gateway[1419]: ERROR: [main] failed to start the concentrator

To start the concentrator properly, you need to change the reset pin to PIN25. Using the rak_common_for_gateway you need to make a change in the file: /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/start.sh The line SX1301_RESET_BCM_PIN=17 should be changed to SX1301_RESET_BCM_PIN=25 and the file saved. After the change is made, start the device again. It should run as intended. If there are still problems, contact the support at [email protected]

Hello,

You should change it here as well:

Nikola Semov

I’m getting there Nikola! Same behavior before, the values are overwritten. In the table below I changed all ‘17’ to ‘25’ and 4 of the scripts were overwritten when I rebooted.

/home/pi/rak_common_for_gateway/lora/lora_gateway/reset_lgw.sh - no mention of pin 17
/home/pi/rak_common_for_gateway/lora/rak2287/reset_lgw.sh - changed back to 17 when i rebooted
/home/pi/rak_common_for_gateway/lora/rak2287/packet_forwarder/lora_pkt_fwd/reset_lgw.sh - changed back to 17
/home/pi/rak_common_for_gateway/lora/rak2287/sx1302_hal/tools/reset_lgw.sh - no mention of pin 17
/home/pi/rak_common_for_gateway/lora/rak5146/reset_lgw.sh NA

/home/pi/rak_common_for_gateway/lora/start.sh - changed back to 17
/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/start.sh - changed back to 17

Hello,

The paths that you have mentioned are the installation scripts. You need to change the pin in the already installed scripts that are under /opt/ttn-gateway/packet_forwarder/…

Nikola Semov

Yes, I changed the pin number on those and they were re-written. I changed the values before compilation. Still the same errors, but different pin 17 → 25. Here are the last lines of ./reset_lgw.sh

  • INFO: packets received with no CRC will NOT be forwarded
  • This is uart for GPS.
  • WARNING: [main] impossible to open /dev/ttyAMA0 for GPS sync (check permissions)
  • ./reset_lgw.sh: 22: echo: echo: I/O error
  • ./reset_lgw.sh: 25: cannot create /sys/class/gpio/gpio25/direction: Directory nonexistent
  • CoreCell reset through GPIO25…
  • ./reset_lgw.sh: 31: cannot create /sys/class/gpio/gpio25/value: Directory nonexistent
  • ./reset_lgw.sh: 32: cannot create /sys/class/gpio/gpio25/value: Directory nonexistent
  • Opening SPI communication interface
  • Note: chip version is 0x10 (v1.0)
  • ERROR: Failed to set SX1250_0 in STANDBY_RC mode
  • ERROR: failed to setup radio 0
  • ERROR: [main] failed to start the concentrator

Should i cut my lost time on this 2287 chip? I notice there has been no activity for 3 years, is it current? Does someone have a recommendation for a gateway that I can record all transmissions to the concentrator, not just the ones configured to be accepted in the gateway.

Hello,

At this point, if the files are being overwritten the only option is that you start the installation script again and this is how the files are being overwritten. I don’t have any other explanation for this.
Are you sure that the concentrator is not a USB version? Please give me the SN and I will check it.

There are hundreds of people using this concentrator with no issue or they need a little bit of help, not sure why you have such big trouble running it.

No activity where? The concentrator and the RAK common for gateways are working perfectly.

Are you using Raspbian bookworm? The GPIO control there is different so you will need to replace some scripts.
Is this RPI 4 or 5?

Here is a repo for the files that you need to change: GitHub - tvelev/Raspberry_Pi5_test
Change them with the corresponding ones after installation and DO NOT RUN THE INSTALL SCRIPT AFTER CHANGEING.

Nikola Semov

Thanks for the Reply Nikola,
I must of been on some older 2287 sites that haven’t posted for 3 years. So this unit is current state of the art? Its a challenge to stay current. I only ran the installation script twice, initially and as a test for the overwritten phenomenon.

I an using Raspbian bookworm on RPI4, the 64bit recommend one from the Imager tool. The serial number of the 2287 is 826200542010409917. It doesn’t not have the soldered MCX GPS antenna port.

I replaced the two files according to tvelev/Raspberry_Pi5_test. this is the tail of the. I get a bash error (i’m not smart enough to figure this one out) and the script is using GPIO pin 17?

  • root@rak-gateway:/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd# ./reset_lgw.sh start
  • gpioget: error reading GPIO values: No such file or directory
  • ./reset_lgw.sh: 37: [: -eq: unexpected operator
  • gpioset: error setting the GPIO line values: No such file or directory
  • gpioset: error setting the GPIO line values: No such file or directory
  • CoreCell reset through GPIO17…
  • gpioset: error setting the GPIO line values: No such file or directory
  • gpioset: error setting the GPIO line values: No such file or directory
  • root@rak-gateway:/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd#

Tail of start.sh

  • This is uart for GPS.
  • WARNING: [main] impossible to open /dev/ttyAMA0 for GPS sync (check permissions)
  • gpioget: error reading GPIO values: No such file or directory
  • ./reset_lgw.sh: 37: [: -eq: unexpected operator
  • gpioset: error setting the GPIO line values: No such file or directory
  • gpioset: error setting the GPIO line values: No such file or directory
  • CoreCell reset through GPIO17…
  • gpioset: error setting the GPIO line values: No such file or directory
  • gpioset: error setting the GPIO line values: No such file or directory
  • Opening SPI communication interface
  • Note: chip version is 0x05 (v0.5)
  • ERROR: Failed to set SX1250_0 in STANDBY_RC mode
  • ERROR: failed to setup radio 0
  • ERROR: [main] failed to start the concentrator

Defective PI4? Maybe this is an excuse to get a PI5. Or maybe because my device doesn’t have GPS?

Hello @bvt ,

Could you give me access to the RPI via Dataplicity?
This way I can check what is going on as I’m getting confused already :smiley: .
I will send you a DM with the command that you need to run on the RPI so I can access it from Dataplicity.

Nikola Semov