Once you’ve got a clean stable set of software, can you do a simple Blinky sketch to test the Arduino + ESP32 is working OK before trying some heavyweight software.
Thank you very much. At the moment I downgraded to Arduino 1.8.13 (stable) and download the v3.3 lmic library provided by @descartes. Regarding the blink led, should I load the basic arduino blink a led or a specific esp32 example ? Could you please be more specific? thanks!
If there is a specific ESP32 version, then that. It’s about trying a simple sketch, any simple sketch, to make sure the IDE, compiler & download is working OK.
BUT to work the correct pin number for the on-board LED has to be used/configured.
This however can often be an issue, because one needs to know the correct pin number for one’s board.
The T-Beam v1.x could possibly further complicate things if the LED is managed by the power management chip (I don’t know).
So Blink might not be such a good example for testing in this case.
Just writing some text to the serial port will probably be easier to check.
On Arduino 1.8.13 with my board TTGO T-Beam v1.1 connected via USB I uploaded the Blink example (but instead of blinking the LED I just did a digital Write on pin 2 and checked with a multimeter - it works).
Then I went to the ttn-otaa.ino example which is the basic example that should work from the lmic library v3.3. But it does not, showing the following message in the console in a forever loop:
Stop posting about issues without providing detailed information (as already mentioned before).
What sketch?
From where did you get it?
What have you configured to (try) make it work?
E.g. what board have you selected in the IDE, which pin is configured for the LED etc.
You will have to do your OWN homework
Is there any ESP32 specific blink?
Why ask others if you can check yourself…
Why not use a ESP32 specific version if/when it exists. If it exists then probably for a reason.
And? Are these messages a problem? For a small sketch, they appear OK to me.
Did the TTGO do something as expected? Have you ever used this board before so you know what’s normal / good?
As @bluejedi says, you need to tell us a whole heap more information. Perhaps go back to the Random Nerd Tutorial to get the basics under you belt - I know the team there work extra hard on making sure all the information is there to get you started so go through it line by line.
Thank you both for the support. I do not find some useful resources in order to connect the board to TTN. Very few examples. I would be glad if you could recommend me some.
You choose an authentication mode ABP or OTAA, set an application & device, put the appropriate keys in to your sketch, et voila. There are tons on tutorials on this on this forum and on the internet. I’d suggest starting with this reading list:
Decoding the 9600 baudrate message with exception decoder:
PC: 0x400d19ae: **Arduino_LMIC::hal_init_with_pinmap(Arduino_LMIC::HalPinmap_t const*)** at C:\Users\USR\OneDrive\Documents\Arduino\libraries\arduino-lmic-3.3.0\src\hal\ **hal.cpp** line **53**
EXCVADDR: 0x00000000 *Decoding stack results* 0x400d19ae:
**Arduino_LMIC::hal_init_with_pinmap(Arduino_LMIC::HalPinmap_t const*)** at C:\Users\USR\OneDrive\Documents\Arduino\libraries\arduino-lmic-3.3.0\src\hal\ **hal.cpp** line **53**
0x400d1a11: **hal_init_ex(void const*)** at C:\Users\USR\OneDrive\Documents\Arduino\libraries\arduino-lmic-3.3.0\src\hal\ **hal.cpp** line **425**
0x400d3e1b: **os_init_ex** at C:\Users\USR\OneDrive\Documents\Arduino\libraries\arduino-lmic-3.3.0\src\lmic\ **oslmic.c** line **43**
0x400d3e32: **os_init** at C:\Users\USR\OneDrive\Documents\Arduino\libraries\arduino-lmic-3.3.0\src\lmic\ **oslmic.c** line **51**
0x400d10cd: **setup()** at C:\Users\USR\OneDrive\Documents\Arduino\Current_working_at/ **Current_working_at.ino** line **181**
0x400d59ab: **loopTask(void*)** at C:\Users\USR\OneDrive\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.4\cores\esp32\ **main.cpp** line **14**
0x40088215: **vPortTaskWrapper** at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/ **port.c** line **143**
The current settings in Arduino 1.8.13 IDE:
board: ttgo LoRa32 OLED-v1
upload speed: 921600
flash freq: 40Mhz
Core debug level: None
For me it looks like the call of os_init function generates the problem.
For T-Beam select T-Beam instead. Why haven’t you?
Already asked/advised before:
Start with some very basic Arduino example sketch (e.g. BareMinimum) and add a few lines of code to write a string to the Serial port. Did you manage to get this working properly?
What pin mappings have you configured for LMIC?
The power management chip needs to be initialized. Code is shown further up this thread (“Specific AXP192 code”). Have you added this to your example sketch(es)?
Yes, I did succeed to write on serial, and digital output on pins.
I didn’t know how to setup the pins, and therefore I choose one of the available boards thinking about
the compatibility between them. When I choose T-Beam I get “define your own pin mapping” and I don’t know how and where to do that.
I will try to do that and I will tell you the results afterwards. Thanks for the help!
I tried the code provided searching for “Specific AXP192 code”. In order to make it work I downloaded the library AXP202X v1.1.2 and imported into Arduino 1.8.13. The code compiles successfully and I can see on my screen the message "AXP192 Begin PASS".
On an empty project where I only print some chars in the console, I can’t see any difference.
On the otaa example, I get the same error on the 9600 Baudrade, with the only difference that the "AXP192 Begin PASS" message is present.
Even after checking the git for documentation I am not able to declare the lmic pin configuration for my board. In the first place I don’t know where to modify (in which file).