馃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.
  • M5CoreInk: multi function button

    5
    0 Votes
    5 Posts
    9k Views
    felmueF
    Hello @sodoku that is actually not a bad idea. I'll keep that in mind. Thank you for suggesting it. Cheers Felix
  • CoreInk deepsleep

    7
    0 Votes
    7 Posts
    12k Views
    felmueF
    Hello @ckuehnel Without opening M5CoreInk you probably cannot measure battery voltage with a multimeter. However you can use GPIO35 to read the battery voltage. Check out float getBatVoltage() here. BTW: I've opened my M5CoreInk today and added some photos to my page (link below). Measuring power consumption in light sleep, deep sleep and shutdown will be next. Cheers Felix
  • Core Ink with UIFlow

    5
    0 Votes
    5 Posts
    9k Views
    ZontexZ
    UIFlow firmware 1.6.6.1 Seems to fix this issue, please take a look and let me know if you guys have any more concerns :)
  • Maximum serial speed limited to 500000 baud?

    2
    0 Votes
    2 Posts
    7k Views
    G
    I stumbled on this restriction again, and dug a bit deeper in the issue. It appears that the hardware is not limiting the baudrate, but the M5Stack library. More specifically, M5.begin(); Luckily, you can skip the UART init, and do it yourself like this: M5.begin(true,true,false); Serial.begin(2000000); Serial.flush(); And now it works for 2000000 baud.
  • Display on during deep sleep?

    Moved
    29
    0 Votes
    29 Posts
    120k Views
    felmueF
    Hello @AndyT hmm, strange, if anything I'd expected the M5Stack Gray to work with low brightness level and the M5Stack Black to not behave due to the fact that the M5Stack Gray has additional hardware (e.g. IMU) consuming power to keep the device powered on. That said, I suspect the IP5306 switching off due to too light load. Try to add the following statement before going into deep sleep. It should prevent the IP5306 from shutting down under light load. M5.Power.setPowerBoostKeepOn(true); Happy Stacking! Felix
  • moment power off

    3
    0 Votes
    3 Posts
    4k Views
    M
    @m5stack Understood. Thanks
  • Core2

    6
    0 Votes
    6 Posts
    18k Views
    RopR
    @sparkinman Check that: You have added the M5Core2 library and are doing #include <M5Core2.h> and not using M5Stack.h. Until they merge it my Pull Request and release a new version, my version is more like it will be, better documented and has graphical buttons. (Simply clone it or get the zip file and unpack so that M5Core2 is a subdir of your Arduino libraries dir.) In Arduino Preferences, you have added https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json as an "Additional Board Manager URL" Make sure you then select M5Stack-core2 from the "Tools / Board / M5Stack-Arduino" menu. If this is all good, then you should be able to run one of the examples from the "File / Examples / M5Core2" menu.
  • HPWR Pins

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • [Solved] Core2 Vibration Motor doesn't seem to work

    5
    0 Votes
    5 Posts
    11k Views
    felmueF
    Hello @veryalien Sorry to hear about your troubles. I looked into the factory test program today and got it to compile and running after enabling PSRAM, the above mentioned fix in SetLDOVoltage() and some cleanup of the old Wire vs Wire1 fight that seems to come back every now and then. I wished the developers could make up their mind and always use Wire for internal I2C devices. Oh well. The factory test code does something interesting regarding vibration motor voltage. During the startup sequence it is first set to 2 volts, then the motor is quickly turned on and off again and then later on it is set to 3.3 volts (not sure why though). When testing the vibration motor from within the settings menu the latter voltage is used. https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Core/M5Core2/Arduino/Core2_Factory_test Cheers Felix
  • Not Fully Solved: Core2 UIFlow touch clears display?

    1
    1 Votes
    1 Posts
    4k Views
    No one has replied
  • Snap in fixture?

    3
    0 Votes
    3 Posts
    6k Views
    ajb2k3A
    @efried said in Snap in fixture?: I can't find such in the webshop. https://www.thingiverse.com/thing:3133893 thanks This isn't an M5Stack product, that is a user created free to download addon that needs 3D Printing.
  • ATOM Lite

    2
    0 Votes
    2 Posts
    5k Views
    R
    To avoid possible conflicts with my app, I tested with Wifi Examples from ESP-IDF repo: https://github.com/espressif/esp-idf/blob/master/examples/wifi/getting_started/station/main/station_example_main.c Sorry for this missing point.
  • Unable to find documentation for Python in UIFlow

    9
    0 Votes
    9 Posts
    18k Views
    lukasmaximusL
    Hey, got a little sidetracked with some other projects. Hopefully will be closer to finishing by the end of the month.
  • External library

    core
    3
    0 Votes
    3 Posts
    8k Views
    S
    it's a library to control a sensor, I had already built my custom blocks that worked with that library, but when I updated everything I was unable to make it go. so do I have to import the library into the / flash root? and then?
  • 0 Votes
    3 Posts
    7k Views
    R
    Hi @m5stack you could pip install a pyserial module to solve it. I tried that but the problem persists. As a quick fix, I just flashed it using a window virtual machine. the LED always RED? which program are you use? Yes, but after I flashed the new firmware everything is behaving well. which program are you use? It turned RED, after I tried to flash it with the newer esptool (2.8) as I showed in my initial topic we will fix this bug in next version. 馃馃徎 Have a nice day
  • M5Stack not powering up

    4
    0 Votes
    4 Posts
    6k Views
    S
    @m5stack Ah Thank you! I used Easy Loader and updated the firmware! Your help is awesome! I can see the device working now.
  • Atom Matrix LED power clarification

    3
    1 Votes
    3 Posts
    5k Views
    P
    @robalstona excellent. Thank you for the clarification. It鈥檚 logical, and I agree that I don鈥檛 require anything higher, but I wanted to make sure for safety鈥檚 sake.
  • Atom Matrix hardware details, power input?

    2
    0 Votes
    2 Posts
    3k Views
    m5stackM
    @steve_j83 voltage input range 4.5~5.2V . for the time being don't open source the schematic. if you just want the know about the pin map you could check the sticker on it back site.
  • This topic is deleted!

    1
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Atom Lite - Serial Port access

    5
    1 Votes
    5 Posts
    17k Views
    P
    @reaper7 said in Atom Lite - Serial Port access: Serial1.begin(115200, SERIAL_8N1, 32, 26); Thanks. Tried that and causes a crash. I thinned out my code to bare min and this can replicate the crash (sorry not sure if this site has <code> tags. Crash details are further down, but it looks like an issue with the Nextion library. Challenge is this library works fine on other ESP32s. Only difference here is calling out Seria1 with the defined ports. Usually I have ESP32 boards where I can connect direct to UART1 pins, so no need to do pin mapping. #include <Nextion.h> //PRODUCTION: Use this when using the physical MCU + Nextion TFT LCD Hardware or MCU + Serial Window. #define nextion Serial1 boolean debug = true; //Be sure to set to false when done debugging!! Nextion myNextion(nextion, 115200); //create a Nextion object named myNextion using the nextion serial port @ 115200bps void setup() { Serial.begin(115200); //Standard Serial comms Serial1.begin(115200, SERIAL_8N1, 26, 32); //Comms to Nextion if (debug) {Serial.println(F("Connected. Processing loop..."));} } // END SETUP void loop(){} 000000 A10 : 0x1dd4848c A11 : 0x0000001c A12 : 0x3ffba49c A13 : 0x00000000 A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000001c EXCCAUSE: 0x0000001c EXCVADDR: 0x1dd4848c LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000 Backtrace: 0x40080f75:0x3ffb1ec0 0x400d1986:0x3ffb1ee0 0x400d1d45:0x3ffb1f00 0x400d0e22:0x3ffb1f40 0x400d0bb9:0x3ffb1f80 0x400d13ab:0x3ffb1fb0 0x40088215:0x3ffb1fd0 Rebooting... ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 188777542, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0018,len:4 load:0x3fff001c,len:1216 ho 0 tail 12 room 4 load:0x40078000,len:9720 ho 0 tail 12 room 4 load:0x40080400,len:6352 entry 0x400806b8 Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: PC : 0x40080f75 PS : 0x00060530 A0 : 0x800d1989 A1 : 0x3ffb1ec0 A2 : 0x00000020 A3 : 0x00000002 A4 : 0x00000000 A5 : 0x00000001 A6 : 0x00060520 A7 : 0x00000000 A8 : 0x3f405808 A9 : 0x00000000 A10 : 0x1dd4848c A11 : 0x0000001c A12 : 0x3ffba49c A13 : 0x00000000 A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000001c EXCCAUSE: 0x0000001c EXCVADDR: 0x1dd4848c LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000