🤖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.
  • M5Paper and API Key

    5
    0 Votes
    5 Posts
    7k Views
    ajb2k3A
    @world101 said in M5Paper and API Key: @ajb2k3 Actually, most of the time when I flash new firmware with M5Burner, it does assign a new API key to my device. Maybe that is because I always erase the flash before burning the firmware. I just tried it and it gave me a new API key. @k33g give it a try. The Erase button is in the upper right corner of M5Burner. Then burn the latest M5Paper firmware. I thought i was supposed to but for me, lately, it looked to always generate the same api.
  • UpdateArea

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • 10 min battery life

    11
    0 Votes
    11 Posts
    20k Views
    felmueF
    Hi @fonix232 thank you for the clarification. Yes, being able to wake up the system from shutdown mode via touch would be nice (like it is already possible using an RTC timer or alarm). Thanks Felix
  • M5Paper and images drawing

    9
    0 Votes
    9 Posts
    19k Views
    TitiMobyT
    As the weather looks really rainy this week end, I'll have plenty things to try. Thanks all, I'll keep posted my progress.
  • 0 Votes
    9 Posts
    17k Views
    Z
    This might be helpful for you too. [image: 1611944215503-1a8403ea-250e-4876-9a23-11bb14c2a5f2-image-resized.png]
  • M5Paper SD Card Issues

    15
    0 Votes
    15 Posts
    36k Views
    felmueF
    Hi guys I've found that the SD card only seems to be read when it already is inserted when M5Paper is booted / reseted. Or in other words, if M5Paper already is running when I insert the SD card it is not read and going to the Factory Test Test screen returns an SD card failed. On the other hand when the SD card has been recognised and I remove it and then go to the Factory Test Test screen the SD card still passes the test. Which leads me to my question. In the M5Paper schematic the SD card detect line is connected to GPIO34 and I already verified that reading GPIO34 actually reflects whether an SD card has been inserted or not. Has anyone already tried to use this information? Thanks Felix
  • M5Paper Speaker

    11
    0 Votes
    11 Posts
    19k Views
    K
    @world101 Thanks for your reply. For the project I have in mind, I just only need beeps, but if I'm going to hack around, I'll try to attach a speaker since it would allow me to do many other things. For programming I'd go with Arduino.
  • 0 Votes
    3 Posts
    7k Views
    P
    @lukasmaximus Thanks Lukas, The problem was loading the font from the internal file system. After delete all these, and place Serial.begin in the right orde loading of the fonts was no problem. Even my DSEG7Classic-Regular.ttf was loaded correct, and display correct. Converted it with the python file ttf2bin.py was also a succes in use. One question remains. The command "createRender(168, 256)" is used for drawing bigger text, but are there limitations? In my case when I put a larger value as 168 the screen still blanks, notting happens, but no error message shows up. The documentation is a bit fuzzy. Please can you explane this command.
  • M5CoreInk RTC Clock Example

    2
    2 Votes
    2 Posts
    6k Views
    felmueF
    Hi guys Power consumption update: even though the example keeps the M5CoreInk in shutdown mode (everything off except for the RTC) most of the time and only powers up for about 2 seconds every minute to do the update, the built in battery only last for about one week. Thanks Felix
  • IP5306 charging current is 6 times greater than C/10

    3
    1
    0 Votes
    3 Posts
    8k Views
    world101W
    I saved a copy of the IP5306_I2C data sheet from a long time ago. In this table, I see the charge current can be set by the CHG_DIG_CTL0 register (see the formula). I would assume the M5stack designers took care of setting the max charge current with that register bits 0 through 4, though I could be wrong. [image: 1610043250819-screen-shot-2021-01-06-at-12.36.51-pm-resized.png] If you want the entire data sheet, let me know.
  • Core2 Module and extension board stacking?

    20
    0 Votes
    20 Posts
    37k Views
    L
    @m5stack Thanks to take it into consideration. I received my Core2 today. Trying to plug the PLC circuit after removing the bottom seems difficult. On the left side there is a metallic thing (motor?) that push the circuit, and pin headers are really short. About headers, you sell SMT mount connector in your shop but I think they are 2.5mm long (like the old modules one's)? right? on the micro-module they are 3.5mm (total height 5.84). For makers like me, if we want to build modules prototype, where can we find compatible trough hole or SMT connectors? I search and found nothing? any ref?
  • M5Paper Image conversion

    3
    0 Votes
    3 Posts
    6k Views
    B
    Thank you for your reply. Yes, I did stumble upon the bin2code.py script you mention. The issue is that it doesn't convert the image to raw pixel data (usable by M5EPD_Driver::WriteFullGram4bpp). After a bit more research, I found a preliminary command using ImageMagik to convert an image to raw pixel data for the M5EPD: convert input.png -depth 4 -negate output.gray Then convert the raw data to C with bin2code.py : ./bin2code.py output.gray The result can then be appended to ImageResource.h
  • How to Get M5Stack Basic API Key

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • M5Paper error message

    5
    0 Votes
    5 Posts
    9k Views
    Z
    @Powersoft Hello, after contacting M5Stack support the problem is probably the flash chip, M5Stack is replacing my M5Paper. I had performed this upload test at slow speed but without improvement. Thanks for your help
  • Several issues with your new M5Paper

    10
    0 Votes
    10 Posts
    17k Views
    P
    @powersoft Found the bin file, under the M5 Burnet
  • M5Paper Availability?

    5
    0 Votes
    5 Posts
    9k Views
    E
    @sodoku Thanks. I just got an email that the M5's are back in stock... Digikey still showing backordered though. Guess i'll have to order from M5 directly.
  • M5Paper Light on?

    3
    0 Votes
    3 Posts
    7k Views
    W
    Thanks for the info
  • M5Paper schematic

    7
    0 Votes
    7 Posts
    17k Views
    ZontexZ
    @loboris will push the request forward :)
  • Suggestion for ESP32 PSRAM Timer Camera Fisheye (OV3660)

    1
    1 Votes
    1 Posts
    3k Views
    No one has replied
  • M5Stack Gray Dev Kit 1.0 with Mac Catalina

    2
    0 Votes
    2 Posts
    3k Views
    ZontexZ
    Hello, could you try to install FTDI drivers as well to see if it can solve the issue for you?