Looking for help with ESP32 + SX1276

Hi ,I am working with the ESP32 and SX1276 module. Uplink is working properly .

While doing downlink from the application in things network (Message->downlink option in the end node option in App) .The end node is not receiving the data.

The end node is flashed with the receive example code from “TheThingsnetwork” Arduino library .The gateway is showing the downlink signal received, But the end node is not receiving it.

Please help me with the problem.

Which one specifically - the one for the ThingsNode? (An Arduino Leonardo variant with RN2483/2903 Microchip module with onboard LoRaWAN stack)… details/links please.

Round here the guys who really seem to know best options recommend something like

Uses well supported library wrapped in one of the best documented and with wide board support - inc ESP32/Sx127x - implementations…though using PlatformIO - It uses the Arduino framework, the LMIC LoRaWAN library and PlatformIO.

See also (and earlier parts)

That code base would only work with the Microchip RN2483 serial modem so it seems very very odd bordering on impossible that that library would drive an SX1276 via SPI on ESP32. Do you have any other libraries loaded?

My point exactly! :wink:
https://www.thethingsindustries.com/docs/devices/the-things-uno/

To repeat @Jeff-UK, see: Big ESP32 + SX127x topic part 3

No, i dont have any other library loaded

I’m checking with the esp32 ,in arduino ide. could you please help me in the getting downlink data at the end node

He already did:

If that does not solve your problem then please be more specific in asking your questions.

The homework you will have to do yourself:

  • First check for valuable information already available on the forum (use search!).
  • Learn the theory about the LoRaWAN protocol and how downlinks work from the LoRaWAN specifications.
  • Learn about the LoRaWAN library that you (need to) use, which most probably is the MCCI LMIC library (but unclear due to lack of information in your posts).
  • Follow wise advice (already) given (above).
  • Check LMIC-node!

For your information: we don’t have crystall balls so you will have to provide all relevant details about your situation/project yourself. Your OP lacks a ton of details. Please don’t make others have to guess and have to ask for information that you can provide yourself from the start and make your questions more specific.
Forum users are here to help but not for holding hands.

1 Like

Hey,

this is my first post, don’t know if I’m here right, but I can’t create a new topic and ask because of that here.

I tried yesterday to register an ESP32 S3 Cam with SX1276 in TTN, but the OTAA didn’t work. Here information, I hope I mention all relevant.

I wanted to use the OAAT example sketch of the MCCI LoRaWAN LMIC Library by IBM, Matthijs Kooijman, Terry Moore, ChaeHee Won, Frank Rose, Tristan Weber. I personalized it, see the uploaded sketch.

But it doesn’t work, this is the serial output:

Starting
FAILURE 
/home/david/Arduino/libraries/MCCI_LoRaWAN_LMIC_library/src/hal/hal.cpp:38
Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1). 

Core  1 register dump:
PC      : 0x42002a58  PS      : 0x00060d34  A0      : 0x82002a99  A1      : 0x3fcebe60  
A2      : 0x3c0302dd  A3      : 0x00000026  A4      : 0x3fc984e8  A5      : 0x3fc94990  
A6      : 0x00000000  A7      : 0x3fc98190  A8      : 0x82002a58  A9      : 0x3fcebe40  
A10     : 0x3fc98190  A11     : 0x00000026  A12     : 0x0000000a  A13     : 0x00060523  
A14     : 0x00000000  A15     : 0x00000002  SAR     : 0x0000000f  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xffffffff  


Backtrace: 0x42002a55:0x3fcebe60 0x42002a96:0x3fcebe80 0x42002b4d:0x3fcebea0 0x42004e63:0x3fcebec0 0x42004e7a:0x3fcebee0 0x420022ef:0x3fcebf00 0x42008b71:0x3fcebf30 0x4037be1d:0x3fcebf50


Core  0 register dump:
PC      : 0x40378806  PS      : 0x00060334  A0      : 0x8202895c  A1      : 0x3fc9f920  
A2      : 0x00000000  A3      : 0x00000000  A4      : 0x00060020  A5      : 0x3fc9f1f0  
A6      : 0x00000001  A7      : 0x00000160  A8      : 0x8200bdf2  A9      : 0x3fc9f8e0  
A10     : 0x00000000  A11     : 0x00000000  A12     : 0x3fc95320  A13     : 0x00000000  
A14     : 0x00060020  A15     : 0x3fc9f8ff  SAR     : 0x00000019  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000  


Backtrace: 0x40378803:0x3fc9f920 0x42028959:0x3fc9f940 0x4037cf73:0x3fc9f960 0x4037be1d:0x3fc9f980




ELF file SHA256: c61fe3e90

Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1). 

Core  1 register dump:
PC      : 0x403845cf  PS      : 0x00020434  A0      : 0x82015493  A1      : 0x3fcebcb0  
A2      : 0x00020423  A3      : 0xa5a5a5a5  A4      : 0x82015493  A5      : 0x00060425  
A6      : 0xfffbfff0  A7      : 0x00000076  A8      : 0x820153b1  A9      : 0x3fcebc80  
A10     : 0x00000000  A11     : 0x3fcebc9b  A12     : 0x00000001  A13     : 0x3fcebc9c  
A14     : 0x3fc986b4  A15     : 0x60038000  SAR     : 0x00000006  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x400570e8  LEND    : 0x400570f3  LCOUNT  : 0x00000000  


Backtrace: 0x403845cc:0x3fcebcb0 0x42015490:0x3fcebcc0 0x42028e1d:0x3fcebce0 0x420067f0:0x3fcebd10 0x4200c521:0x3fcebd30 0x40375cb9:0x3fcebd80 0x40375f60:0x3fcebda0 0x00040022:0x3fcebe60 |<-CORRUPTED

