Skip to content

[Bug]: Issues with GPIO Pins and SX1262 Radio Initialization #4298

Description

@orhunavcu

Category

Serial

Hardware

Other

Firmware Version

2.3.13.83f5ba0

Description

Hi, I am encountering issues while setting up Meshtastic on my Raspberry Pi 5 with a Waveshare LoRa 433MHz GNSS module. Below is the log output and specific errors I am facing:

`Portduino is starting, HWID=1, VFS root at /root/.portduino/default
Setting up Meshtastic on Portduino...
Using /etc/meshtasticd/config.yaml as config file
Warning, cannot claim pin GPIO21St16invalid_argument
Warning, cannot claim pin GPIO16St16invalid_argument
Warning, cannot claim pin GPIO20St16invalid_argument
Warning, cannot claim pin GPIO18St16invalid_argument
INFO | ??:??:?? 0

//\ E S H T /\ S T / C

DEBUG | ??:??:?? 0 Filesystem files:
DEBUG | ??:??:?? 0 /.. (0 Bytes)
DEBUG | ??:??:?? 0 /prefs/.. (0 Bytes)
DEBUG | ??:??:?? 0 /prefs/db.proto (512 Bytes)
DEBUG | ??:??:?? 0 /prefs/channels.proto (57 Bytes)
DEBUG | ??:??:?? 0 /prefs/. (0 Bytes)
DEBUG | ??:??:?? 0 /. (0 Bytes)
INFO | ??:??:?? 0 No I2C device configured, skipping.
INFO | ??:??:?? 0 No I2C devices found
INFO | ??:??:?? 0 Meshtastic hwvendor=37, swver=2.3.13.83f5ba0
INFO | ??:??:?? 0 Initializing NodeDB
INFO | ??:??:?? 0 Loading /prefs/db.proto
INFO | ??:??:?? 0 Loaded /prefs/db.proto successfully
INFO | ??:??:?? 0 Loaded saved devicestate version 22, with nodecount: 1
INFO | ??:??:?? 0 File /prefs/config.proto not found
INFO | ??:??:?? 0 Installing default LocalConfig
INFO | ??:??:?? 0 Setting default channel and radio preferences!
DEBUG | ??:??:?? 0 Expanding short PSK #1
INFO | ??:??:?? 0 Wanted region 0, using UNSET
INFO | ??:??:?? 0 File /prefs/module.proto not found
INFO | ??:??:?? 0 Installing default ModuleConfig
INFO | ??:??:?? 0 Loading /prefs/channels.proto
INFO | ??:??:?? 0 Loaded /prefs/channels.proto successfully
INFO | ??:??:?? 0 Loaded saved channelFile version 22
INFO | ??:??:?? 0 File /oem/oem.proto not found
DEBUG | ??:??:?? 0 cleanupMeshDB purged 0 entries
DEBUG | ??:??:?? 0 Using nodenum 0x6732e961
DEBUG | ??:??:?? 0 Expanding short PSK #1
INFO | ??:??:?? 0 Wanted region 0, using UNSET
DEBUG | ??:??:?? 0 Set Timezone to GMT0
DEBUG | ??:??:?? 0 Read RTC time as 1721170151
DEBUG | ??:??:?? 0 NeighborInfoModule is disabled
INFO | ??:??:?? 0 File /prefs/cannedConf.proto not found
INFO | ??:??:?? 0 CannedMessageModule is enabled
DEBUG | ??:??:?? 0 Attempting to activate sx1262 radio on SPI port /dev/spidev0.0
DEBUG | ??:??:?? 0 SX126xInterface(cs=-1, irq=-1, rst=-1, busy=-1)
DEBUG | ??:??:?? 0 SX126X_DIO3_TCXO_VOLTAGE not defined, not using DIO3 as TCXO reference voltage
INFO | ??:??:?? 0 Starting meshradio init...
DEBUG | ??:??:?? 0 (bw=250, sf=11, cr=4/5) packet symLen=8 ms, payloadSize=0, time 231 ms
DEBUG | ??:??:?? 0 (bw=250, sf=11, cr=4/5) packet symLen=8 ms, payloadSize=253, time 2115 ms
INFO | ??:??:?? 0 Radio freq=906.875, config.lora.frequency_offset=0.000
INFO | ??:??:?? 0 Set radio: region=UNSET, name=LongFast, config=0, ch=19, power=30
INFO | ??:??:?? 0 Radio myRegion->freqStart -> myRegion->freqEnd: 902.000000 -> 928.000000 (26.000000 mhz)
INFO | ??:??:?? 0 Radio myRegion->numChannels: 104 x 250.000kHz
INFO | ??:??:?? 0 Radio channel_num: 20
INFO | ??:??:?? 0 Radio frequency: 906.875000
INFO | ??:??:?? 0 Slot time: 42 msec
INFO | ??:??:?? 0 Set radio: final power level=22
INFO | ??:??:?? 10 SX126x init result -2
ERROR | ??:??:?? 10 Failed to find SX1262 radio`

The main issues are:

I am receiving warnings about being unable to claim several GPIO pins (GPIO21, GPIO16, GPIO20, GPIO18).
The SX1262 radio is not being detected, resulting in the error “Failed to find SX1262 radio.”
Could someone please help me troubleshoot these issues?

Thank you!

PS: I did the same steps in this video. https://www.youtube.com/watch?v=91ULi9DWgds&t=1317s

Relevant log output

Lora:
  Module: sx1262  # Waveshare SX126X XXXM
  DIO2_AS_RF_SWITCH: true
  CS: 21
  IRQ: 16
  Busy: 20
  Reset: 18

gpiochip: 4

GPS:
  SerialPath: /dev/ttyAMA10

Webserver:
  Port: 443 # Port for Webserver & Webservices
  RootPath: /usr/share/doc/meshtasticd/web # Root Dir of WebServer


JOURNALCTL 

Tem 17 22:26:28 raspberrypi meshtasticd[1430]: 
Tem 17 22:26:28 raspberrypi meshtasticd[1430]: 
Tem 17 22:26:28 raspberrypi meshtasticd[1430]: INFO  | ??:??:?? 0 
Tem 17 22:26:28 raspberrypi meshtasticd[1430]: Set RX gain to boosted mode; result: 0
Tem 17 22:26:28 raspberrypi meshtasticd[1430]: 
Tem 17 22:26:28 raspberrypi meshtasticd[1430]: 
Tem 17 22:26:28 raspberrypi meshtasticd[1430]: ERROR | ??:??:?? 0 
Tem 17 22:26:28 raspberrypi meshtasticd[1430]: Failed to find SX1262 radio
Tem 17 22:26:28 raspberrypi meshtasticd[1430]: 
Tem 17 22:26:28 raspberrypi systemd[1]: meshtasticd.service: Failed with result 'exit-code'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions