AIO V2 / CM5 / Debian Trixie – Meshtasticd SX1262 initialization failure

Hi Rex,

I’m working with a ClockworkPi uConsole with Raspberry Pi CM5 (16 GB) and the HackerGadgets AIO V2 board, including the LoRa module.

I have been using a LLM to help me with issue and this is as far as I have gotten.

I’m running a fresh Debian 13 Trixie installation using the current Rex/uConsole image, kernel 7.1.4. The system is now running from a 512 GB NVMe, although the same fresh image was initially tested from SD.

The other AIO V2 hardware is working correctly:

  • RTL-SDR — working
  • GPS — working
  • RTC — working
  • Internal USB hub — working
  • Ethernet — working
  • tar1090/readsb — working when the SDR rail is enabled

The problem is specifically the AIO V2 LoRa/SX1262 with Meshtastic.

AIO V2 configuration

The AIO V2 package is installed:

hackergadgets-uconsole-aio-board 1.41

I also installed the current aiov2_ctl.

The LoRa rail is being controlled correctly and I can turn it on with:


sudo aiov2_ctl lora on

The current AIO V2 status shows:


LORA GPIO16: ON

The CM5 configuration contains:


dtoverlay=clockworkpi-uconsole-cm5
dtoverlay=spi1-1cs

The SPI device exposed by the CM5/RP1 is:


/dev/spidev10.0

The relevant Meshtastic configuration is currently:


Lora:

  Module: sx1262
  gpiochip: 15
  DIO2_AS_RF_SWITCH: true
  DIO3_TCXO_VOLTAGE: true
  IRQ: 26
  Busy: 24
  Reset: 25
  spidev: spidev10.0

The gpiochip: 15 setting is present because this is the AIO V2/CM5 GPIO configuration.

The meshtasticd service starts, but fails during SX1262 initialization with:


SX126x init result -2
No sx1262 radio

With the original spidev1.0 configuration, Meshtastic reported:


Failed to open posix file /dev/spidev1.0, errno=2
No hardware spi chip found
SX126x init result -2
No sx1262 radio

Changing it to the actual device exposed by the CM5:


spidev: spidev10.0

removed the /dev/spidev1.0 error, but the radio still fails initialization:


SX126x init result -2
No sx1262 radio
free(): invalid pointer
Aborted

The meshtasticd user has the required SPI/GPIO permissions, including membership in the spi and gpio groups.

I also verified that the AIO V2 LoRa rail is powered before starting Meshtastic.

I found the ClockworkPi forum discussion where another AIO V2 + Debian Trixie user had the exact:


SX126x init result -2
No sx1262 radio

error. In that case restoring:


dtoverlay=spi1-1cs

fixed the LoRa module. That overlay is already present on my system, so that particular fix doesn’t resolve my problem.

At this point I’m trying to determine whether there is a CM5/AIO V2-specific Meshtastic configuration, device-tree setting, package/version issue, or GPIO/SPI mapping issue that is different from the documented configuration.

Could you tell me what the known-good Meshtastic configuration for AIO V2 + CM5 + the current Trixie image should be, particularly the expected SPI device name and SX1262 GPIO configuration?

On a CM5 running the current Rex Trixie image, what should spidev: be set to for the AIO V2 LoRa module? My system exposes /dev/spidev10.0, while the AIO V2 documentation specifies spidev1.0.

If you need any specific logs or diagnostics, I’m happy to provide them.

Thanks!

Davkenrem

3 Likes

I am just now sitting and reinstalling my uConsole just to see if I can start from scratch since Ive had issues with both Meshtastic and Meshcore running REX image Debian-13-Trixie-7.1.4.

This feels like its extremely relevant for the issues I had, will read and try to follow up to see if I can get it to work.

ok, so a quick report. I’ve got two uConsoles which are pretty much the same considering the hardware. However thy have way different installation dates and with different setups..

GreyOne

  • old installation, Rex Debian image 6.12 upgraded to Kernel 7.14
  • uConsole + CM5 Lite /wifi
  • addons: AIOv2 + AC1200
  • Installed aiov2_ctl + accompanied apps (aiov2_ctl --add-apps)

While I can get the MUI to start and connect the radio seems defend. I can see traces in the logs that packages are received but MUI will never show any signs of life.

