bitbank2 / Thermal_Printer

Arduino library to draw text and graphics on BLE thermal printers
Apache License 2.0
350 stars 52 forks source link

Crash on M5stack-atom #47

Closed GianniAntini closed 1 year ago

GianniAntini commented 1 year ago

I have a MTP-II thermal printer, that is correctly found. When the istruction:

pRemoteService = pClient->getService(SERVICE_UUID0);

is executed i obtain a guru meditation error, with kernel panic:

Found a compatible device - MPT-II
Found a printer!, connecting...
 - Created client, connecting to dc:0d:51:bb:ad:34
Came back from connect
Guru Meditation Error: Core  0 panic'ed (Unhandled debug exception). 
Debug exception reason: Stack canary watchpoint triggered (BTU_TASK) 
Core  0 register dump:
PC      : 0x400955d7  PS      : 0x00060f36  A0      : 0x80094ecb  A1      : 0x3ffd2150  
A2      : 0x3ffbf648  A3      : 0xb33fffff  A4      : 0x0000abab  A5      : 0x0000cdcd  

Any idea?

bitbank2 commented 1 year ago

The only thing I can think of is that the Arduino ESP32 BLE support has gone through some changes recently. Can you try on an older+newer version of the Arduino support (e.g. 1.03 & 2.07)?

GianniAntini commented 1 year ago

A little update: I'm using platformio as IDE. Using:

lib_deps = bitbank2/Thermal Printer Library@^2.1.0

the printer is NOT recognized at all (in source code MPT-II in not present). With library code con github, a have the crash reported above...

bitbank2 commented 1 year ago

Sorry, I don't use platformio. I would appreciate if you can find the issues, but I cannot.