🤖Have you ever tried Chat.M5Stack.com before asking??😎

Subcategories

  • 53 Topics
    243 Posts
    greenleafG
    TL;DR: The factory certificate in slot 10 is in a compressed format that AWS IoT rejects. You need to generate a new properly-formatted certificate. Full working example here: https://github.com/scarolan/grafana-core2aws-iot The Problem Everyone Hits If you've tried to use the Core2 for AWS with its built-in ATECC608 secure element, you've probably hit this error when registering the certificate: CertificateValidationException: The certificate could not be parsed You're not crazy. The factory certificate in slot 10 is stored in Microchip's compressed format with: Empty issuer/subject fields Invalid dates (Aug 28, 2005) Missing X.509 structure AWS IoT's register-certificate-without-ca API rejects it outright. The Solution Generate a new properly-formatted certificate that still uses the locked private key in slot 0 (so you maintain hardware security): 1. Clone the Working Example git clone https://github.com/scarolan/grafana-core2aws-iot cd grafana-core2aws-iot/extras/generate_cert 2. Flash the Certificate Generator pio run -t upload --upload-port COM3 pio device monitor --port COM3 --baud 115200 3. Save the Certificate Copy the certificate output (including -----BEGIN CERTIFICATE----- lines) to a file. 4. Register with AWS IoT aws iot register-certificate-without-ca \ --certificate-pem file://device_new.pem \ --status ACTIVE \ --region us-east-1 Then attach your policy and thing as usual. 5. Use in Your Firmware Update secrets.h with the new certificate and you're done! Why This Works The certificate generator: Reads the public key from slot 0 (the private key never leaves the chip) Creates a proper X.509 certificate with valid dates and subject fields Signs it using the locked private key (signing happens inside the ATECC608) Returns a properly-formatted certificate AWS IoT accepts Hardware security is maintained - the private key in slot 0 is never exposed, it's just used differently. Complete Documentation I've documented the full solution with explanations of what's happening: ATECC608 Architecture - How the secure element works, slot configuration, lock mechanism Certificate Solution - Why the factory cert fails and how to fix it Full Working Example - Complete vibration monitoring IoT demo with AWS IoT Core + Timestream Why M5Stack Doesn't Document This The compressed certificate format is a Microchip design decision (saves space on the chip). It's meant to work with: Microchip's Trust Platform provisioning tools Their specific certificate reconstruction libraries Microchip-managed certificate authorities It was never designed to work directly with third-party services like AWS IoT without special handling. M5Stack provides a complex registration helper (registration_helper.py) that reconstructs the certificate with special manifest-based APIs, but it's 800+ lines of Python with tons of dependencies. The approach above is much simpler - just generate a new cert and register it normally. Tested and Working This solution is running in production on my demo device: MQTTS publishing to AWS IoT Core every 5 seconds Data flowing to Amazon Timestream Hardware-backed authentication with ATECC608 Zero issues with certificate validation Hope This Saves Someone's Week I fought with this for a week a couple years ago and gave up in frustration. Revisited it recently and finally cracked it. Hopefully this saves others the same pain! Questions/issues? Comment here or open an issue on GitHub. Repository: https://github.com/scarolan/grafana-core2aws-iot Hardware: M5Stack Core2 for AWS Libraries: ArduinoECCX08, ArduinoBearSSL, M5Unified Tested: PlatformIO, Arduino framework on ESP32
  • 89 Topics
    337 Posts
    ShawnHymelS
    @felmue That helps a lot, thank you!
  • 65 Topics
    228 Posts
    H
    Has anyone installed firmware and upon starting gets stuck in a menu selection loop where the highlight selection continues to scroll?
  • M5Stack's little brother. Discuss M5 Stick hardware and software related issues here

    403 Topics
    2k Posts
    M
    Does anyone's built-in IR receiver work?
  • 18 Topics
    71 Posts
    P
    I just got the M5GO Kit, and I'm trying to make a Voice Assistant. For some reasons, the Demo of the kit made me think that accessing the microphone is easy. But, after hours of finding, it seems that there is no library or support for the kit to record audio. Does anyone have any resource regarding this?
  • 27 Topics
    114 Posts
    M
    Problem: Der Schrittmotor funktioniert nur korrekt in der Z-Achse bei normalen (langsamen) Drehgeschwindigkeiten. Beim Versuch, die X- und Y-Achsen zu verwenden, funktioniert der Motor nur, wenn ich die Vorschubgeschwindigkeiten auf das 10-fache oder höher erhöhe. Wenn ich versuche, die Adresse auf 0x71 zu ändern, wird das Modul nicht erkannt.
  • 50 Topics
    133 Posts
    Y
    @samantha_martin Hola Samantha. El M5StickC Plus (SKU:K016-P) utiliza el chip ESP32-PICO-D4, que integra Bluetooth LE. Para reducir la latencia en la transmisión HID, puedes probar las siguientes acciones: Optimizar la frecuencia de envío de datos: En las librerías ESP32-BLE-Keyboard o BleGamepad, ajusta el intervalo de notificación BLE a un valor más bajo (por ejemplo, 10-20 ms). Algunas librerías permiten configurar esto al inicializar el dispositivo HID. Minimizar el código en el loop(): Asegúrate de que no haya delays innecesarios ni tareas bloqueantes (como impresiones Serial) que ralenticen la detección de botones y el envío de comandos. Configurar el modo BLE de bajo consumo: Aunque el ESP32-PICO-D4 es eficiente, verifica que no se encuentre en modos de suspensión prolongada. Asegúrate de que el dispositivo BLE esté configurado para enviar notificaciones inmediatamente al detectar una pulsación. Actualizar el firmware del ESP32: Usa la última versión del core ESP32 en Arduino IDE, ya que a menudo incluyen optimizaciones en el stack BLE. Verificar la configuración de Android: En el menú de configuración de Bluetooth de tu teléfono, desactiva opciones como "Ahorro de batería" para el dispositivo M5StickC Plus, ya que pueden restringir la frecuencia de actualizaciones HID. https://chat.m5stack.com/
  • For Topics related to the Core 2

    337 Topics
    1k Posts
    L
    If you're planning to use an external 1S LiPo with the M5Core2 through BUS pins 1 and 30, it's worth checking the board schematic first. The community confirmed that pin 30 is directly connected to VBAT, so an external battery with the same voltage can work. One important tip is to avoid connecting two rechargeable batteries in parallel without proper protection. Discussions like this are why I keep coming back to the M5Stack community, and even Laptop Giant enjoys following practical hardware insights like these.
  • M5stack basic core battery power on issue (ip5306 strange power management)

    28
    0 Votes
    28 Posts
    149k Views
    C
    @ckuehnel said in M5stack basic core battery power on issue (ip5306 strange power management): Here is a working code example: /* Test of IP5306 functions */ #include <M5Stack.h> void setup() { // initialize the M5Stack object M5.begin(); Wire.begin(); // required to access IP5306 M5.Lcd.fillScreen(BLACK); M5.Lcd.setCursor(0, 10); M5.Lcd.setTextColor(WHITE); M5.Lcd.setTextSize(2); M5.Lcd.printf("IP5306 Function Test\r\n"); if(!M5.Power.canControl()) { M5.Lcd.setTextColor(RED); M5.Lcd.printf("No communication with IP5306 chip"); while(1); } } void loop() { M5.Lcd.fillRect(0,180,360,60,0); uint8_t bat = M5.Power.getBatteryLevel(); M5.Lcd.setCursor(0,180); if (M5.Power.isCharging()) M5.Lcd.printf("Battery is charging\r\n"); else M5.Lcd.printf("Battery is not charging\r\n"); M5.Lcd.printf("Battery Level %d", bat); M5.Lcd.progressBar(0, 220, 360, 20, bat); delay(5000); } Hi, doesn't compile for me!!! this is the arduino IDE output: Arduino: 1.8.7 (Mac OS X), Board: "M5Stack-Core-ESP32, QIO, 80MHz, Default, 921600, None" Build options changed, rebuilding all /Users/AD/Documents/Arduino/libraries/M5Stack/src/utility/Power.cpp: In member function 'void POWER::powerOFF()': /Users/AD/Documents/Arduino/libraries/M5Stack/src/utility/Power.cpp:361:28: error: 'gpio_deep_sleep_hold_dis' was not declared in this scope gpio_deep_sleep_hold_dis(); ^ Multiple libraries were found for "SPI.h" Used: /Users/AD/Documents/Arduino/hardware/espressif/esp32/libraries/SPI Not used: /Users/AD/Documents/Arduino/libraries/SPI Multiple libraries were found for "SD.h" Used: /Users/AD/Documents/Arduino/hardware/espressif/esp32/libraries/SD Not used: /Users/AD/Documents/Arduino/libraries/SD Not used: /private/var/folders/f3/0kf10ljj6sj4q4twsw_vtxrw0000gn/T/AppTranslocation/395E70C5-F1F6-4076-AA11-9C132A2C6ACF/d/Arduino 1.8.7.app/Contents/Java/libraries/SD exit status 1 Error compiling for board M5Stack-Core-ESP32. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. tnks
  • Stack smashing protect failure!

    1
    0 Votes
    1 Posts
    6k Views
    No one has replied
  • M5Stack Basic Core w/ SIM800L Module

    1
    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • M5StickV category

    2
    0 Votes
    2 Posts
    5k Views
    lukasmaximusL
    Done http://forum.m5stack.com/category/33/m5stick-v
  • M5Stack Fire Pin Mapping

    1
    1
    0 Votes
    1 Posts
    7k Views
    No one has replied
  • Red LED below SD-slot of m5s-FIRE?

    4
    1
    0 Votes
    4 Posts
    10k Views
    grelmG
    Hi @heybin ! What do you want to show us with the picture: flickering due to problems with contacts? Do you know what the meaning is of: flashing? ( = 1s on > 1s off > 1s on > and so on: charging?) continiously OFF? continiously ON? What I noticed so far: a) USB charging cable connected to M5GO CHG Base and M5GO CHG Base attached to M5GO Base: LED is flashing and obviously charging b) M5GO disconnected from M5GO Base: LED = ON for 30 seconds , than OFF, but FIRE is still on and operational (Power from internal Lipo Battery?) c) M5GO CHG Base attached to M5GO Base, but no power on USB-Cable: same behaviour as item b) above. (Power from internal Lipo battery AND/OR CHG Base Battery?) For a) and b) so far, I didn't test, for how long the FIRE stays ON.
  • WIFI-Problem because of bended 3D-Antenna?

    7
    1
    0 Votes
    7 Posts
    15k Views
    ajb2k3A
    @grelm I'm glad I can help. Just needed to rule out the basics before blaming the hardware. Glad it turned out to be a bug in the software.
  • Disable start-up beep

    Moved
    17
    0 Votes
    17 Posts
    39k Views
    world101W
    @ipodlux If it's not connecting to the device, what errors do you see? Paste your command line output here and maybe I can help further. One other custom I did for ampy... I created the file ~/.ampy with these contents: # Example .ampy file # Please fill in your own port, baud rate, and delay AMPY_PORT=/dev/tty.SLAB_USBtoUART AMPY_BAUD=115200 # Fix for macOS users' "Could not enter raw repl"; try 2.0 and lower from there: #AMPY_DELAY=0.5 If you create that file, you will not have to pass the port and baud rate options when running the ampy command. This is the standard way to run ampy when you don't have the .ampy file created. world101$ ampy -p /dev/tty.SLAB_USBtoUART -b 115200 ls /flash Also, I was mistaken on the the v1.2.3 firmware with the beeps disabled by default. I just flashed one of my cores with the M5Burner and the beeps are there. I must have been running a custom firmware before.
  • [Solved]Disable battery

    Moved
    8
    0 Votes
    8 Posts
    20k Views
    D
    @m5-docs what about M5StickC? Is it possible to do the same? Do you have a diagram?
  • [Solved]How to use interruption processing in m5stack

    8
    0 Votes
    8 Posts
    23k Views
    m5-docsM
    Hello @tkb-koki, How about this example code? https://github.com/futureshocked/ESP32-For-Busy-People-1/blob/9ede724a862539ae18aad1500426ceb4415d5052/04-070_Interrupt_with_button_and_led/04-070_Interrupt_with_button_and_led.ino
  • [Solved]using built-in RTC on ArduinoIDE?

    Moved
    5
    0 Votes
    5 Posts
    12k Views
    K
    @akita11 said in [Solved]using built-in RTC on ArduinoIDE?: No, my question is NOT solved yet... ah ok sorry, i don't know this...
  • [Solved]Black screen error

    Moved
    17
    0 Votes
    17 Posts
    40k Views
    D
    I wasn’t using the reset button properly when uploading a sketch. I had the .....____....._____ error in Arduino IDE and black screen in M5Stack. Now problem is solved. Thank you for your help!
  • [Solved]Guru Meditation Error:

    9
    0 Votes
    9 Posts
    23k Views
    m5-docsM
    @ajb2k3 Thanks a lot ! @cepics "A custom ESP-WROOM-32 build without any flash chip added, so the existing GPIO6, GPIO7, GPIO8, GPIO9, GPIO10 and GPIO11 pins can be used to allow us to add a GD25Q127C (or similar) on our external circuit."
  • M5Stack with a moisture sensore, Arduino IDE

    Moved
    5
    0 Votes
    5 Posts
    11k Views
    ajb2k3A
    @kat @Rop you need to create and M5ez project, create a text place holder and set the code to replace the text with the values. Hopefully @Rop will pick up the notification and help you out. My knowledge is more towards Uiflow
  • Display PNG images?

    2
    0 Votes
    2 Posts
    7k Views
    ajb2k3A
    Currently there is no support for png images in the micropython port that form the firmware of the m5Stack range. BMP is its raw uncompressed state is a simple file to translate along with base level jpg (not JPEG!) Until such time that a codec exist for micropython, we are all stuck with converting graphics into base level formats.
  • Using seeed studio onewire thermocouple amp with m5 stack

    Moved
    4
    0 Votes
    4 Posts
    10k Views
    ajb2k3A
    @rob-biernat which M5Stack or Stick are you using? The M5Stacks and Sticks have an I2C grove port (port A) but this is also a digital I/O port in that it can read or write 0 or 1 values (on or off) I am currently triggering a relay unit from the port. The M5Go base has has 2 additional port which are multi I/O (port b) and UART (port C) Unlike Arduinos, the esp32 which powers the M5Stack has no set pin functions and all pins can be used for a range of functions. When using Port A Yellow is SCL (pin 22) and white is SDA (pin 21) and need to be defined. I have started to document the different functions of the grove connector and you can find them on pg 19 and 20 of my WIP book here https://github.com/Ajb2k3/UIFlowHandbook/blob/master/UIHB1404192.pdf
  • [Solved]IOTA over the m5stack

    Moved
    4
    0 Votes
    4 Posts
    8k Views
    m5-docsM
    @brij300 So sorry about that. We haven't tried to connect to AIOT website yet? But some guys make a project about opendimes. You can contact them. Thanks a lot. http://forum.m5stack.com/topic/859/m5verifier
  • [Solved]如何清除LCD上的内容

    Moved
    2
    0 Votes
    2 Posts
    8k Views
    m5-docsM
    @aoney M5.Lcd.fillScreen(BLACK);
  • Clash between BLE functions & Grove input on an m5stick?

    Moved
    2
    0 Votes
    2 Posts
    5k Views
    m5-docsM
    @dsiderov Using BLE will not affect GPIO13
  • Wifi with user name

    Moved
    7
    0 Votes
    7 Posts
    13k Views
    H
    @lukasmaximus Thanks Lukas. I had posted in another subject. The desktop ide does not allow me to create variable. I see the icon put does not open the pop up screen to name the variable.