I’ve connected the board like the following:

ESP32 S3 SX1276
2 DIO0
14 RESET
21 NSS/CS
45 SCK
46 MISO
47 MOSI

Like written in the Code, I changed the file /Arduino/libraries/MCCI_LoRaWAN_LMIC_library/project_config/lmic_project_config.h, I uploaded it, too.

I hope, that is enough information and you could help me.

ttn_otaa.ino (8,3 KB)

lmic_project_config.h (415 Bytes)

Thank you, and if somebody is interested about the project (altitude controllable weather balloon), just say, I can write a weekly newsletter or something similiar…
PS: I always get update notifications in the arduino IDE for ESP32 boards, but if fails:
Failed to update esp32. Error: 4 DEADLINE_EXCEEDED: context deadline exceeded (Client.Timeout or context cancellation while reading body)

You need to fix this.

PS, if you read a bit more of the forum, you’ll then get an automagic upgrade that will allow you to post a new topic.

1 Like

Thanks, but I can’t fix it. I think the problem is, that I use an ESP32 S3 Cam, many pins are needed for the Cam and SD-Card. So I don’t use the default pins. Have you ideas, how to solve that? Here as a complete pinout:

Pin onboard-part onboard-function external part external function VCC in V
0 BOOT Servo 1
1 LED IO2 GY63 SCL 3,3
2 SX1276 Interrupt-Pin DIO0 3,3
3 JTAG EN Servo 2ADC V-in Sensor
4 Camera SIOD
5 Camera SIOC
6 Camera VYSNC
7 Camera HREF
8 Camera Y4
9 Camera Y3
10 Camera Y5
11 Camera Y2
12 Camera Y6
13 Camera PCLK
14 SX1276 Reset-Pin 3,3
15 Camera XCLK
16 Camera Y9
17 Camera Y8
18 Camera Y7
19 USB_D+
20 USB_D-
21 SX1276 NSS/CS
35 PSRAM PSRAM
36 PSRAM PSRAM
37 PSRAM PSRAM
38 SD Card CMD
39 SD Card CLK
40 SD Card DATA
41 MTMS GPS/SX1276 RX/DIO1 3,3
42 MTDI GPS TX
43 TX LED TX MOSFET 1
44 RX LED RX MOSFET 2
45 SX1276 SPI-SCK (VSPI) 3,3
46 SX1276 SPI-MISO 3,3
47 SX1276 SPI-MOSI 3,3
48 WS2812 GY63 SDA 3,3

And I’ve read, that the ESP32 S3 is unstable with the library I use, are there better alternatives?

I also tried to connect DIO1 of the SX1276, but that didn’t helped, too.

Good news, with the default Pins of the library example, it works! It looks, like I don’t have connection here, I will try tomorrow in the near a relay.
PS: I have here lying around a ESP8266 with LoRa EBYTE E220-900T30D, could I build a development relay out of that?

NO, they are not supported on TTN

You should also consider how appropriate it is to use the community network.

If you have some scheme for sending pictures, you will breach the fair use policy and the legal limits very quickly.

1 Like

If by

You mean near a Gateway!

And given

Again if you mean a Gateway…..then NO!

Incorrect use of terms and implied lack of understanding of how LoRaWAN works suggests, as Nick says, you need to read more on the Forum and dive deeper into what LoRaWAN is and how it works and is implemented and what is supported on TTN. In recent times the concept of a LoRaWAN Relay has emerged from the development labs with a specific specification and set of criteria by which they, and any associated end devices, need to be configured and operated but its a bit specialist at this point and good knowledge of standard LoRaWAN (think Min 8 channel) and how that is different to the specific LW Relay (single channel - and definetly not a single channel packet forwarder) implementation should be thought of as key to success with the latter. Others may advise differently but suspect the EBYTE module isnt a good start point for such a project…..a bit like the tourist asking for directions to location XYZ being told by a local “you could but I really wouldnt start from here”! :grin:

update - I note Nick had also replied with same story by time I checked more on the module before I then hit send :slight_smile:

The core chipset is not LW compatible.

And that module is point to point LoRa over a serial port only, so can’t run a LW stack.

Possibly useful as a key chain dangly bit.

If you want to launch a balloon and send telemetry, perhaps you could ask on one of the HAB forums, as you’d really be better off using a combination of UKHAS LoRa and HorusBinary v2 or the new v3, so you can tap in to the radio amateur network for receiving without any particular limits on how much data you send, unlike LW on TTN.

I know this combo works, I can even do it by remote control by using the @stevencellist tele-presence system. Latency can be a bit harsh, but it resulted in a successful flight last week even if the driving was a bit out of the way. My bad, I must learn the road network of other countries.

NB: We ONLY discuss LW on TTN/TTI here. Everything else is off topic, so please take the pointers above to do some serious Googling.

Pins 45 and 46 on the ESP32S3 are strapping pins, you may need to add pullups or pulldowns if you want to use them as GPIOs.

1 Like

What is the exact nature of this ‘control’ ?

TTN\LoRaWAN has significant limitations on the number of ‘control’ packets you can send.

The balloon drops ballast and vents gas to control altitude. But it does that autonomously, we only need to send a downlink, if we want to have it to fly on another altitude. Also, we eventually need to support the balloon with controlling its altitude at sunrise and -set. But that shouldn’t be more than a handful downlinks per day. The balloon should send uplinks every 5 to 15 mins. Pictures would be nice, but if that is against the fair use policy (I will look up how hard we would need to compress a picture) it’s okay.

Yes, sorry. But it worked!

Okay, then it needs to work so.