🤖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
    Y
    Root Cause Analysis A detailed schematic review revealed the source of the problem. All three components — Core2, Audio Module, and Bottom2 — are interconnected through the shared M5 BUS. The Bottom2 module includes a SPM1423 MEMS microphone, which uses: GPIO0 (BUS pin 24) for the clock signal (CLK) GPIO34 (BUS pin 26) for the data signal (DAT, digital output) The Audio Module, based on the ES8388 codec, uses: GPIO0 (BUS pin 24) for I2S_MCLK GPIO34 (BUS pin 26) for I2S_MAIN_DIN This creates a fundamental hardware conflict on the I2S bus. The Core Conflict Two independent devices attempt to drive the same data line: The ES8388 (M144 Audio Module) uses GPIO34 to send digitized audio data from its ADC (line-in or microphone) to the ESP32 via I2S. The SPM1423 (Bottom2) uses the same GPIO34 to output PDM audio data from its internal MEMS microphone. From the ESP32’s perspective: GPIO34 is input-only However, on the physical PCB traces, both devices are electrically connected to this same line and actively drive it. This results in a classic and severe bus contention scenario: Two outputs connected together No arbitration No isolation No possibility for coexistence Why This Cannot Be Solved in Software At first glance, one might consider disabling the microphone via software. Unfortunately, this is not feasible due to both architectural and hardware constraints. The Bottom2 doesn’t expose the SPM1423 MEMS dedicated enable/disable (chip select) pin. The only way to silence it — effectively forcing its data output into a high-impedance (Hi-Z) state — is to stop its clock signal on GPIO0. This leads directly to a deadlock: If the M144 switch is set to position A: GPIO0 is used as MCLK (mandatory master clock for ES8388 operation, typically 12.288 MHz) If the switch is set to position B: GPIO0 becomes I2S SCLK (bit clock) Additionally: The internal amplifier of the Core2 (NS4168) also uses GPIO0 for BCLK In other words, GPIO0 is always actively used in any valid configuration. Stopping the clock to disable the microphone would simultaneously break: the ES8388 codec or the Core2 internal audio path Thus, there is no viable way to control the microphone via software without disrupting essential system functionality. Design Oversight The A/B switch on the M144 Audio Module was clearly designed to avoid clock conflicts (MCLK vs SCLK) with other peripherals. However, the design completely overlooks the data line conflict on GPIO34. This is particularly problematic because: the Bottom2 module is an official M5Stack accessory the SPM1423 microphone is always active by default both modules are intended to be used within the same ecosystem Despite this, their coexistence leads to a non-functional configuration when using the ES8388 input path. Conclusion This issue is not a matter of configuration, firmware, or library incompatibility. It is a fundamental hardware design conflict on the shared M5 BUS. When Bottom2 is attached: the SPM1423 microphone continuously drives the I2S data line the ES8388 is unable to deliver valid audio data the result is severe noise and corrupted signal There is no reliable software workaround. The only effective solutions are hardware-level: physically removing or isolating the SPM1423 microphone redesigning the Bottom2 PCB to include a switch or gating mechanism routing the microphone control (e.g., SELECT or enable logic) to a dedicated GPIO Until such changes are implemented, the ES8388 input functionality cannot be used in conjunction with the Bottom2 module in a stable and predictable way. My solution was to remove the SPM1423 Microphone from the PCB. Another solution is to cut the relevant pins from the Bottom2 BUS with the same effect - removing SPM1423 from the circuit.
  • 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!
  • 0 Votes
    1 Posts
    4k Views
    No one has replied
  • Speaker Issues?

    Moved
    2
    0 Votes
    2 Posts
    5k Views
    m5-docsM
    Hello @slumnit It's normal. You can disable it using dacWrite(M5STACKFIRE_SPEAKER_PIN, 0); // make sure that the speaker is quite
  • How to get grove pin input?

    Moved
    13
    0 Votes
    13 Posts
    29k Views
    ajb2k3A
    Thanks for the photos and nice work there. Glad its all working for you now.
  • Can't get new M5 FIRE to setup

    Moved
    2
    0 Votes
    2 Posts
    5k Views
    ajb2k3A
    @mikey-wetzel Try reflashing the firmware. Try this guide. http://www.ajb2k3.co.uk/gettingstartedchapter.pdf
  • Hold digital pin state in sleep mode?

    Moved
    5
    0 Votes
    5 Posts
    11k Views
    ajb2k3A
    @m5er That is part of the problem, the ULP is not well documented and everyone is struggling with it
  • LCD doesn't work

    Moved
    3
    0 Votes
    3 Posts
    6k Views
    B
    @lukasmaximus I didn't had any errors during burning. The backlight is lit up. Since I bought a M5Gray also, I recognisize the sound on the Fire as the sound of the Rock-Paper-Siccors game which is the default app.
  • Uploading libraries to flow-m5stack?

    Moved
    9
    0 Votes
    9 Posts
    19k Views
    L
    world101 : I saw that you posted that thread, I will be checking it since I have a lot invested in blynk and in m5stack, and having both working together for me is a huge thing!
  • M5UI.Flow and Blynk?

    Moved
    5
    0 Votes
    5 Posts
    14k Views
    world101W
    Here you go... http://forum.m5stack.com/topic/575/blynk-on-m5stack-via-uiflow-and-block-maker
  • 0 Votes
    6 Posts
    19k Views
    lukasmaximusL
    I just thought, you were using the ui flow firmware previously right. I think there is an issue if you have flashed one of the micropython firmwares and try to use arduino afterwards without completely wiping the memory. Please try to use the erase tool in the M5 burner tool and then try and flash an arduino sketch again
  • Simulate button press?

    Moved
    5
    0 Votes
    5 Posts
    12k Views
    B
    Well, I have a couple of spots in my project that a button press would make things very easy. For example, I'm using M5ez for my interface, and use Blynk to display events on the M5 screen. I have backlight timeout set to 30 seconds. A new event doesn't turn the backlight back on, but a keypress does. So, in my if (newEvent) loop, I could have a M5.BtnA.press(), that would wake up the screen. Can I go into the M5ez library, figure out what happens after a real button press to wake the screen and replicate that? Yes, of course, and I have certainly tried that, but some of the items that need to be set are private, so calling them from a main loop is problematic. Rewriting that stuff so it's all public might work, but that solves one problem. I'd also like menus to time out - if there's no activity after going into a menu, I'd like it to time out and go back to the main menu. Again, code can certainly make that happen, but a M5.BtnA.press() would be a lot easier to implement... Does this make sense?
  • lcd.setRotation() Not enabled?

    Moved
    6
    0 Votes
    6 Posts
    16k Views
    lukasmaximusL
    Noted. The auto-complete still has a way to go
  • Go-Play on m5stack

    Moved
    5
    0 Votes
    5 Posts
    15k Views
    M
    +1 It would be great.
  • How to "double click"

    Moved
    4
    0 Votes
    4 Posts
    10k Views
    C
    @rop Hi, is it compatible with espnow?? tnks
  • [Solved]M5Stack Fire Microphone?

    Moved
    3
    0 Votes
    3 Posts
    11k Views
    B
    @lukasmaximus Thank you. Will try pin 34.
  • [Solved]如何显示中文?

    Moved
    3
    0 Votes
    3 Posts
    11k Views
    K
    The following article may be helpful. https://will-123456.blogspot.com/2017/04/low-power-wifi-weather-display.html https://github.com/will127534/AdafruitGFX-ChineseFont-Addon
  • [Solved]Unable to turn off when USB is Connected

    Moved
    4
    0 Votes
    4 Posts
    14k Views
    m5-docsM
    Hello You can put M5 to deep sleep using machine.deepsleep() similar to this. https://qiita.com/taka-murakami/items/0d2b4734b08516135d74 [image: 1542614938260-tim%E6%88%AA%E5%9B%BE20181119160843-resized.png]
  • MLX90640 and M5Fire/M5Stack

    Moved
    7
    0 Votes
    7 Posts
    17k Views
    S
    Hello, thank you for the good explanation.
  • M5Stack with Azure Cloud

    Moved
    2
    0 Votes
    2 Posts
    11k Views
    JJJ
    @vsthose This means the M5Stack is officially certified for use with Microsoft Azure cloud services. Below is a link to a video demo showing how to connect M5Stack to Azure using Mongoose OS. This video is targeted at Mac users but Mongoose OS can also be used on Windows or Linux. https://www.youtube.com/watch?v=znNirBAakzg Details on Mongoose OS: https://mongoose-os.com/ Details on Microsoft - Azure IoT Fundamentals: https://docs.microsoft.com/en-us/azure/iot-fundamentals/