espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
668 stars 152 forks source link

arping test出错 #456

Open HP4LEVI opened 1 month ago

HP4LEVI commented 1 month ago

程序正常运行,在测试arpin时不能成功,MCU以及ESP32均无反应。ESP32为ESP32-S3,MCU为STM32H7B0.是我的测试方法不对吗?我尝试了推荐的方式。

HP4LEVI commented 1 month ago

我的程序现在分别能运行到这个状态

Snipaste_2024-08-13_14-40-30 Snipaste_2024-08-13_14-41-42 Snipaste_2024-08-13_14-41-09
mantriyogesh commented 1 month ago
  1. Please update following logs, in textual logs, from start to end:

    • ESP log
    • host log
    • arping commands ran and their output
  2. In general, it is worth to check if your own IP address is in the same network address that of destination IP address. For example, stm32 and your laptop is connected to same AP, your laptop holds say '192.168.2.101' , make sure your stm32 settings have own IP address as 192.168.2.X. Also ensure X is not already used address by someone else, else you would face IP conflict at AP. For example, check pinging 192.168.2.233 on your network. if no reply, use this in settings and re-flash.

  3. Cross check if your arp table entries are updated correctly.

    • In case of Linux,
    • check if your MAC address has IP bound, using command:
      arp -n
    • If mapping not already present, add one using command:
      sudo arp -s <IP_ADDRESS> <MAC_ADDRESS>
      : your stm32 IP address, 192.168.2.233 in above case : ESP32 mac address for that wifi interface. For example, for connecting to router/AP, you use 'sta' mode. so use mac address you get in 'sta' mode.
mantriyogesh commented 1 month ago

As in master, there is no lwip integrated, there are steps given to integrate the network stack. However, the https://github.com/espressif/esp-hosted/tree/feature/esp_as_mcu_host branch has lwip and bluetooth stack integrated. but showcase esp as host. for other hosts, need to port the solution at port layer

HP4LEVI commented 1 month ago