BlackOne

  • Fresh and new installation w Rex Debian image 7.14.
  • uConsole + CM5 Lite /wifi
  • addons: AIOv2 + AC1200
  • Installed aiov2_ctl + accompanied apps (aiov2_ctl --add-apps)

In the now latest installation, the MUI starts but fails to connect and tracing logs with journalctl -u meshtasticd -b -f I can see one like with SX126x init result -2 . Which after a quick websearch I found this ref: "RADIOLIB_ERR_CHIP_NOT_FOUND (-2).

Since my issue is twofold (with BlackOne). MUI cannot connect and meshtsticd doesn’t seem to launch.

I’ve been trying to follow what small info there is about the Meshtasticd but its kind of hard know which end to troubleshoot.

Progress… I think…

I have managed to replicate the status of GreyOne to my BlackOne.

By commenting the Lora part form /etc/meshtasticd/config.yaml, like below.

---
Lora:
#  Module: auto
  #Module: sx1262  # HackerGadgets RTL-SDR/LoRa extension board
#  DIO2_AS_RF_SWITCH: true
#  DIO3_TCXO_VOLTAGE: true
#  IRQ: 26
#  Busy: 24
#  Reset: 25
#  gpiochip: 15
#  spidev: spidev10.0
#  spidev: spidev1.0

Then adding my own config section in a new file from which I copied from GreyOne.
That is, /etc/meshtastic/config.d/10-buttstallion.yaml

                                                              
#lora:
  Module: auto
  #Module: sx1262  # HackerGadgets RTL-SDR/LoRa extension board
  DIO2_AS_RF_SWITCH: true
  DIO3_TCXO_VOLTAGE: true
  IRQ: 26
  Busy: 24
  Reset: 25
  gpiochip: 15
##  spidev: spidev1.0


GPS:
   # change the path to /dev/ttyAMA0 if you are using CM5
   SerialPath: /dev/ttyAMA0
Webserver:
  Port: 443 # Port for Webserver & Webservices
  RootPath: /usr/share/meshtasticd/web # Root Dir of WebServer
  SSLKey: /etc/meshtasticd/ssl/private_key.pem # Path to SSL Key, generated if not present
  SSLCert: /etc/meshtasticd/ssl/certificate.pem # Path to SSL Certificate, generated if not present

edit: not sure why I did comment #lora: at the beginning… which would mean the whole lora part would not fall under lora: section :thinking:

While it did complain about having to generate certificate it does start and stay on.
However connecting with MUI works however feels just as defend as there are no indications that it can see other nodes nor receives any messages. However following the log gives (journalctl -u meshtasticd -b -f):

Sep 08 22:59:59 clockworkpi meshtasticd-start.sh[23631]: INFO  | 20:59:58 2 Tell client we have new packets 4

I also cannot connect to the API via the webserver, localhost, asmeshtastic.local seems unreachable.

Great… now I have two with the same issue… :laughing:

Time to sleep now I guess…

I did some testing, here is my config.yaml

root@clockworkpi:/etc/meshtasticd# cat config.yaml 
Lora:
  Module: sx1262
  DIO2_AS_RF_SWITCH: true
  DIO3_TCXO_VOLTAGE: true
  IRQ: 26
  Busy: 24
  Reset: 25
  gpiochip: 15
  spidev: spidev1.0

GPS:
  SerialPath: /dev/ttyAMA0


Logging:
  LogLevel: info # debug, info, warn, error

Webserver:

  Port: 443 # Port for Webserver & Webservices
  RootPath: /usr/share/meshtasticd/web
  SSLKey: /etc/meshtasticd/ssl/private_key.pem 
  SSLCert: /etc/meshtasticd/ssl/certificate.pem 

General:
  MaxNodes: 200
  MaxMessageQueue: 100
  ConfigDirectory: /etc/meshtasticd/config.d/
  MACAddressSource: eth0
1 Like

you did some testing but did you get it to work?
I get the same defend behaviour with your config as before.

Meshtasticd starts and runs

logs show signs of receiving messages/packages

MUI and webserver connects.

NO sign of life in either UI. No messages and only one node visiable which is myself.

oh yea, I managed to figure out the issue with my webserver. Seems meshtastic.local dose not register in my uConsole’s local DNS hence why it fails to connect to that address. Connecting from uConsole or another device in the same network works using IP address.

p.s I noticed that my base config.yaml also has an extra added to general.

General:
  AvailableDirectory: /etc/meshtasticd/available.d/

