🤖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 V2.7: can't install library M5Stack

    5
    0 Votes
    5 Posts
    6k Views
    M
    @teastain Hi Terry, et al thx 1M for your effort helping me! I've just found the work around: As per "M5Stack Library won't install on Arduino IDE", CitrusPeel identified the issue: The package's name "MODULE_GRBL13.2" in library.properties should be "MODULE_GRBL_13.2" (underline instead of space before 13.2). So download M5Stack unzip it edit file "library.properties", line to "depends=M5Family,M5Module-4Relay,MODULE_GRBL_13.2,M5_BMM150" zip it and install zipped library restart IDE update now performed flawless @m5stack: awaiting M5Stack (0.4.6) to be released soon, as not all users having the knowledge on how to apply this "patch". Cheers, Marcus
  • Core Ink: recognize if USB or battery powered

    5
    0 Votes
    5 Posts
    5k Views
    I
    @davincino Thanks for posting your findings.
  • How recognize if CoreInk runs on battery?

    4
    0 Votes
    4 Posts
    8k Views
    D
    This topic is old, but I will reply if it is found through search functions: I found a solution, what can be applied with small external hardware modifications. It is possible to take some measurements on HAT interface's pin "5VIN". Measured voltages: If powered by USB: ~4.7V Powered by battery and switched off: ~0.7V Powered by battery and switched on: ~2.4V Using voltage divider with two same resistors, we get usable logic values for HIGH and LOW ( ~2.3V and ~1.2V). The measured values are not inside garanteed logic range but as a workaround: it works well. Maybe it helps someone else...
  • M5Stack Tough product lifetime

    3
    0 Votes
    3 Posts
    3k Views
    ajb2k3A
    You would be better off directly contacting M5Stack about this but as the tough is a core2 and core2 is still being added to UIFlow, I wouldn't think it would be EOL that soon.
  • M5Paper wakeup cause

    13
    0 Votes
    13 Posts
    27k Views
    D
    To make this detection really reliable I had to change the RTC register check like this: Wire.begin(21, 22); uint8_t reason = M5.RTC.readReg(0x01); // now it's safe M5.begin(); // check reboot reason flag: TIE (timer int enable) && TF (timer flag active) if ((reason & 0b0000101) == 0b0000101) { restartByRTC = true; Serial.println("Reboot by RTC"); } else { restartByRTC = false; Serial.println("Reboot by power button / USB"); }
  • M5Paper Factory Software?

    6
    1 Votes
    6 Posts
    6k Views
    ajb2k3A
    Did you click on the "Erase" button in M5Burner before burning the correct M5Paper firmware?
  • UIflow power functions Core INK

    13
    0 Votes
    13 Posts
    14k Views
    Y
    @cognitive5525 Thank you for your insight and investigation. I was facing same situation after my m5stack core2 lost its battery at all. Then I almost gave up development with m5stack since I'm not familiar to this ecosystem but it started restart again after your i2c cord had been tried. Thank you so much again!!
  • I2S GPIO pins?

    4
    0 Votes
    4 Posts
    4k Views
    M
    @zalaking The schematic shows the following I2S pins on the CoreS3: GPIO00 I2S_LRCK, (Mic MCLK) GPIO13 I2S_DOUT/DAT0 GPIO14 I2S_DIN/DAT1 GPIO33 I2S_WCK (Mic) GPIO34 I2S_BCK (Mic)
  • how to make an image clickable with uiflow 2.0 on coreS3?

    1
    3 Votes
    1 Posts
    2k Views
    No one has replied
  • why image+ is not showing on coreS3?

    3
    0 Votes
    3 Posts
    3k Views
    S
    @ajb2k3 I'm getting the image from images section in google
  • How to scan nearby devices via bluetooth with core S3 ?

    2
    0 Votes
    2 Posts
    3k Views
    B
    So, to scan nearby devices via Bluetooth with Core S3, you gotta go to the settings and click on the Bluetooth option. Once you're there, just tap on the "Scan" button, and your Core S3 will do its thing and find all the devices chilling nearby.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    54 Views
    No one has replied
  • CoreS3 internal battery?

    4
    0 Votes
    4 Posts
    4k Views
    N
    I also faced this problem. In my case, battery was fine, but connector was bad. Please check battery and pcb voltage.
  • M5Paper suggestion for multiple serial capture

    7
    0 Votes
    7 Posts
    7k Views
    M
    @holofloh I thought about it. The devices are not always that near near each other. Having them isolated is a bonus, also. I am trying with my Atom S3 (not the lite) because I think I blew up my s3-lite. UIFLOW2 has some bugs in the existing BLE code, on the AtomS3 - basic things like 'there is no "is_connected"...' Im not sure if there is enough implemented in UIFlow2 yet for actual BLE use with an Atom S3
  • stampS3 capacitive touch detect : GPIO#3 NOT working??

    5
    0 Votes
    5 Posts
    4k Views
    S
    @felmue thanks! I will change my PCB design not to use GPIO#3 for capacitive touch detect.
  • Core S3 Micropython

    6
    0 Votes
    6 Posts
    7k Views
    ajb2k3A
    Arduino isn't the only way to program it. You can program it using UIFlow2.xAlpha or any IED that supports micropython.
  • M5Tough external power button

    2
    0 Votes
    2 Posts
    2k Views
    felmueF
    Hello @dichi if I needed a external power button for the M5Tough I'd solder a thin wire to GND and another to the existing power button; then connect the two wires to the external power button. [image: 1686774453121-m5toughpowerbutton_20230614.png] Optionally you could drill a hole into the base where the existing power button is. (You'd loose some water proofing I guess.) Thanks Felix
  • This topic is deleted!

    Locked
    2
    0 Votes
    2 Posts
    58 Views
  • M5 Stack Core2/Tough tempered glass screen protector

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    2 Posts
    3k Views
    ajb2k3A
    You need to erase the firmware first before burning. Please don’t double post