这个是STM32的日志: ` +-----------------------------------+-------------------------------------------+ | Parameters | Values | +-----------------------------------+-------------------------------------------+ | INPUTOPERATING_MODE | STATION | | INPUT_GET_AP_SCAN_LIST | yes | +-----------------------------------+-------------------------------------------+ | SOFTAP | | +-----------------------------------+-------------------------------------------+ | INPUT_SOFTAPSSID | ESP123 | | INPUT_SOFTAP_PASSWORD | 1234qwer | | INPUT_SOFTAP_BANDWIDTH | 40 | | INPUT_SOFTAP_CHANNEL | 1 | | INPUT_SOFTAP_ENCRYPTION | WPA2_PSK | | INPUT_SOFTAP_MAX_CONN | 4 | | INPUT_SOFTAP_SSID_HIDDEN | no | | INPUT_SOFTAP_SRC_IP | 192.168.0.100 | | INPUT_SOFTAP_ARP_DEST_IP | 192.168.0.122 | +-----------------------------------+-------------------------------------------+ | STATION | | +-----------------------------------+-------------------------------------------+ | INPUT_STATION__SSID | Gannz_2.4G | | INPUT_STATION_BSSID | | | INPUT_STATION_IS_WPA3_SUPPORTED | no | | INPUT_STATION_PASSWORD | 1234qwer | | INPUT_STATION_SRC_IP | 192.168.0.112 | | INPUT_STATION_ARP_DEST_IP | 192.168.0.115 | +-----------------------------------+-------------------------------------------+

ctrl_rx_thread start ctrl_rx_func = 0x0800B9BD ctrl_msg_Q = 0x200014D0 3.1 Block on read of protobuf encoded msg 3.1 buf_len = 0x00000008, buf = 0x200007D0 3.2 Decode protobuf 3.2 buf_len = 0x00000008, buf = 0x200007D0 3.4 Send for further processing as event or response

  1. Check if valid proto msg
  2. proto_msg = 0x200007E0
  3. proto_msg->msg_type == CTRL_MSG_TYPE__Event ctrl_app_parse_event() EVENT: ESP INIT 2024-01-01 00:00:00 > App EVENT: ESP INIT 3.1 Block on read of protobuf encoded msg 3.1 buf_len = 0x000001C6, buf = 0x200007D0 3.2 Decode protobuf 3.2 buf_len = 0x000001C6, buf = 0x200007D0 3.4 Send for further processing as event or response
  4. Check if valid proto msg
  5. proto_msg = 0x200009A0
  6. proto_msg->msg_type == CTRL_MSG_TYPE__Resp ctrl_app_parse_resp()...start ctrl_msg->msg_id = 205(0xCD) ctrl_msg->msg_id = CTRL_RESP_GET_AP_SCAN_LIST ctrl_msg->msGparaM = 0x200009D0 ctrl_msg->msGparaM->resp = 0(0x0)

    ctrl_app_parse_resp()...ESP_SUCCESS

    3.1 Block on read of protobuf encoded msg Station mode: ssid: Gannz_2.4G passwd 1234qwer 3.1 buf_len = 0x0000000A, buf = 0x200007D0 3.2 Decode protobuf 3.2 buf_len = 0x0000000A, buf = 0x200007D0 3.4 Send for further processing as event or response

  7. Check if valid proto msg
  8. proto_msg = 0x200007E8
  9. proto_msg->msg_type == CTRL_MSG_TYPE__Resp ctrl_app_parse_resp()...start ctrl_msg->msg_id = 204(0xCC) ctrl_msg->msg_id = CTRL_RESP_SET_WIFI_MODE ctrl_msg->msGparaM = 0x20000818 ctrl_msg->msGparaM->resp = 0(0x0)

    ctrl_app_parse_resp()...ESP_SUCCESS

    3.1 Block on read of protobuf encoded msg 3.1 buf_len = 0x0000001D, buf = 0x200007D0 3.2 Decode protobuf 3.2 buf_len = 0x0000001D, buf = 0x200007D0 3.4 Send for further processing as event or response

  10. Check if valid proto msg
  11. proto_msg = 0x200007F8
  12. proto_msg->msg_type == CTRL_MSG_TYPE__Resp ctrl_app_parse_resp()...start ctrl_msg->msg_id = 201(0xC9) ctrl_msg->msGparaM = 0x20000828 ctrl_msg->msGparaM = 0x20000848 ctrl_msg->msGparaM->resp = 0(0x0)

    ctrl_app_parse_resp()...ESP_SUCCESS

    3.1 Block on read of protobuf encoded msg 3.1 buf_len = 0x0000001D, buf = 0x200007D0 3.2 Decode protobuf 3.2 buf_len = 0x0000001D, buf = 0x200007D0 3.4 Send for further processing as event or response

  13. Check if valid proto msg
  14. proto_msg = 0x200007F8
  15. proto_msg->msg_type == CTRL_MSG_TYPE__Resp ctrl_app_parse_resp()...start ctrl_msg->msg_id = 207(0xCF) ctrl_msg->msGparaM = 0x20000828 ctrl_msg->msGparaM = 0x20000848 ctrl_msg->msGparaM->resp = 0(0x0)

    ctrl_app_parse_resp()...ESP_SUCCESS

    3.1 Block on read of protobuf encoded msg`