which I believe if for when using the part below.

Lora:
  module: auto

Not that this made any difference in the end but food for thought.

Try just localhost not meshtastic.local

Also set your channel. Channel 20 in the lora config of the web UI and then you should start seeing nodes.

Any thoughts om my issues Rex?

Yes, localhost worked just as fine also :+1:

Also set your channel. Channel 20 in the lora config of the web UI and then you should start seeing nodes.

Not sure which you mean, but are we talking about LoRa > Frequency Slot?
If so setting it to 20 did nothing.

Logs still claims that Meshtasticd receives messages tho.

Sep 09 15:41:10 clockworkpi meshtasticd-start.sh[2601]: INFO  | 13:41:10 495 Tell client we have new packets 13

Getting curious now after I set logging to debug. While above row claim that packages are received, below feels more curious as it claims only to have sent one package but received none.


Sep 09 15:46:21 clockworkpi meshtasticd-start.sh[7537]: INFO  | 13:46:21 75 [DeviceTelemetry] num_packets_tx=1, num_packets_rx=0, num_packets_rx_bad=0 


you need gpiochip: 15 not gpiochip: 16

are you in the USA? if not you need whatever frequency channel from your area. also you need to set the region you’re in.

Thanks Rex. Mine is already set to gpiochip: 15. I’m currently using:

gpiochip: 15

IRQ: 26

Busy: 24

Reset: 25

spidev: spidev10.0

The remaining error is SX126x init result -2 / No sx1262 radio.

Is spidev10.0 correct for a CM5 on the current Trixie 7.1.4 image, or should it actually be spidev1.0?

yeah definitely 1.0 not 10.0

I am not in US but rather Sweden where we use EU_868 which is set from the UI.

Funny part is, I remember in the beginning of July (running the older kernel version of Trixie) I got meshtastic to work and heard other nodes.

That fixed it thank you.

I’m seeing the same CM5 + AIO V2 Meshtastic failure.

Hardware/software:

uConsole + Raspberry Pi CM5 Lite
Debian 13 Trixie
Kernel: 6.12.62-v8-16k+
hackergadgets-uconsole-aio-board: 1.41
aiov2_ctl installed

AIO rail status:

GPS   GPIO27: ON
LORA  GPIO16: ON
SDR   GPIO7: ON
USB   GPIO23: ON

SPI devices exposed:

/dev/spidev0.0
/dev/spidev10.0

Active Meshtastic LoRa config:

Lora:
  Module: sx1262
  DIO2_AS_RF_SWITCH: true
  DIO3_TCXO_VOLTAGE: true
  IRQ: 26
  Busy: 24
  Reset: 25
  gpiochip: 0
  spidev: spidev10.0

Notes:

  • /dev/spidev1.0 does not exist on this setup.
  • Setting spidev: spidev10.0 removes the “Failed to open /dev/spidev1.0” error.
  • Setting gpiochip: 15 causes Meshtastic to abort while initializing GPIO26.
  • On this boot, GPIO24/GPIO25/GPIO26 are on gpiochip0.
  • Adding CS: 1 causes Meshtastic to try GPIO1 and abort, so I removed the CS override.

Current failure after the above config:

SX126x init result -2
No sx1262 radio
free(): invalid pointer
Aborted

So it looks like Meshtastic can now reach GPIO/SPI, but SX1262 init still fails. Is there a known-good CM5 + AIO V2 config for this kernel/image, or is this a current package/kernel/device-tree issue?

@Davkenrem @ward

spidev10.0 is the SPI device created by the uConsole dtoverlays. Don’t use it for the LoRa module. spidev1.0 is the only correct SPI device for the LoRa module.

Something must be wrong with your config.txt or the SPI initialization. If the SPI is configured correctly, you will see spidev1.0 under /dev. At this stage, there is nothing wrong with the hardware parts or Meshstatic configuration. You can see the spidev1.0 shows up even without the AIO was installed.

Please post the contents of the config.txt file.

@vileer
Thanks, that was exactly it. spidev10.0 was a red herring from the uConsole overlays. After fixing the SPI init so /dev/spidev1.0 appeared, I changed Meshtastic back to spidev1.0 and the SX1262 initialized successfully:

SX126x init result 0
sx1262 init success
API server listen on TCP port 4403

The web UI is connected now and showing the node. Appreciate the clear pointer.

1 Like