Now the next challenge, use esptool-js to upgrade core2 ota.
Do someone know if esptool-js support transfert for encrypted files?
Now the next challenge, use esptool-js to upgrade core2 ota.
Do someone know if esptool-js support transfert for encrypted files?
Also found this : https://www.motius.com/post/how-to-build-a-secure-iot-prototype-with-arduino-and-esp32
It seems esp-idf is only needed for the encryption part, the code can be written with arduino framework
I just found that M5unified support ESP-IDF : https://github.com/m5stack/M5Unified
@m5stack or @felmue can confirm we can use boot and flash encryption with M5unified ?
Did you found a solution? I am looking for the same feature.
As I understand we need to use ESP-IDF
I found this but not tested it for now : https://github.com/ropg/m5core2_esp-idf_demo
Hi,
What is the method to prevent code from being copied ?
I read that it is easy to reverse to code from the memory, so using esp32 flash encryption should prevent that. Right?
But then is it possible to upgrade the code ?
If I use a webpage with esptool-js and .bin files, then the users can upgrade, but can I provide encrypted only files, and not the originals .bin ?
Thanks
I've never had any problems with the DS18B20 sensor powered at 5V, with an external 4.7k resistor. Never any esp32 or even Raspberry Pi burnt out.
I did a few tests:
Works well with 4.7k external resistor
Also works well with internal resistor using pinMode(33, INPUT_PULLUP)
No errors (-127 or not detected) at all in all cases
I'll test soon with longer cables.
But, most important I use certified DS18B20, not bad quality copies that are good only for short distance.
Thank you @felmue
I will try on 3.3V, 5.1k seems good instead of 4.7k, but I use DS18B20 on long range (50m) and I am afraid 3.3V is not enough.
what happens if I connect 5V? do I risk destroying GPIO33 or the whole board?
I have to tell that after many tests over long periods of time, I've never burned out a GPIO using an external 4.7k resistor on the 5V, but may be it is possible while using internal pullup.
I can see that GPIO21/22 are 2.2k, may be it is better to have more current for long distance ?
Hi @m5stack
I can read here that Core1 have integrated pull-up resistors (3.3k) on G21 and G22
https://community.m5stack.com/topic/1762/solved-m5stack-basic-i2c-pull-up-resistor
Is it similar on Core2 ?
I use DS18B20 sensor with external pullup resistor 4.7k, but do I really need it ?
Can I have problems using internal pullup? (DS18B20 are powered on 5V pin) ?
Hi,
I have a project using DS18B20 temperature sensors and water flow meter.
My prototype is based on M5 core2 and is working fine.
Now I plan to commercialize a product based on that prototype.
I want the users to get a plug and play device, so I want to sell them the core + cables + sensors, easy to plug and start.
I think I do not need to produce a specific board to stack on core, because the sensors only needs a pullup resistor.
May be that resistor can be integrated into the sensors cable (on the connector) ?
What is your opinion on this point?
I was thinking of making a cable that plugs into the M5core1 (basic), on the side GPIO connectors. Because Core2 only have bottom connector.
Do you think it will be easy to mass-produce this type of cable in the future ?
Thanks for your help
@ajb2k3 Thanks, the question is about witch hardware is the best solution. Using a an existing module, using grove port, creating a custom module?
Could you provide the link to this vidéo?
Hi,
For my project based on Core2, I need to measure water temperature and flow-rate. Temperature sensors are up to 50m from core2.
The best solution is the simplest, without creating
Is there a "ready to use" solution, using I2C for example or wireless? I read that I2C is low distance only.
Another solution is using a module? Is there a simple module for core2 that expose all GPIO ?
Last solution, simply made a cable with all my sensors, connected under the code2 by removing the little window. But witch female connector to use with gpio port under the core2 ? do you have a ref?
Thanks
Hi,
I work on a data-logger project based on M5stack core 2. I need a professional developper (not beginner thanks) to improve and continue the project. You must have a hardware to test the existing code.
Please contact me if interested.
I found this code (first message) that is working fine for me on Core2 : https://community.platformio.org/t/m5stack-sd-card-firmware-update/20883/4
Hi,
Looking for SD updater too, did you find a solutions?
Hi @felmue
No, the example server works fine. You are right, it was probably an issue with csv reading.
Thank you
I have a simple code that draw data from a csv file on a webpage.
The server used is ESPasyncwebserver.
Loading this code on ESP32 alone is working fine, but when loading on M5core2, it crash every time I try to load the webpage...
Any idea where this problem comes from?
Here is the watchdog error :
ERROR: Too many messages queued
46;2;97
ERROR: Too many messages queued
47;92;71
ERROR: Too many messages queued
48;3;45
ERROR: Too many messages queued
49;13;6
E (15487) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (15487) task_wdt: - async_tcp (CPU 0/1)
E (15487) task_wdt: Tasks currently running:
E (15487) task_wdt: CPU 0: IDLE0
E (15487) task_wdt: CPU 1: loopTask
E (15487) task_wdt: Aborting.
abort() was called at PC 0x40148a20 on core 0
ELF file SHA256: 0000000000000000
Backtrace: 0x400886dc:0x3ffbfa30 0x40088959:0x3ffbfa50 0x40148a20:0x3ffbfa70 0x40086e6d:0x3ffbfa90 0x4017aecf:0x3ffbc280 0x4014a31b:0x3ffbc2a0 0x4008b119:0x3ffbc2c0 0x4008996a:0x3ffbc2e0
Hi,
Here is my platformio config:
[env:m5stack-core2]
platform = espressif32
board = m5stack-core2
framework = arduino
board_build.filesystem = littlefs
monitor_speed = 115200
lib_deps =
ottowinter/ESPAsyncWebServer-esphome@^2.1.0
m5stack/M5Core2@^0.1.0
lorol/LittleFS_esp32@^1.0.6
With that config, I cannot upload files in memory. it always save the file as spiffs.
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/m5stack-core2/spiffs.bin
esptool.py v3.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 84:cc:a8:5f:ea:08
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x00c90000 to 0x00ffffff...
Compressed 3604480 bytes to 155100...
Writing at 0x00c90000... (10 %)
Writing at 0x00ca61ce... (20 %)
Writing at 0x00cbe455... (30 %)
Writing at 0x00cd3e90... (40 %)
Writing at 0x00ce9a6c... (50 %)
Writing at 0x00cff565... (60 %)
Writing at 0x00d13a71... (70 %)
Writing at 0x00d2bf09... (80 %)
Writing at 0x00d4a5ce... (90 %)
Writing at 0x00d7257e... (100 %)
It upload succesfully but then fail to access the file from the server.
.pio/libdeps/m5stack-core2/LittleFS_esp32/src/lfs.c:1076:error: Corrupted dir pair at {0x0, 0x1}
E (6257) esp_littlefs: mount failed, (-84)
E (6261) esp_littlefs: Failed to initialize LittleFS
[E][LITTLEFS.cpp:90] begin(): Mounting LITTLEFS failed! Error: -1
Thank you very mcuh for the fast answer Felix!
You are right, got one relay working with GIPO19 and digitalWrite(19, HIGH)
But no succes with GPIO27, voltage does not change to 3.3V with digitalWrite(27, HIGH)... strange
There is only 2 free GPIO to use? because I have 2 relays to connect but also one line with DS18B20 sensors and another with a water flowmeter.
Hi,
I have an issue connecting relay to my Core2.
Here is my schematic:
Nothing happen when changing PIN21 state...
Is G21 the good PIN to use?
I tried G15 and G12 too, without succes using this command:
pinMode(12, OUTPUT);
digitalWrite(12, HIGH);
What am I doing wrong?
Which pins are available for my need, and what are the numbers to use in digitalWrite?
Thanks for your help
@lukasmaximus Same question here, but which module use to add an external wifi antenna. I need a longer range.