TTGO T-Beam topic

Why do this?

Looking at the detail scattered else where, perhaps you could try stable releases: - aka not an hourly build

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.

1 Like

My advise was to get the basics working first.
Basics also means to use stable versions and default settings.

To be clear: with my above “latest versions” I meant latest stable versions.

1 Like

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!

1 Like

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.

1 Like

Just the standard Arduino example should work.

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.

1 Like

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:

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
mode:DIO, clock div:1
entry 0x400806ac

TTGO LoRa32 - Oled V1 - is the board selected
There is the default blink a led example for arduino (not something esp specific)

1 Like

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.

1 Like

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.

1 Like

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.

1 Like

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:
The devices section of:
The gateways section of:
The network section of:
The applications and API sections of:

1 Like

It looks like the download log so not something that would appear “in a forever loop”. Did you setup the OTAA keys?

Please DO NOT edit a post so radically again, it makes nonsense of the following posts from people trying to help you.

1 Like

Yes, I did setup the APPEUI and DEVEUI keys in lsb order and the APPKEY in msb order

1 Like

So you do have the information for connecting to TTN. Jolly good.

And the serial console output for the TTGO? Is it joining? What appears on the gateway log and in the device console?

1 Like

@descartes, In the gateway log I don’t see the device (not visible). It is not joining.

I tried to use the lmic v3.3 library, with the ttn-otaa example. The code successfully uploads to the board but I got the endless loop:

On 9600 baudrate:

Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400d19a8: ffffffff ffffffff ffffffff
Core 1 register dump:
PC      : 0x400d19ae  PS      : 0x00060130  A0      : 0x800d1a14  A1      : 0x3ffb1f00  
A2      : 0x3ffc0170  A3      : 0x000000ff  A4      : 0x3f4010fc  A5      : 0x00000403  
A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x800d198f  A9      : 0x3ffb1ee0  
A10     : 0x000000ff  A11     : 0x00000000  A12     : 0x00000002  A13     : 0x0000ff00  
A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x0000001a  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  

Backtrace: 0x400d19ae:0x3ffb1f00 0x400d1a11:0x3ffb1f20 0x400d3e1b:0x3ffb1f40 0x400d3e32:0x3ffb1f60 0x400d10cd:0x3ffb1f80 0x400d59ab:0x3ffb1fb0 0x40088215:0x3ffb1fd0

On 115200 baudrate:

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
mode:DIO, clock div:2
entry 0x400806ac

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.

1 Like

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)?

1 Like
  • 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!
1 Like

It’s in the MCCI LMIC instructions …

1 Like

Yes, thanks! Found it here.

1 Like

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.

AXP192 Begin PASS
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400d10bc: 0203a200 00000000 ff7f0000
Core 1 register dump:
PC      : 0x400d10c0  PS      : 0x00060130  A0      : 0x800d1114  A1      : 0x3ffb1f00  
A2      : 0x3ffc01bc  A3      : 0x3f4010d0  A4      : 0x00000001  A5      : 0x00000001  
A6      : 0x00060320  A7      : 0x00000000  A8      : 0x3f4010d0  A9      : 0x3ffb1ee0  
A10     : 0x00000005  A11     : 0x00000000  A12     : 0x3ffc0350  A13     : 0x00000001  
A14     : 0x00000001  A15     : 0x3ffb1eec  SAR     : 0x0000001a  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0x00000000  

Backtrace: 0x400d10c0:0x3ffb1f00 0x400d1111:0x3ffb1f20 0x400d1143:0x3ffb1f40 0x400d115a:0x3ffb1f60 0x400d0d1f:0x3ffb1f80 0x400d354b:0x3ffb1fb0 0x400889d9:0x3ffb1fd0

What pin mappings have you configured for LMIC?

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).

1 Like

It was further down in the configuration section you linked to:

1 Like