reset_lgw.sh

Hi all,
I bought an LR1302 with a RPI HAT in order to design a LoRa gateway.
After software installation, i run ./chip_id command in order to get the gateway ID.
Unfortunatly the reset_lgw.sh failed because /sys/class/gpio is deprecated.
I replaced the echo command by a gpioset command as a char device is now used for the gpio in the linux.
See example below

echo "1" > /sys/class/gpio/gpio$SX1302_POWER_EN_PIN/value; WAIT_GPIO

gpioset gpiochip0 18=1

Unfortunatly the chip is not detected even though the gpio seems to toggle as expected.
Indeed i get the following message:
cleanup all GPIOs
setup GPIOs...
CoreCell reset through GPIO17...
SX1261 reset through GPIO17...
CoreCell power enable through GPIO18...
CoreCell ADC reset through GPIO13...
Opening SPI communication interface
Note: chip version is 0x00 (v0.0)
ERROR: Failed to set SX1250_0 in STANDBY_RC mode
ERROR: failed to setup radio 0
ERROR: failed to start the gateway

Just for info the GPS is functional (tested with minicom -D /dev/ttyS0 -b 9600)
Any help will be appreciated
Regards,
PS: It could be a good idea to update the lora repository with the support of the new gpio system. On the hand i don't managed to understand the matching between the gpio driven in the script and the gpio mapping indicated in the documentation.

Comments

  • Hello greg, which version of Raspberry Pi system do you use? For now, it only supports version Buster.

  • Hi,
    Thanks for your feedback.
    cat /etc/os-release
    PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
    NAME="Debian GNU/Linux"
    VERSION_ID="12"
    VERSION="12 (bookworm)"
    VERSION_CODENAME=bookworm
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"

    I tried with buster but unfortunately i get the same result
    See below when i issue the ./chip_id command:

    pi@MAPI4:~/LR1302_loraWAN/LR1302_HAL/sx1302_hal/util_chip_id $ ./chip_id
    CoreCell reset through GPIO17...
    SX1261 reset through GPIO17...
    CoreCell power enable through GPIO18...
    CoreCell ADC reset through GPIO13...
    Opening SPI communication interface
    Note: chip version is 0x00 (v0.0)
    ERROR: Failed to set SX1250_0 in STANDBY_RC mode
    ERROR: failed to setup radio 0
    ERROR: failed to start the gateway

    pi@MAPI4:~/LR1302_loraWAN/LR1302_HAL/sx1302_hal/util_chip_id $ cat /etc/os-release
    PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="10"
    VERSION="10 (buster)"
    VERSION_CODENAME=buster
    ID=raspbian
    ID_LIKE=debian
    HOME_URL="http://www.raspbian.org/"
    SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
    BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
    I think there's a problem with the hardware.
    Any idea ?
    Regards,

  • Hi, maybe your configuration is wrong. You can try the configured image (https://drive.google.com/drive/folders/1LL42h4sYU6f8MrvipY9GQXjcZutR_NGr?usp=drive_link) provided by Elecrow. Is your Raspberry PI working? If there's nothing wrong with your Raspberry PI, there's probably a hardware problem with the LR1302.

Sign In or Register to comment.