RAK2287 Will Not Connect

When I try to start the gateway service, I get the following. Any ideas on the /dev/ttyACM0 device?
+++++++++++++++
sudo systemctl status ttn-gateway.service

● ttn-gateway.service - The Things Network Gateway

Loaded: loaded (/lib/systemd/system/ttn-gateway.service; enabled; vendor preset: enabled)

Active: activating (auto-restart) (Result: exit-code) since Fri 2023-03-10 02:41:14 UTC; 754ms ago

Process: 7776 ExecStart=/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/start.sh (code=exited, status=1/FAILURE)

Main PID: 7776 (code=exited, status=1/FAILURE)

CPU: 42ms

Mar 10 02:41:14 rak-gateway ttn-gateway[7800]: INFO: packets received with a valid CRC will be forwarded

Mar 10 02:41:14 rak-gateway ttn-gateway[7800]: INFO: packets received with a CRC error will NOT be forwarded

Mar 10 02:41:14 rak-gateway ttn-gateway[7800]: INFO: packets received with no CRC will NOT be forwarded

Mar 10 02:41:14 rak-gateway ttn-gateway[7800]: This is uart for GPS.

Mar 10 02:41:14 rak-gateway ttn-gateway[7800]: INFO: [main] TTY port /dev/ttyAMA0 open for GPS synchronization

Mar 10 02:41:14 rak-gateway ttn-gateway[7800]: Opening USB communication interface

Mar 10 02:41:14 rak-gateway ttn-gateway[7800]: ERROR: failed to open COM port /dev/ttyACM0 - No such file or directory

Mar 10 02:41:14 rak-gateway ttn-gateway[7800]: ERROR: [main] failed to start the concentrator

Mar 10 02:41:14 rak-gateway systemd[1]: ttn-gateway.service: Main process exited, code=exited, status=1/FAILURE

Mar 10 02:41:14 rak-gateway systemd[1]: ttn-gateway.service: Failed with result ‘exit-code’

A search of Forum will show that most common reason for failure to start concentrator is incorrect mapping of reset pin…check you firmware to see what it currently is set to and then the documentation and other advise on forum/online to see what it should be. There have been other posts wrt RAK82287’s in recent times which may help. Which guide/firmware instructions are you following to deploy your gw?

Thanks for your reply. I have seen those posts, but noted that they were from 2020 in most cases. I am just entering this community and hobby so I did not make the connection between the reset pin and the error message I saw.

I used the RakWireless Quick Start Guide to download, install, and configure the firmware. Again, thanks for your reply.

Your concentrator should be the same model like this one from Seeed
GitHub - seeed-lora/WM1302-doc

If this are the reset pin which are causing the trouble, then maybe you try to change their connection points like its decribed in this link

Luckily hardware doesn’t change much, so time isn’t a huge consideration but the info definitely contributes to the “puzzle” as you piece it together.

Are you using a USB based connection (hard to get going, rare, not recommended) or is that a misconfiguration that you just need to revisit?

The issue appears to be around the serial port for the GPS - which means you need to set the Pi hardware to allow the use of the port. Possibly because if it’s on USB so it won’t be wired in. You may need to use the raspi-config to turn the UART on/off as appropriate - see https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-uarts - you need to read the whole section, maybe more than twice, possibly with your favourite grape or hop or grain based beverage to allow you to relax and not get too invested in the detail. And then do: https://www.raspberrypi.com/documentation/computers/configuration.html#disabling-the-linux-serial-console

The RAK gateway installer is a bit of a FrankenScript - but I used it recently (I’ve lost my dev HAT so had to dig out another one, yeah, I am that rock & roll and no, I haven’t found it yet) and it just works - even after I stuck a proctoscope in to the details to understand what it’s doing to manipulate it to my evil needs. And then I removed it all and used Jac @kersing’s wonderlul PF but that needs an endoscope to help it over the line as the wiringPi has moved. (Sorry Jac, I’ll do a Pull request before Easter, pinky promise).

Thanks for your reply. I followed the advice of @teflon1969 and installed the WM1302 pkg, configuring as recommended. The console provided more info, but alas, the /dev/ttyACM0 failure persists. I looked through the RPi documentation (with the help of an IPA as recommended) but found no mention of that device. Here is the console output.

./lora_pkt_fwd
*** Packet Forwarder ***
Version: 2.1.0
*** SX1302 HAL library version info ***
Version: 2.1.0 ***
INFO: Little endian host
INFO: found configuration file global_conf.json, parsing it
INFO: global_conf.json does contain a JSON object named SX130x_conf, parsing SX1302 parameters
INFO: com_type USB, com_path /dev/ttyACM0, lorawan_public 1, clksrc 0, full_duplex 0
INFO: antenna_gain 0 dBi
INFO: Configuring legacy timestamp
INFO: SX1261 spi_path is not configured in global_conf.json
INFO: Configuring Tx Gain LUT for rf_chain 0 with 16 indexes for sx1250
INFO: radio 0 enabled (type SX1250), center frequency 904300000, RSSI offset -215.399994, tx enabled 1, single input mode 0
INFO: radio 1 enabled (type SX1250), center frequency 905000000, RSSI offset -215.399994, tx enabled 0, single input mode 0
INFO: Lora multi-SF channel 0> radio 0, IF -400000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 1> radio 0, IF -200000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 2> radio 0, IF 0 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 3> radio 0, IF 200000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 4> radio 1, IF -300000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 5> radio 1, IF -100000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 6> radio 1, IF 100000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 7> radio 1, IF 300000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora std channel> radio 0, IF 300000 Hz, 500000 Hz bw, SF 8, Explicit header
INFO: FSK channel 8 disabled
INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to E45F01FFFEXXXXXX
INFO: server hostname or IP address is configured to "nam1.cloud.thethings.network"
INFO: upstream port is configured to "1700"
INFO: downstream port is configured to "1700"
INFO: downstream keep-alive interval is configured to 10 seconds
INFO: statistics display interval is configured to 30 seconds
INFO: upstream PUSH_DATA time-out is configured to 100 ms
INFO: packets received with a valid CRC will be forwarded
INFO: packets received with a CRC error will NOT be forwarded
INFO: packets received with no CRC will NOT be forwarded
INFO: GPS serial port path is configured to "/dev/ttyS0"
INFO: Reference latitude is configured to 31.3XX deg
INFO: Reference longitude is configured to -92.4XX deg
INFO: Reference altitude is configured to 36 meters
INFO: Beaconing period is configured to 0 seconds
INFO: Beaconing signal will be emitted at 869525000 Hz
INFO: Beaconing datarate is set to SF9
INFO: Beaconing modulation bandwidth is set to 125000Hz
INFO: Beaconing TX power is set to 14dBm
INFO: Beaconing information descriptor is set to 0
INFO: global_conf.json does contain a JSON object named debug_conf, parsing debug parameters
INFO: got 2 debug reference payload
INFO: reference payload ID 0 is 0xCAFE1234
INFO: reference payload ID 1 is 0xCAFE2345
INFO: setting debug log file name to loragw_hal.log
WARNING: [main] impossible to open /dev/ttyS0 for GPS sync (check permissions)
Opening USB communication interface
ERROR: failed to open COM port /dev/ttyACM0 - No such file or directory
ERROR: [main] failed to start the concentrator

Good choice! We’ve got a nice line in citrus going here in the UK!

When you say device, that’s a nuanced description. You may think the GNSS module is a device, others more Linux minded may be thinking of the contents of the /dev directory. From the Pi docs, it references the serial devices:

/dev/serial0 and /dev/serial1 are symbolic links which point to either /dev/ttyS0 or /dev/ttyAMA0

So you need to ensure that you have disabled the Linux serial console to allow the GNSS module to communicate.

Not sure how many cans are in an IPA configuration, but there are other pertinent questions that have been skipped, such as:

Are you using USB?

If so, why? Do you have a USB adapter for the concentrator? Or is it a HAT? If a HAT, the SPI path is missing from global_conf.json

And have you spotted the handy formatting toolbar with the </> :wink:

Beverage of choice over this side is Thatchers Vintage Cider, 2020. The mother-in-law had an IPA.

I meant unix devices (the /dev type). I have a bit of experience with unix, but not this flavor.

I have a HAT. It’s actually the RPi kit from RakWireless. I didn’t realize the HAT means SPI and not USB. I’ll track down that missing item from the config file.

Thanks again for your help.

BTW, I lived in Gloucestershire 82-85 and developed an appreciation for ciders. I haven’t found a good one in the States.

As did I, at school in Gloucester, but I think I was too young to fully appreciate them then!

Just closing the loop on this issue. I contacted RAK Tech Support and was able to get the issue resolved. Here is the message I received from them. It may help others in the future.

> For some reason, your HAT works with GPIO25 and not the default GPIO17 as it should be. 
> I have raised this with our internal team

Thanks to all who responded.

1 Like

Hey I have the same issue with the /dev/ttyACM0 no file or directory and failed to start the concentrator portion with RAK 2287. I was wondering how you were able to solve this issue, and what files did you change to fix it? Much appreciated!

This is the LORA gateway I am using and I do not know if it is a USB or HAT/SPI RAK Raspberry Pi 4 Kit for LoRaWAN – RAKwireless Store
?

It sounds like you have the same gateway that I bought. I did not fix the issue. I contacted tech support at RakWireless and they fixed it remotely. I looked around in /opt/ttn-gateway/ but everything there looks unchanged.

It is HAT/SPI.

If it is with the Pi Hat then it is SPI (if ordered as a kit and not ordered seperately using store defaults where card (used to) default to usb on the store if not selected from drop down! - this was aproblem for several participants in the Things Summer Academy a while back…I think since corrected in the RAK store with SPI as 1st offered…

HAT is SPI only!

So do I have to buy this? I only have the kit in this link RAK Raspberry Pi 4 Kit for LoRaWAN – RAKwireless Store. I did not get any additional parts.

What was the number you called them to fix this issue with /dev/ttyACM0 not being found?

No its the black pcb at the bottom of the picture, under the RPi, next to the antenna. It shows the 2287 conc card mounted on the Pi HAT! If that is the kit you bought then you have it! :wink:

https://www.rakwireless.com/en-us/contact-us