ivmarkov/rust-esp32-std-demo

Can't ping 10.0.2.2 when running in qemu

ronny002 opened this issue · 1 comments

Hello,
i tried to run this build in qemu as descriped in the readme qemu section. I'm getting this error. Maybe someone can help? Thanks in advance.

Hello_ from Rust!
More complex print ["foo", "bar"]
Result: 0, 1
Rust main thread: Thread { id: ThreadId(1), name: Some("main"), .. }
Main TLS before change: 13
Main TLS after change: 42
This is thread number 0, Thread { id: ThreadId(2), name: None, .. }
Inner TLS: 0
This is thread number 2, Thread { id: ThreadId(4), name: None, .. }
Inner TLS: 2
This is thread number 3, Thread { id: ThreadId(5), name: None, .. }
Inner TLS: 3
This is thread number 4, Thread { id: ThreadId(6), name: None, .. }
Inner TLS: 4
About to join the threads. If ESP-IDF was patched successfully, joining will NOT crash
This is thread number 1, Thread { id: ThreadId(3), name: None, .. }
Inner TLS: 1
Main TLS after threads: 42
Joins were successful.
I (16115) rust_esp32_std_demo: Testing critical sections
I (16145) rust_esp32_std_demo: Waiting for critical section
I (21135) rust_esp32_std_demo: Critical section acquired
I (21165) system_api: Base MAC address is not set
I (21175) system_api: read default base MAC address from EFUSE
I (21205) esp_idf_svc::eth: Driver initialized
I (21215) esp_idf_svc::eth: Initialization complete
I (21265) system_api: Base MAC address is not set
I (21265) system_api: read default base MAC address from EFUSE
I (21285) esp_idf_svc::eth: Stopping
E (21285) esp_eth: esp_eth_stop(288): driver not started yet
I (21285) esp_idf_svc::eth: Stop requested
I (21295) esp_eth.netif.netif_glue: 00:00:00:00:00:03
I (21305) esp_eth.netif.netif_glue: ethernet attached to netif
I (21305) rust_esp32_std_demo: Eth created
I (21435) esp_idf_svc::eth: Start requested
I (21435) rust_esp32_std_demo: Starting eth...
I (21505) esp_idf_svc::eth: About to wait for duration 20s
I (21515) esp_idf_svc::eth: Waiting done - success
I (21535) esp_idf_svc::netif::status: About to wait for duration 20s
I (22525) esp_idf_svc::netif::status: Got IP event: DhcpIpAssigned(DhcpIpAssignment { netif_handle: 0x3ffc42c4, ip_settings: IpInfo { ip: 10.0.2.15, subnet: Subnet { gateway: 10.0.2.2, mask: Mask(24) }, dns: None, secondary_dns: None }, ip_changed: true })
I (22565) esp_idf_svc::netif::status: Waiting done - success
I (22575) rust_esp32_std_demo: Eth DHCP info: IpInfo { ip: 10.0.2.15, subnet: Subnet { gateway: 10.0.2.2, mask: Mask(24) }, dns: Some(10.0.2.3), secondary_dns: Some(0.0.0.0) }
I (22585) rust_esp32_std_demo: About to do some pings for 10.0.2.2
I (22585) esp_idf_svc::ping: About to run a summary ping 10.0.2.2 with configuration Configuration { count: 5, interval: 1s, timeout: 1s, data_size: 56, tos: 0 }
I (22615) esp_idf_svc::ping: Ping session established, got handle 0x3ffc4854
I (22645) esp_idf_svc::ping: Ping session started
I (22655) esp_idf_svc::ping: Waiting for the ping session to complete
I (23665) esp_idf_svc::ping: Ping timeout callback invoked
I (23665) esp_idf_svc::ping: From ??? icmp_seq=1 timeout
I (24675) esp_idf_svc::ping: Ping timeout callback invoked
I (24675) esp_idf_svc::ping: From ??? icmp_seq=2 timeout
I (25695) esp_idf_svc::ping: Ping timeout callback invoked
I (25695) esp_idf_svc::ping: From ??? icmp_seq=3 timeout
I (26705) esp_idf_svc::ping: Ping timeout callback invoked
I (26705) esp_idf_svc::ping: From ??? icmp_seq=4 timeout
I (27715) esp_idf_svc::ping: Ping timeout callback invoked
I (27715) esp_idf_svc::ping: From ??? icmp_seq=5 timeout
I (27715) esp_idf_svc::ping: Ping end callback invoked
I (27725) esp_idf_svc::ping: 5 packets transmitted, 0 received, time 20049ms
I (27735) esp_idf_svc::ping: Ping session stopped
I (27735) esp_idf_svc::ping: Ping session 0x3ffc4854 removed
I (27745) esp_idf_svc::eth: Stopping
I (27755) esp_idf_svc::eth: Stop requested
I (27785) esp_idf_svc::eth: Stopping
E (27785) esp_eth: esp_eth_stop(288): driver not started yet
I (27785) esp_idf_svc::eth: Stop requested
I (27795) esp_idf_svc::eth: Driver deinitialized
I (27795) esp_idf_svc::eth: Dropped
I (27805) esp_idf_svc::eventloop: Dropped
Error: Pinging IP 10.0.2.2 resulted in timeouts

My lo looks like this:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever

found out that qemu does not support ping. Sorry for the fuss.