Page 2 of 2

Re: SX127x (LoRa transceiver) driver for (Micro)Python on ESP8266/ESP32/Raspberry_Pi

Posted: Wed Dec 25, 2019 8:10 am
by Wei Lin
mczubel wrote:
Thu Dec 19, 2019 7:01 pm
Wei Lin wrote:
Wed Feb 06, 2019 10:01 pm
The error message means that the SPI communication failed. Sometimes it fails after h/w reset until s/w reset.
I have no oscilloscope hence not sure why it is so.
Hi
I have the same error after deepsleep wake up.
First time work perfect, but after wakeup reset this error appears.
thank
That may concern two issues:

1. after reset:
https://github.com/Wei1234c/SX127x_driv ... /issues/14

2. power supply:
please see the post above by kurt at Fri Feb 08, 2019 1:08 am
viewtopic.php?f=16&t=3871#p33923

Re: SX127x (LoRa transceiver) driver for (Micro)Python on ESP8266/ESP32/Raspberry_Pi

Posted: Thu Apr 08, 2021 6:27 pm
by bluesky007
Hi,

Re: SX127x (LoRa transceiver) driver for (Micro)Python on ESP8266/ESP32/Raspberry_Pi

Posted: Thu Apr 08, 2021 8:07 pm
by Wei Lin
Hi,

No, I have no connection with MAKERFABS company.

Regards.

Wei

Re: SX127x (LoRa transceiver) driver for (Micro)Python on ESP8266/ESP32/Raspberry_Pi

Posted: Mon Jan 10, 2022 7:32 pm
by kodsi
Hello,

I had the same problem with esp32 Heltec board, running micropython 1.17.
Fixed it by calling machine.SoftSPI instead of machine.SPI in the first argument of the SX127x class constructor(SPI is deprectated)

Code: Select all

device_spi = machine.SoftSPI(baudrate = 10000000,
        polarity = 0, phase = 0, bits = 8, firstbit = machine.SPI.MSB,
        sck = machine.Pin(device_config['sck'], machine.Pin.OUT, machine.Pin.PULL_DOWN),
        mosi = machine.Pin(device_config['mosi'],machine.Pin.OUT, machine.Pin.PULL_UP),
        miso = machine.Pin(device_config['miso'], machine.Pin.IN, machine.Pin.PULL_UP))

lora = SX127x(device_spi, pins=device_config, parameters=lora_parameters)
I hope this helps,
cheers

Re: SX127x (LoRa transceiver) driver for (Micro)Python on ESP8266/ESP32/Raspberry_Pi

Posted: Wed Jan 12, 2022 3:57 am
by dawgshalmer
kodsi wrote:
Mon Jan 10, 2022 7:32 pm
Hello,

I had the same problem with esp32 Heltec board, running micropython 1.17.
Fixed it by calling machine.SoftSPI instead of machine.SPI in the first argument of the SX127x class constructor(SPI is deprectated)

Code: Select all

device_spi = machine.SoftSPI(baudrate = 10000000,
        polarity = 0, phase = 0, bits = 8, firstbit = machine.SPI.MSB,
        sck = machine.Pin(device_config['sck'], machine.Pin.OUT, machine.Pin.PULL_DOWN),
        mosi = machine.Pin(device_config['mosi'],machine.Pin.OUT, machine.Pin.PULL_UP),
        miso = machine.Pin(device_config['miso'], machine.Pin.IN, machine.Pin.PULL_UP))

lora = SX127x(device_spi, pins=device_config, parameters=lora_parameters)
I hope this helps,
cheers
Could you share the device_config and lora_parameters objects that you passed into this to make this work? I have the same board and there is scant documentation for anything.

Re: SX127x (LoRa transceiver) driver for (Micro)Python on ESP8266/ESP32/Raspberry_Pi

Posted: Wed Jan 12, 2022 8:51 am
by kodsi
dawgshalmer wrote:
Wed Jan 12, 2022 3:57 am
kodsi wrote:
Mon Jan 10, 2022 7:32 pm
Hello,

I had the same problem with esp32 Heltec board, running micropython 1.17.
Fixed it by calling machine.SoftSPI instead of machine.SPI in the first argument of the SX127x class constructor(SPI is deprectated)

Code: Select all

device_spi = machine.SoftSPI(baudrate = 10000000,
        polarity = 0, phase = 0, bits = 8, firstbit = machine.SPI.MSB,
        sck = machine.Pin(device_config['sck'], machine.Pin.OUT, machine.Pin.PULL_DOWN),
        mosi = machine.Pin(device_config['mosi'],machine.Pin.OUT, machine.Pin.PULL_UP),
        miso = machine.Pin(device_config['miso'], machine.Pin.IN, machine.Pin.PULL_UP))

lora = SX127x(device_spi, pins=device_config, parameters=lora_parameters)
I hope this helps,
cheers
Could you share the device_config and lora_parameters objects that you passed into this to make this work? I have the same board and there is scant documentation for anything.
lora_parameters = {
'address': 1,
'frequency': 868E6,
'tx_power_level': 2,
'signal_bandwidth': 125E3,
'spreading_factor': 8,
'coding_rate': 5,
'preamble_length': 8,
'implicit_header': False,
'sync_word': 0x12,
'enable_CRC': False,
'invert_IQ': False,
}

Re: SX127x (LoRa transceiver) driver for (Micro)Python on ESP8266/ESP32/Raspberry_Pi

Posted: Fri Jan 14, 2022 7:49 am
by dawgshalmer
kodsi wrote:
Wed Jan 12, 2022 8:51 am
dawgshalmer wrote:
Wed Jan 12, 2022 3:57 am
kodsi wrote:
Mon Jan 10, 2022 7:32 pm
Hello,

I had the same problem with esp32 Heltec board, running micropython 1.17.
Fixed it by calling machine.SoftSPI instead of machine.SPI in the first argument of the SX127x class constructor(SPI is deprectated)

Code: Select all

device_spi = machine.SoftSPI(baudrate = 10000000,
        polarity = 0, phase = 0, bits = 8, firstbit = machine.SPI.MSB,
        sck = machine.Pin(device_config['sck'], machine.Pin.OUT, machine.Pin.PULL_DOWN),
        mosi = machine.Pin(device_config['mosi'],machine.Pin.OUT, machine.Pin.PULL_UP),
        miso = machine.Pin(device_config['miso'], machine.Pin.IN, machine.Pin.PULL_UP))

lora = SX127x(device_spi, pins=device_config, parameters=lora_parameters)
I hope this helps,
cheers
Could you share the device_config and lora_parameters objects that you passed into this to make this work? I have the same board and there is scant documentation for anything.
lora_parameters = {
'address': 1,
'frequency': 868E6,
'tx_power_level': 2,
'signal_bandwidth': 125E3,
'spreading_factor': 8,
'coding_rate': 5,
'preamble_length': 8,
'implicit_header': False,
'sync_word': 0x12,
'enable_CRC': False,
'invert_IQ': False,
}
Thanks!