这个是ESP32的日志:`I (27) boot: ESP-IDF v5.2-dirty 2nd stage bootloader I (27) boot: compile time Aug 13 2024 10:55:56 I (27) boot: Multicore bootloader I (30) boot: chip revision: v0.1 I (34) boot.esp32s3: Boot SPI Speed : 80MHz I (39) boot.esp32s3: SPI Mode : DIO I (44) boot.esp32s3: SPI Flash Size : 8MB I (48) boot: Enabling RNG early entropy source... I (54) boot: Partition Table: I (57) boot: ## Label Usage Type ST Offset Length
I (65) boot: 0 nvs WiFi data 01 02 00009000 00004000 I (72) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (79) boot: 2 phy_init RF data 01 01 0000f000 00001000 I (87) boot: 3 factory factory app 00 00 00010000 00100000
I (94) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (102) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (109) boot: End of partition table I (114) boot: Defaulting to factory image I (118) esp_image: segment 0: paddr=00010020 vaddr=3c090020 size=2b24ch (176716) map I (159) esp_image: segment 1: paddr=0003b274 vaddr=3fc9ba00 size=04d90h ( 19856) load I (163) esp_image: segment 2: paddr=0004000c vaddr=40374000 size=1000ch ( 65548) load I (179) esp_image: segment 3: paddr=00050020 vaddr=42000020 size=8c23ch (574012) map I (282) esp_image: segment 4: paddr=000dc264 vaddr=4038400c size=079d8h ( 31192) load I (299) boot: Loaded app from partition at offset 0x10000 I (299) boot: Disabling RNG early entropy source... I (310) cpu_start: Multicore app I (320) cpu_start: Pro cpu start user code I (320) cpu_start: cpu freq: 160000000 Hz I (320) cpu_start: Application information: I (323) cpu_start: Project name: network_adapter I (329) cpu_start: App version: FG-0.0.6.0.0 I (334) cpu_start: Compile time: Aug 13 2024 10:55:37 I (340) cpu_start: ELF file SHA256: 18602182d... I (346) cpu_start: ESP-IDF: v5.2-dirty I (351) cpu_start: Min chip rev: v0.0 I (356) cpu_start: Max chip rev: v0.99 I (360) cpu_start: Chip rev: v0.1 I (365) heap_init: Initializing. RAM available for dynamic allocation:
I (372) heap_init: At 3FCA4CE8 len 00044A28 (274 KiB): RAM I (378) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM I (385) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM I (391) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAM I (398) spi_flash: detected chip: generic I (402) spi_flash: flash io: dio I (406) sleep: Configure to isolate all GPIO pins in sleep state I (413) sleep: Enable automatic switching of GPIO sleep configuration
I (420) coexist: coex firmware version: 77cd7f8 I (425) coexist: coexist rom version e7ae62f I (430) main_task: Started on CPU0 I (434) main_task: Calling app_main() I (438) NETWORK_ADAPTER: ***** I (447) NETWORK_ADAPTER: ESP-Hosted Firmware version :: FG-0.0.6.0.0 I (456) NETWORK_ADAPTER: Transport used :: SPI only

I (464) NETWORK_ADAPTER: ***** I (474) NETWORK_ADAPTER: Supported features are: I (479) NETWORK_ADAPTER: - WLAN over SPI I (484) ESP_BT: - BT/BLE I (487) ESP_BT: - HCI Over SPI I (491) ESP_BT: - BLE only I (494) NETWORK_ADAPTER: capabilities: 0xe8 I (509) BLE_INIT: BT controller compile version [b877d66] I (510) BLE_INIT: Bluetooth MAC: f4:12:fa:d7:9c:3e I (512) phy_init: phy_version 620,ec7ec30,Sep 5 2023,13:49:13 I (555) NETWORK_ADAPTER: ESP Bluetooth MAC addr: f4:12:fa:d7:9c:3e I (556) SPI_DRIVER: Using SPI interface I (557) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (565) gpio: GPIO[4]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (574) SPI_DRIVER: SPI Ctrl:1 mode: 2, GPIOs: MOSI: 11, MISO: 13, CS: 10, CLK: 12 HS: 2 DR: 4

I (584) SPI_DRIVER: Hosted SPI queue size: Tx:20 Rx:20 I (590) gpio: GPIO[10]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (599) gpio: GPIO[10]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (610) pp: pp rom version: e7ae62f I (613) net80211: net80211 rom version: e7ae62f I (619) wifi:wifi driver task: 3fccc59c, prio:23, stack:6656, core=0 I (624) wifi:wifi firmware version: cc1dd81 I (627) wifi:wifi certification version: v7.0 I (632) wifi:config NVS flash: disabled I (635) wifi:config nano formating: disabled I (639) wifi:Init data frame dynamic rx buffer num: 32 I (644) wifi:Init static rx mgmt buffer num: 5 I (648) wifi:Init management short buffer num: 32 I (653) wifi:Init dynamic tx buffer num: 32 I (656) wifi:Init static tx FG buffer num: 2 I (661) wifi:Init static rx buffer size: 1600 I (665) wifi:Init static rx buffer num: 10 I (668) wifi:Init dynamic rx buffer num: 32 I (673) wifi_init: rx ba win: 6 I (676) wifi_init: tcpip mbox: 32 I (680) wifi_init: udp mbox: 6 I (684) wifi_init: tcp mbox: 6 I (687) wifi_init: tcp tx win: 5760 I (692) wifi_init: tcp rx win: 5760 I (696) wifi_init: tcp mss: 1440 I (700) wifi_init: WiFi IRAM OP enabled I (704) wifi_init: WiFi RX IRAM OP enabled I (710) wifi:mode : null I (712) NETWORK_ADAPTER: Initial set up done I (716) slave_ctrl: event ESPInit I (721) main_task: Returned from app_main() I (2095) wifi:mode : sta (f4:12:fa:d7:9c:3c) I (2096) wifi:enable tsf I (2096) slave_ctrl: Station mode set in scan handler I (3798) slave_ctrl: Total APs scanned = 10 I (3798) slave_ctrl: Details of AP no 0 I (3799) slave_ctrl: SSID Gannz_2.4G RSSI -55 Channel 6 BSSID 78:60:5b:c0:72:23 Auth mode 4

I (3809) slave_ctrl: Details of AP no 1 I (3813) slave_ctrl: SSID TP-LINK_kmzn RSSI -55 Channel 6 BSSID 7e:60:5b:c0:72:23 Auth mode 4

I (3826) slave_ctrl: Details of AP no 2 I (3829) slave_ctrl: SSID
RSSI -56 Channel 1 BSSID 0e:f9:f8:32:70:cc Auth mode 4

I (3841) slave_ctrl: Details of AP no 3 I (3845) slave_ctrl: SSID hollysys RSSI -56 Channel 1 BSSID 04:f9:f8:32:70:cc Auth mode 4

I (3857) slave_ctrl: Details of AP no 4 I (3861) slave_ctrl: SSID HLK_AX3000_2G_0074 RSSI -65 Channel 6 BSSID e4:38:19:11:74:00 Auth mode 7

I (3874) slave_ctrl: Details of AP no 5 I (3878) slave_ctrl: SSID RSSI -72 Channel 4 BSSID 56:46:17:b1:b1:2e Auth mode 4

I (3890) slave_ctrl: Details of AP no 6 I (3894) slave_ctrl: SSID 文清产康 RSSI -74 Channel 4 BSSID 54:46:17:a1:b1:2e Auth mode 4

I (3906) slave_ctrl: Details of AP no 7 I (3910) slave_ctrl: SSID QYHS2 RSSI -80 Channel 1 BSSID dc:65:55:60:17:3a Auth mode 3

I (3922) slave_ctrl: Details of AP no 8 I (3926) slave_ctrl: SSID
RSSI -80 Channel 1 BSSID e2:65:55:60:17:3a Auth mode 3

I (3938) slave_ctrl: Details of AP no 9 I (3941) slave_ctrl: SSID YJ RSSI -89 Channel 6 BSSID 38:68:be:d9:ad:a1 Auth mode 3

I (4013) slave_ctrl: Set wifi mode 1 I (4064) slave_ctrl: Get station mac address I (4065) slave_ctrl: mac [f4:12:fa:d7:9c:3c] I (4118) slave_ctrl: station mode set I (4119) slave_ctrl: Get station mac address I (4119) slave_ctrl: mac [f4:12:fa:d7:9c:3c] I (5816) wifi:new:<6,2>, old:<1,1>, ap:<255,255>, sta:<6,2>, prof:1 I (6325) wifi:state: init -> auth (b0) I (6331) wifi:state: auth -> assoc (0) I (6337) wifi:state: assoc -> run (10) I (6366) wifi:connected with Gannz_2.4G, aid = 13, channel 6, 40D, bssid = 78:60:5b:c0:72:23 I (6367) wifi:security: WPA2-PSK, phy: bgn, rssi: -56 I (6369) wifi:pm start, type: 1

I (6372) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us I (6380) wifi:set rx beacon pti, rx_bcn_pti: 14, bcn_timeout: 25000, mt_pti: 14, mt_time: 10000 I (6388) slave_ctrl: connected to ap SSID:'Gannz_2.4G', password:'1234qwer'
I (6456) wifi:AP's beacon interval = 102400 us, DTIM period = 1 `

