🤖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.
  • coremp135 memory size

    2
    0 Votes
    2 Posts
    1k Views
    felmueF
    Hello @mgrouch well, you might notice the lowercase b in Gb which means it's 4 Gigabit (not 4 GigaByte). 1 byte equals 8 bits. So you'll need to divide the number by 8 if you want to convert Gigabit to GigaByte. 4'000 Mb / 8 = 500 MB So about 462 MB (MegaByte) free seems plausible. Thanks Felix
  • m5 x timer camera battery

    1
    0 Votes
    1 Posts
    962 Views
    No one has replied
  • M5CoreS3 rebooting issue with PSRAM

    3
    0 Votes
    3 Posts
    2k Views
    M
    I can share a few thoughts on your PSRAM issue: Have you tried using an older version of the M5CoreS3 library? Sometimes newer versions can introduce compatibility issues. Double-check your board settings in the Arduino IDE. Make sure you've selected the correct board and PSRAM option. Try increasing the PSRAM size in your sketch if you're using a lot of memory. If possible, test with a different M5CoreS3 unit to rule out hardware issues. Consider posting your code snippet if the issue persists. Sometimes the problem can be in how the PSRAM is being accessed in the sketch. Keep in mind that PSRAM errors can be tricky to debug.
  • Poweroff command is Fail on M5CoreMP135.

    4
    1
    0 Votes
    4 Posts
    3k Views
    N
    This issue has been resolved in the latest version, see issue.
  • CoreS3 touch with Arduino

    4
    0 Votes
    4 Posts
    3k Views
    felmueF
    Hello @Fusion-Automate have you tried any of the official M5CoreS3 examples? Do any of them work? Edit: It looks like M5Stack moved M5CoreS3 to use M5Unified library - I've adapted my touch example. Thank you for reporting. Thanks Felix
  • Port.C of boot serial console is IO inverted on CoreMP135.

    5
    1
    0 Votes
    5 Posts
    3k Views
    N
    This discussion will be continued below https://github.com/m5stack/CoreMP135_buildroot-external-st/issues/2
  • Can't push software to CoreInk

    3
    0 Votes
    3 Posts
    1k Views
    H
    @ajb2k3 Thanks, I got that now. I figured out, that I have selected the wrong server. Still my program is not showing anywhere.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    277 Views
    No one has replied
  • M5paper touchscreen wakeup from sleep

    11
    0 Votes
    11 Posts
    18k Views
    A
    Thank you, all clear now, so M5.shutdown(600) will run again the entire setup. Great! Now M5.shutdown(600) it is run actually every 9 minutes and M5.shutdown(3600*11) every 2 and almost a half hour, not 11 hours. In order to avoid charging problems I use: if (voltage<4150) { M5.shutdown(shutdownDuration); } otherwise it restarts every 5 seconds when charging. Is there any other solution when charging? The battery only charges to max 4100 and is dead at 3410: just bought a new M5Paper a week ago. float voltage = M5.getBatteryVoltage();
  • Running Linux on Core3 S3 - how to enable WiFi

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • M5paper power consumption in light sleep

    8
    0 Votes
    8 Posts
    14k Views
    A
    @volker 6 days on deep.sleep. How about light.sleep? I just bought mine, any advice? I only want to display a picture via internet..
  • Simple fix when upload fails.

    Moved
    49
    1
    3 Votes
    49 Posts
    359k Views
    M
    For the M5FIre do this For the m5stack fire you need to follow these steps Remove all modules, leaving only the host Then try to lower the baud rate when burning If there are wires, you can short-circuit G0-GND before powering on the device and then power on again.! [image: 1711007726474-432299571_430472252787300_1867478767739245481_n-resized.jpg]
  • Core S3 - "Leaving... Hard resetting via RTS pin..."

    2
    0 Votes
    2 Posts
    2k Views
    teastainT
    @maysun "Leaving... Hard resetting via RTS pin..." is Arduino IDE's awkward way of saying that the upload was successful \o/. After this message is there any image on the LCD? You might try a simple program with just a serial message, to test if it is working, but there is a LCD driver issue. //words preceded by "//"" are comments and are not executed bool ticktock; //declare ticktock as a boolean flag void setup() { //runs once on start up Serial.begin(115200); //open the serial port for USB cable delay(500); } void loop() { //runs in circles! ticktock = !ticktock; //every pass through reverse the flag if (ticktock) { //test current value of the ticktock flag Serial.println("tick"); } else { //prints one or the other to the USB port Serial.println("tock"); } delay(1000); //wait for a second and run again! }
  • CoreS3 - MIDI

    2
    0 Votes
    2 Posts
    2k Views
    No one has replied
  • SD card on M5 capsule - how to make it work ?

    5
    0 Votes
    5 Posts
    3k Views
    L
    specific pins are available here : https://github.com/m5stack/M5Unified
  • Help a newbie choose a core

    4
    0 Votes
    4 Posts
    3k Views
    robskiR
    @medicollector good one, didn't know they do DB9 extension. Core has good size battery but all depends on your project needs really, You can always try external battery for it like powerbank or something
  • M5capsule UIflow 2 neopixel

    2
    0 Votes
    2 Posts
    3k Views
    ajb2k3A
    If you understand Micropython then the RGB functions are available, but untill M5Stack add the RGB strip unit into UIFlow2 there is no function
  • AirQ STL?

    2
    1 Votes
    2 Posts
    2k Views
    ajb2k3A
    @m5stack any answer here?
  • AirQ JSON Data Formatting

    2
    0 Votes
    2 Posts
    2k Views
    ajb2k3A
    @jonny5alive Yes there is, You add the data to a Map and place the map in the convert to JSON function. Map formats it into name and value pairs.
  • Connect COM.LTE to CoreS3?

    12
    0 Votes
    12 Posts
    11k Views
    C
    Got a bit further in the quest. I added the following:- void setup() { // Set console baud rate SerialMon.begin(115200); delay(10); SerialAT.begin(115200, SERIAL_8N1, 18, 17, false); delay(3000); modem.restart(); and got some responses 23:06:21.706 -> [14189] Wait... 23:06:27.695 -> [20189] Trying baud rate 115200 ... 23:06:30.064 -> [22535] Modem responded at rate 115200 23:06:30.064 -> [22535] Initializing modem... 23:06:35.068 -> [27555] ### TinyGSM Version: 0.11.7 23:06:35.068 -> [27555] ### TinyGSM Compiled Module: TinyGsmClientSIM7600 23:06:45.272 -> [37756] Failed to restart modem, delaying 10s and retrying 23:06:45.272 -> [37756] Initializing modem... 23:06:55.486 -> [47957] Failed to restart modem, delaying 10s and retrying 23:06:55.486 -> [47957] Initializing modem... 23:07:03.779 -> [56269] ### TinyGSM Version: 0.11.7 23:07:03.779 -> [56269] ### TinyGSM Compiled Module: TinyGsmClientSIM7600 23:07:03.843 -> [56316] ### Modem: SIMCOM SIM7600G-H 23:07:03.843 -> [56316] ### Modem: SIMCOM SIM7600G-H 23:07:03.877 -> [56369] ### Modem: SIMCOM SIM7600G-H 23:07:03.877 -> [56369] Modem Name: SIMCOM SIM7600G-H 23:07:03.910 -> [56397] Modem Info: Manufacturer: SIMCOM INCORPORATED Model: SIMCOM_SIM7600G-H Revision: SIM7600G_V2.0.2 IMEI: "redacted" +GCAP: +CGSM 23:07:03.910 -> [56397] Waiting for network... 23:07:03.975 -> [56440] Network connected 23:07:03.975 -> [56440] Connecting to vsh.pp.ua 23:07:04.008 -> [56482] ... failed 23:07:04.008 -> [56482] Requesting current network time 23:07:04.008 -> [56484] Couldn't get network time, retrying in 15s. 23:07:18.986 -> [71484] Requesting current network time 23:07:19.025 -> [71486] Year: 2024 Month: 1 Day: 26 23:07:19.025 -> [71486] Hour: 23 Minute: 7 Second: 3 23:07:19.025 -> [71486] Timezone: 11.00 23:07:19.025 -> [71487] Retrieving time again as a string 23:07:19.025 -> [71506] Current Network Time: 24/01/26,23:07:18+44 23:07:19.185 -> [71672] Battery charge state: 0 23:07:19.185 -> [71672] Battery charge 'percent': 0 23:07:19.185 -> [71672] Battery voltage: 3.80 23:07:19.219 -> [71691] Chip temperature: 37.00 23:07:19.219 -> [71691] End of tests.