🤖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

    335 Topics
    1k Posts
    easytargetE
    @skyflyer said in External 1S LIPO on M5Core2 BUS PIN1 and PIN30?: I tried to find information about it, and want to confirm that it is OK to connect the external Lipo battery to pins 1 and 30 on the "BUS expansion port"? And that the battery will be charged when connected to the external USB power? If you look at the schematic you will see that pin30 on the bus and VBAT (on the lipo connector) are the same. So yes, you can replace the internal battery with an external one with the same voltage! @skyflyer said in External 1S LIPO on M5Core2 BUS PIN1 and PIN30?: And I don't need to remove the internal 500mAh battery, since they would be connected in parallel anyhow? Do not simply put rechargeable batteries in parallel. Disconnect the internal one. You can have batteries in parallel but.. at a minimum you need some diodes to prevent them back-charging each other, have a look online where there is a lot of info about this.
  • M5Stack Basic Core w/ SIM800L Module

    1
    1
    0 Votes
    1 Posts
    4k 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
    14k 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
    37k 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
    19k 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
    22k 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
    38k 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
    22k 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
    6k 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
    7k 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
    12k 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.
  • A0 was not defined in this scope

    Moved
    2
    0 Votes
    2 Posts
    6k Views
    m5-docsM
    @joeybab3 It seems those libraries you used are designed for Arduino Chip which has been defined A0. So you need change those libraries sources so that they are compatible with ESP32 chip.
  • Rewrite firmware for M5Stack Faces

    Moved
    3
    0 Votes
    3 Posts
    7k Views
    A
    @ajb2k3 Thank you for the information! I have never tried the UI Flow Firmware. I will try it!