mantriyogesh commented 1 month ago

Great, if you wish you can raise PR (pull req) for ESP32 partition changes

HP4LEVI commented 1 month ago

因为我使用的是windows11电脑,所以只能通过ubuntu进行arping命令,我刚才试过了将STM32的地址设置成(不能通过 ping 命令成功的地址),然后再放到虚拟机中进行mac地址映射,最后在进行 sudo arping命令,依旧是没有日志的反应

HP4LEVI commented 1 month ago

太好了,如果您愿意,您可以为 ESP32 分区更改提高 PR(拉取请求)

这个是什么意思呢?

HP4LEVI commented 1 month ago
Snipaste_2024-08-13_15-40-15
HP4LEVI commented 1 month ago

事实上我已经执行过arping命令了,使用的这个地址

HP4LEVI commented 1 month ago
Snipaste_2024-08-13_15-41-40
mantriyogesh commented 1 month ago

因为我使用的是windows11电脑,所以只能通过ubuntu进行arping命令,我刚才试过了将STM32的地址设置成(不能通过 ping 命令成功的地址),然后再放到虚拟机中进行mac地址映射,最后在进行 sudo arping命令,依旧是没有日志的反应

Ping cannot work. Right now there is just network stub in master. You can either hook using documentation or refer to other branch , where lwip is integrated, but need to adapt port layer for stm.

