@ajb2k3 The factory source is not at the GitHub link " https://github.com/m5stack/M5CoreS3" or I didn't found it. I found their only utilities and little (!) examples, but not the whole "factorytest.ino"
sheepDog
@sheepDog
Posts made by sheepDog
-
RE: M5Core3 Factory Test
-
RE: M5Core3 Factory Test
@ajb2k3 I'm not looking for UIFlow 1 or 2, but "only" the one example that is also installed on the M5Core3. I am aware that a new product needs some time to create the documentation and software.
-
RE: M5Core3 Factory Test
@ajb2k3 I know this standard resource. I found their only utilities and little (!) examples, but not the whole "factorytest.ino"
-
M5Core3 Factory Test
Hello, where can I find the factory test program for the New M5Core3? I am very interested in the cam Part of the software.
-
RE: WebPage Display
Hello,
after three years is it possible to show a static WebPage on the M5Stack/M5Core2?
Anyone has an idea? -
M5Core2 and SD-Card stack challenge
Hello,
I used ESP-IDF v4.4-beta1, Arduino 2.0.2 for and M5Core2-Library ("0.1.0" = newest version, I also checked 0.0.3). The Arduino libraries I got from "https://github.com/espressif/arduino-esp32.git" and the M5Core2 Library I loaded from "https://github.com/m5stack/M5Core2.git".
I can initialize the M5Core2, write text on the screen and connect to wifi. If I activated the SD-Card I got an error: "A stack overflow in task main has been detected."
I looked for the cause and it are these calls:
bool SD_Enabler = true; M5.begin(true, SD_Enabler, true, false, kMBusModeInput); -> SD.begin(TFCARD_CS_PIN, SPI, 40000000); -> if(!sdcard_mount(_pdrv, mountpoint, max_files, format_if_empty)){ -> FRESULT res = f_mount(fs, drv, 1);
The reason for the stack challenge is f_mount.
There are only two parameters for this function:FATFS* fs; char drv[3] = {(char)('0' + pdrv), ':', 0};
The value for drv is "0:" and seemed okay. The parameter fs was initialled some lines one before without an error:
esp_err_t err = esp_vfs_fat_register(path, drv, max_files, &fs); if (err == ESP_ERR_INVALID_STATE) { log_e("esp_vfs_fat_register failed 0x(%x): SD is registered.", err); return false; } else if (err != ESP_OK) { log_e("esp_vfs_fat_register failed 0x(%x)", err); return false; }
I didn't know what happened. Have anyone a good idea?
-
RE: Core2, W5500 and ESP-IDF example eth2ap
Hello Felix,
thank you for your quick answer. I can ping sometimes and I cann't surf the Internet with my phone or with my computer and eth2ap-modul.
-
I have changed the channel the softAP is using. Small changes in quality can be seen, but no significant improvement.
-
I tried a different wireless client, for example my computer and my phone.
-
I used a 12V/3A power adapter on LAN-Module with W5500. The M5Core2 and the LAN module also run stably with other applications and the same power supply.
Bye,
Uwe -
-
Core2, W5500 and ESP-IDF example eth2ap
Hello,
I like to use a Core2 as Wifi-AP for some small sensors. My starting point was the eth2ap example from ESP-IDF v4.3.2. I added some outputs to the example to see was going on. I changed FLOW_CONTROL_QUEUE_TIMEOUT_MS to 500:
#define FLOW_CONTROL_QUEUE_TIMEOUT_MS (5*100) #define FLOW_CONTROL_QUEUE_LENGTH (40) #define FLOW_CONTROL_WIFI_SEND_TIMEOUT_MS (100) typedef struct { void *packet; uint16_t length; } flow_control_msg_t; // Forward packets from Wi-Fi to Ethernet static esp_err_t pkt_wifi2eth(void *buffer, uint16_t len, void *eb) { if (s_ethernet_is_connected) { if (esp_eth_transmit(s_eth_handle, buffer, len) != ESP_OK) { ESP_LOGE(TAG, "Wifi->ETH: Ethernet send packet failed"); } } esp_wifi_internal_free_rx_buffer(eb); return ESP_OK; } // Forward packets from Ethernet to Wi-Fi // Note that, Ethernet works faster than Wi-Fi on ESP32, // so we need to add an extra queue to balance their speed difference. static esp_err_t pkt_eth2wifi(esp_eth_handle_t eth_handle, uint8_t *buffer, uint32_t len, void *priv) { esp_err_t ret = ESP_OK; flow_control_msg_t msg = { .packet = buffer, .length = len }; if (xQueueSend(flow_control_queue, &msg, pdMS_TO_TICKS(FLOW_CONTROL_QUEUE_TIMEOUT_MS)) != pdTRUE) { ESP_LOGE(TAG, "ETH->Wifi: send flow control message failed or timeout, length=%d", len); free(buffer); ret = ESP_FAIL; } return ret; } // This task will fetch the packet from the queue, and then send out through Wi-Fi. // Wi-Fi handles packets slower than Ethernet, we might add some delay between each transmitting. static void eth2wifi_flow_control_task(void *args) { flow_control_msg_t msg; int res = 0; uint32_t timeout = 0; while (1) { if (xQueueReceive(flow_control_queue, &msg, pdMS_TO_TICKS(FLOW_CONTROL_QUEUE_TIMEOUT_MS)) == pdTRUE) { timeout = 0; if (s_sta_is_connected && msg.length) { do { vTaskDelay(pdMS_TO_TICKS(timeout)); timeout += 2; res = esp_wifi_internal_tx(WIFI_IF_AP, msg.packet, msg.length); } while (res && timeout < FLOW_CONTROL_WIFI_SEND_TIMEOUT_MS); if (res != ESP_OK) { ESP_LOGE(TAG, "ETH->WiFi: send packet failed: %d, timeout=%d, length=%d", res, timeout, msg.length); } else { ESP_LOGI(TAG, "ETH->WiFi: send packet ok: %d, timeout=%d, length=%d", res, timeout, msg.length); } } free(msg.packet); } } vTaskDelete(NULL); }
It worked sometimes: If I send 10 pings, 2-3 reached the server. I cann't used a browser to show some small html-page.
My output is:I (14004) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<255,255>, prof:1 I (14004) wifi:station: 5e:6c:e2:e0:0f:66 join, AID=1, bgn, 20 I (14034) eth_example: Wi-Fi AP got a station connected I (14074) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (14104) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (14174) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (14204) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 E (16534) eth_example: ETH->WiFi: send packet failed: 12309, timeout=100, length=60 I (16534) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (16534) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (16544) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (16554) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=590 I (16554) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (16564) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (16574) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (16584) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=86 I (16584) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=295 I (16594) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (16604) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=770 I (16614) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (16614) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=1314 I (16624) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=86 I (16634) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=88 I (16644) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (16644) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=590 I (16654) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=812 I (16664) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=832 I (16674) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=316 I (16674) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=336 I (16684) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=1168 I (16694) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=1188 I (16704) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=1398 I (16704) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=1418 I (16714) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=86 E (18974) eth_example: ETH->WiFi: send packet failed: 12309, timeout=100, length=60 I (18974) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (18974) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (18984) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (18994) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (18994) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (19004) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (19014) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (19014) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (19024) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=88 I (19034) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=74 I (19044) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (19044) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=590 I (19054) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (19064) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 E (21324) eth_example: ETH->WiFi: send packet failed: 12309, timeout=100, length=60 I (21324) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (21324) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (21334) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (21344) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=316 I (21344) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=336 I (21354) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=590 I (21364) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=812 I (21374) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=832 I (21374) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=1398 I (21384) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=1418 I (21394) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=1168 I (21404) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=1188 I (21404) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (21414) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (21424) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (21434) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=88 I (21434) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=107 I (21444) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=131 I (21454) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=86 I (21464) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (21464) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=86 I (21474) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=86 I (21484) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (21494) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (21494) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=705 I (21504) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (21514) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 E (22494) eth_example: ETH->Wifi: send flow control message failed or timeout, length=832 E (22994) eth_example: ETH->Wifi: send flow control message failed or timeout, length=1398 E (23494) eth_example: ETH->Wifi: send flow control message failed or timeout, length=1418 E (23774) eth_example: ETH->WiFi: send packet failed: 12309, timeout=100, length=60 I (23774) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (23774) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (23784) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (23794) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (23794) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=86 I (23804) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (23814) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=191 I (23824) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=191 I (23824) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=86 I (23834) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=60 I (23844) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=86 I (23854) eth_example: ETH->WiFi: send packet ok: 0, timeout=2, length=750 ...
Have anyone used the ESP32 as WiFi-AP and knows the challenges?
-
RE: Core2 with W5500 and ESP-IDF
Hello @felmue,
thank you very much.
I changed in the file Kconfig.projbuild the range of parameter EXAMPLE_ETH_SPI_MISO_GPIO to 38 and used your values. It worked fine.
Ethernet Type (W5500 Module) ---> (1) SPI Host Number (18) SPI SCLK GPIO number (23) SPI MOSI GPIO number (38) SPI MISO GPIO number (26) SPI CS GPIO number (5) SPI clock speed (MHz) (34) Interrupt GPIO number (19) PHY Reset GPIO number (1) PHY Address
My challenge was that I hadn't used the Core2-values the last time I made changes. I overlooked this.
Bye,
Uwe -
Core2 with W5500 and ESP-IDF
Hello,
I used a Core2 with W5500, ESP-IDF V4.3.2 and the express example:
../examples/ethernet/basic/main/ethernet_example_main.cThe program started and I got an reset error:
... I (369) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. E (479) w5500-mac: w5500_reset(228): reset timeout E (479) w5500-mac: emac_w5500_init(610): reset w5500 failed I (479) gpio: GPIO[34]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 E (489) esp_eth: esp_eth_driver_install(204): init Mac failed
I used this configuration on menuconfig:
Espressif IoT Development Framework Configuration Ethernet Type (W5500 Module) ---> (1) SPI Host Number (18) SPI SCLK GPIO number (23) SPI MOSI GPIO number (19) SPI MISO GPIO number (26) SPI CS GPIO number (5) SPI clock speed (MHz) (34) Interrupt GPIO number (13) PHY Reset GPIO number (1) PHY Address
I changed ESP-IDF version, I set Reset GPIO number to -1, I changed SPI clock to 20 Mhz... -> Every time I got the same error.
Do any one have an idea?
Bye,
Uwe