Giter Site home page Giter Site logo

esp32-lmic-deepsleep-example's Introduction

esp32-lmic-deepsleep-example's People

Contributors

jackgruber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp32-lmic-deepsleep-example's Issues

Code Can only run with no more than 6 byte of payload ?

Hi, I have some problems
When I run ESP32-LMIC-DeepSleep-example Code
If I set data to send to TTN more than 6 bytes like
static uint8_t mydata[] = "12345678";
It will send join request and send uplink only one time then the code stop working properly and stuck at the Packet queued Process

However, if I use data with 6 bytes or less like
static uint8_t mydata[] = "123456";
It can work properly without any problem

I wonder what am I doing wrong. I stuck here for so long. Can you help me solve this problem?
I use the AS923 band plan but I think this code can work normally because if I sent data less than 6 bytes. It works perfectly.

However, I appreciate your hard work creating this code very much!!

I will post pictures of this problems for you here

11
22

TTGO version gets stuck within EV_TXPEND forever

Hi,

I'm using Stack v3 and using your code to deep sleep an TTGO OLED LoRa v1.

The problem is that first deep sleep works well, but next iteration the program gets into an infinite loop with the status EV_TXPEND.

I attach output to console (I added some code to see how program is passing through different events):

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
Initializing OLED Screen
Starting DeepSleep test
Packet queued
10411: EV_JOINING
Cannot sleep
Cannot sleep
Cannot sleep
223351: EV_TXSTART
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
544617: EV_JOINED
netid: 19
devaddr: 260B6122
artKey: A59146F1F92790831D3B717F186932
nwkKey: 6AD6D85440C7577ABE5C766F21D4DC96
544878: EV_TXSTART
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
864847: EV_TXCOMPLETE (includes waiting for RX windows)
Cannot sleep
Cannot sleep
961840: EV_TXSTART
Go DeepSleep
ets Jul 29 2019 12:21:46

rst:0x5 (DEEPSLEEP_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
Initializing OLED Screen
Starting DeepSleep test
LMIC loaded from RTC
OP_TXRXPEND, not sending
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep
Cannot sleep

Save keys to EEPROM once

Hi Jack!
Thanks for sharing this. I've pulled my hair out for ages to have Lora working correctly with my ESP32 deep sleep. This fixed it!

I am however interested in saving the keys to EEPROM, and reading them from there.
In your blog post, you wrote that is has a very limited lifespan - And I indeed understand that, so I am open for other ideas.

We are developing a edge device that will be set out in different areas. Battery life is VERY important for us, and thus if at any point the device should restart and do a join procedure, that would kill the battery completly.

I've tried different approaches to implement it, but I simply cannot get it working. Do you have an example or any other tips for how we can make it persistent with OTTA, and not use ABP?

OP_TXRXPEND pending

Hi all,

I'm using an EZSBC ESP32 Dev board with separate rfm95w (EU868) and having the same problem when using TTN V3 credeńtials. Problem starts when TTN sends an unconfirmed downlink LinkADReq after a regular unconfirmed uplink by the node (FCnt 19 in the attachment) and this gets answered with an LinkADRAns. After this, the node is starting it's deepsleep , and the value for LMIC.opmode that is written to RTC seems to refer to a busy mode. After waking up, the node continues with LMIC.opmode: OP_TXRXPEND OP_NEXTCHNL which causes the system to be unable to send data to TTN
See Attachments.

@JackGruber : can we solve this issue by checking the LMIC.opmode status before writing it to RTC and -if necessary- correct it. Do we need the value for LMIC.opmode saved to RTC anyway?

Thanks a lot!

BR Marc
Error ESP32 DeepSleep TTNV3.txt
Screenshot_2021-06-29 RAK7258 - LoRa Packet Logger - LuCI

Originally posted by @MarcESP32 in #1 (comment)

US Version?

Hi,

I was wondering if there are any developments for US applications?

Kind regards,

SleepMode Lora Current

Firstly I tried lmic-otaa example with my setup, LoRa radio module (HopeRF RFM96) consumes 7.6uA all the time after sending packets. When trying your deepSleep codes everything works perferct ESP32-C3 consumes 5.6 uA but LoRa radio starts to consume approx. 67uA after sending packets. I realized that until esp32 go to sleep Lora consumes 7.6uA , After sleeping, currents goes up to 67uA.
I probe NSS RST DIO0 DIO1 pins and compare these two sketch, there is no difference between them. I could not find the reason. Do you have any idea about it ?

Guru Meditation Error: Core 1 panic'ed

Hello,
after uploading your code, i get this:

Starting DeepSleep test
LMIC: 4.1.1.0
Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400d5040:

I use Arduino 1.8.19 and the newest LMIC library 4.1.1.0 and a Lolin ESP32 mini

Do you have an idea?

Regards
Juergen

TTN stack v3 compatibility

Thanks a lot for this great code! It works very good with a TTN stack v2 application.
I tried the same code with a stack v3 application:

  • Join works good.
  • The first data frame after joining is sent directly.

But after a deep sleep it is blocked for about 10...15 secs waiting for queued data.
Then the data frame is sent and the TTGO T3 goes into deep sleep again.

After every deep sleep the queue needs additional 10..15 secs before sending. That means, the next cycle needs 30, then 45 and so on. The time is varying.

I'm used to code in Python, so I didn't find out how to debug/print queued messages. I tried different settings concerning the timing, interrupts and so on. It's no solution.

Maybe you have an idea?
I'm using a TTGO Lora32 v2.6.1 board with an ESP32 Pico D4.

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.