mantriyogesh commented 1 month ago

So arping is working?

HP4LEVI commented 1 month ago

但是我看您的arping可以工作呀,而且还有相应的arping_test日志

HP4LEVI commented 1 month ago

所以arping工作吗?

是的,使用sudo arping 这两个设置的地址都能成功192.168.0.112,192.168.0.115

mantriyogesh commented 1 month ago

Try to separate network address for STA and AP in general. They should be in different subnet.

You can change https://github.com/espressif/esp-hosted/blob/6ddb670edcf15108be92d7e8e4fc6f32542ef5e4/esp_hosted_fg/host/stm32/driver/transport/spi/spi_drv.c#L305-L338 to :

static void check_and_execute_spi_transaction(void)
{
    uint8_t * txbuff = NULL;
    uint8_t is_valid_tx_buf = 0;
    GPIO_PinState gpio_handshake = GPIO_PIN_RESET;
    GPIO_PinState gpio_rx_data_ready = GPIO_PIN_RESET;

    xSemaphoreTake(mutex_spi_trans, portMAX_DELAY); //change

    /* handshake line SET -> slave ready for next transaction */
    gpio_handshake = HAL_GPIO_ReadPin(GPIO_HANDSHAKE_GPIO_Port,
            GPIO_HANDSHAKE_Pin);

    /* data ready line SET -> slave wants to send something */
    gpio_rx_data_ready = HAL_GPIO_ReadPin(GPIO_DATA_READY_GPIO_Port,
            GPIO_DATA_READY_Pin);

    if (gpio_handshake == GPIO_PIN_SET) {

        /* Get next tx buffer to be sent */
        txbuff = get_tx_buffer(&is_valid_tx_buf);

        if ( (gpio_rx_data_ready == GPIO_PIN_SET) ||
             (is_valid_tx_buf) ) {

            /* Execute transaction only if EITHER holds true-
             * a. A valid tx buffer to be transmitted towards slave
             * b. Slave wants to send something (Rx for host)
             */
            //xSemaphoreTake(mutex_spi_trans, portMAX_DELAY);
            spi_trans_func[hardware_type](txbuff);
            //xSemaphoreGive(mutex_spi_trans);
        }
    }
    xSemaphoreGive(mutex_spi_trans); // change
}
HP4LEVI commented 1 month ago

好的,我试一下。

HP4LEVI commented 1 month ago

请问图片中的日志是通过这种ip地址映射实现的吗?

Snipaste_2024-08-13_16-17-18
mantriyogesh commented 1 month ago

Sorry, I did not understand. Are you able to see these on stm32 log?

First log: arpping triggered from laptop to stm32 , would be printed as

ARP_REQ_RECD: ** STM32 would respond back the ARP_RSP.

Second log: ARP ping response received at host, for request triggered earlier. This log trace may change as per the aring implementation. Essentially, you should get the response for ARP ping, irrespective of the trace printed.

HP4LEVI commented 1 month ago

是的 这两条日志都不曾出现

HP4LEVI commented 1 month ago

这就是我一直感到困扰的问题,所以我一直在尝试ping所设置的ip地址,我担心是我的操作问题,因为ESP32跟STM32的日志看起来都很正常,反而是我的ping操作不是很正规

mantriyogesh commented 1 month ago

did you get this: https://github.com/espressif/esp-hosted/issues/456#issuecomment-2285566154?

HP4LEVI commented 1 month ago

是的 这个确实是能ping通,但是我发现他的MAC地址对不上

mantriyogesh commented 1 month ago

This is very basic network stub. your ping can only be working when you have network stack integrated.

ARPing vs Ping

ARPing is a Layer 2 protocol. Ping is a Layer 3 protocol.

Layer 3 cannot work without proper network stack integrated.

How to integrate network stack

https://github.com/espressif/esp-hosted/issues/446#issuecomment-2277285846 There are two options discussed in the comment.

HP4LEVI commented 1 month ago

好的,我立即尝试一下,谢谢。

mantriyogesh commented 1 month ago

The ESP as host by the way uses as much as ESP-IDF components at host side. Those components may be needed a copy for now, but if everything taken at port layer, should work.

I think it would be better to evaluate using esp as host and esp another esp as slave using the feature/esp_as_mcu_host

HP4LEVI commented 3 weeks ago

你好 @mantriyogesh ,这周我在尝试esp_as_mcu_hosted,我的从机代码能够很好的编译通过并且下载成功。但是,主机的代码我参考了提示:选择了example中的scan文件,使用vscode打开后,添加了espressif/esp_wifi_remote: "^0.3.0"跟espressif/esp_hosted: "^0.0.9"组件,编译时却失败了,并且配置文件也不能成功打开。

HP4LEVI commented 3 weeks ago

`Processing 5 dependencies: [1/5] espressif/eppp_link (0.2.0) [2/5] espressif/esp_hosted (0.0.9) CMake Error at C:/Users/26891/esp/v5.3/esp-idf/tools/cmake/build.cmake:552 (message): Traceback (most recent call last):

File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\26891\.espressif\python_env\idf5.3_py3.11_env\Lib\site-packages\idf_component_manager\prepare_components\__main__.py", line 6, in <module>
  main()
File "C:\Users\26891\.espressif\python_env\idf5.3_py3.11_env\Lib\site-packages\idf_component_manager\prepare_components\prepare.py", line 130, in main
  args.func(args)
File "C:\Users\26891\.espressif\python_env\idf5.3_py3.11_env\Lib\site-packages\idf_component_manager\prepare_components\prepare.py", line 29, in prepare_dep_dirs  
  ).prepare_dep_dirs(
    ^^^^^^^^^^^^^^^^^
File "C:\Users\26891\.espressif\python_env\idf5.3_py3.11_env\Lib\site-packages\idf_component_manager\core.py", line 98, in wrapper
  return func(self, *args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\26891\.espressif\python_env\idf5.3_py3.11_env\Lib\site-packages\idf_component_manager\core.py", line 760, in prepare_dep_dirs
  downloaded_components = download_project_dependencies(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\26891\.espressif\python_env\idf5.3_py3.11_env\Lib\site-packages\idf_component_manager\dependencies.py", line 392, in download_project_dependencies  
  download_path = fetcher.download()
                  ^^^^^^^^^^^^^^^^^^
File "C:\Users\26891\.espressif\python_env\idf5.3_py3.11_env\Lib\site-packages\idf_component_tools\sources\fetcher.py", line 70, in download
  return self.source.download(self.component, self.managed_path)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\26891\.espressif\python_env\idf5.3_py3.11_env\Lib\site-packages\idf_component_tools\sources\web_service.py", line 234, in download
  copy_directory(self.component_cache_path(component), download_path)
File "C:\Users\26891\.espressif\python_env\idf5.3_py3.11_env\Lib\site-packages\idf_component_tools\file_tools.py", line 121, in copy_directory
  copytree(source_directory, destination_directory)
File "shutil.py", line 561, in copytree
File "shutil.py", line 515, in _copytree

shutil.Error: [('C:\Users\26891\AppData\Local\Espressif\ComponentManager\Cache\service_d92d8f1e\espressifesp_hosted_0.0.9_d46894d5\examples\slave\main\common\protobuf-c\t\generated-code\test-generated-code.c', 'C:\Users\26891\esp\workplace\github_download\esp-hosted-feature-esp_as_mcu_host\esp-hosted-feature-esp_as_mcu_host\host\port\examples\wifi\scan\managed_components\espressif__esp_hosted\examples\slave\main\common\protobuf-c\t\generated-code\test-generated-code.c', "[Errno 2] No such file or directory: 'C:\\Users\\26891\\esp\\workplace\\github_download\\esp-hosted-feature-esp_as_mcu_host\\esp-hosted-feature-esp_as_mcu_host\\host\\port\\examples\\wifi\\scan\\managed_components\\espressifesp_hosted\\examples\\slave\\main\\common\\protobuf-c\\t\\generated-code\\test-generated-code.c'"), ('C:\Users\26891\AppData\Local\Espressif\ComponentManager\Cache\service_d92d8f1e\espressifesp_hosted_0.0.9_d46894d5\examples\slave\main\common\protobuf-c\t\generated-code2\common-test-arrays.h', 'C:\Users\26891\esp\workplace\github_download\esp-hosted-feature-esp_as_mcu_host\esp-hosted-feature-esp_as_mcu_host\host\port\examples\wifi\scan\managed_components\espressif__esp_hosted\examples\slave\main\common\protobuf-c\t\generated-code2\common-test-arrays.h', "[Errno 2] No such file or directory: 'C:\\Users\\26891\\esp\\workplace\\github_download\\esp-hosted-feature-esp_as_mcu_host\\esp-hosted-feature-esp_as_mcu_host\\host\\port\\examples\\wifi\\scan\\managed_components\\espressifesp_hosted\\examples\\slave\\main\\common\\protobuf-c\\t\\generated-code2\\common-test-arrays.h'"), ('C:\Users\26891\AppData\Local\Espressif\ComponentManager\Cache\service_d92d8f1e\espressifesp_hosted_0.0.9_d46894d5\examples\slave\main\common\protobuf-c\t\generated-code2\cxx-generate-packed-data.cc', 'C:\Users\26891\esp\workplace\github_download\esp-hosted-feature-esp_as_mcu_host\esp-hosted-feature-esp_as_mcu_host\host\port\examples\wifi\scan\managed_components\espressif__esp_hosted\examples\slave\main\common\protobuf-c\t\generated-code2\cxx-generate-packed-data.cc', "[Errno 2] No such file or directory: 'C:\\Users\\26891\\esp\\workplace\\github_download\\esp-hosted-feature-esp_as_mcu_host\\esp-hosted-feature-esp_as_mcu_host\\host\\port\\examples\\wifi\\scan\\managed_components\\espressifesp_hosted\\examples\\slave\\main\\common\\protobuf-c\\t\\generated-code2\\cxx-generate-packed-data.cc'"), ('C:\Users\26891\AppData\Local\Espressif\ComponentManager\Cache\service_d92d8f1e\espressifesp_hosted_0.0.9_d46894d5\examples\slave\main\common\protobuf-c\t\generated-code2\test-generated-code2.c', 'C:\Users\26891\esp\workplace\github_download\esp-hosted-feature-esp_as_mcu_host\esp-hosted-feature-esp_as_mcu_host\host\port\examples\wifi\scan\managed_components\espressif__esp_hosted\examples\slave\main\common\protobuf-c\t\generated-code2\test-generated-code2.c', "[Errno 2] No such file or directory: 'C:\\Users\\26891\\esp\\workplace\\github_download\\esp-hosted-feature-esp_as_mcu_host\\esp-hosted-feature-esp_as_mcu_host\\host\\port\\examples\\wifi\\scan\\managed_components\\espressifesp_hosted\\examples\\slave\\main\\common\\protobuf-c\\t\\generated-code2\\test-generated-code2.c'")]

Call Stack (most recent call first): C:/Users/26891/esp/v5.3/esp-idf/tools/cmake/project.cmake:710 (idf_build_process) CMakeLists.txt:7 (project)`

HP4LEVI commented 3 weeks ago

看起来是配置文件的问题

mantriyogesh commented 3 weeks ago

Your ESP-Hosted submodules are not populated. Run:

git submodule update --init --recursive
HP4LEVI commented 3 weeks ago

能详细说明一下吗,谢谢

mantriyogesh commented 3 weeks ago

ESP-Hosted includes another sub project (i.e. git sub-module), protobuf.

Screenshot_2024-08-21-20-38-23-123_com brave browser-edit Unless all submodules are updated, build would fail.

We have captured in master branch, but feature/mcu_as_host_mcu branch missed in documentation, which we would update in short.

https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/Linux_based_host/Linux_based_readme.md#12-host-setup

Screenshot_2024-08-21-20-40-20-702_com brave browser-edit

mantriyogesh commented 3 weeks ago

So simply, run:

git submodule update --init --recursive

In esp-hosted directory and all dependent the source files would be fetched.

mantriyogesh commented 3 weeks ago

For more information on submodules can be found at: https://phoenixnap.com/kb/git-submodule : search for Joining a Project Using Submodules

HP4LEVI commented 3 weeks ago

抱歉,忘记回复了。我正在继续测试中,谢谢你的回复。