WIFI & esp-hosted #16366
Replies: 5 comments 10 replies
-
You have to add the esp_hosted interface for the
|
Beta Was this translation helpful? Give feedback.
-
I did what you suggested. Same error:
extern const struct _mp_obj_type_t mod_network_esp_hosted_type; From line 213: #if MICROPY_PY_NETWORK_ESP_HOSTED
extern const struct _mp_obj_type_t mod_network_esp_hosted_type;
#define MICROPY_HW_NIC_ESP_HOSTED { MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&mod_network_esp_hosted_type) },
#else
#define MICROPY_HW_NIC_ESP_HOSTED
#endif I tried both (with and without additional line), same error. |
Beta Was this translation helpful? Give feedback.
-
So this function |
Beta Was this translation helpful? Give feedback.
-
Actually function mod_network_poll_events() is missing in stm32/mpnetworkport.c. static void network_poll(mp_sched_node_t *node)
{
// Run the lwIP internal updates
sys_check_timeouts();
#if MICROPY_PY_NETWORK_ESP_HOSTED
extern int esp_hosted_wifi_poll(void);
// Poll the NIC for incoming data
if (esp_hosted_wifi_poll() == -1)
{
soft_timer_remove(&network_timer);
}
#endif
}
void mod_network_poll_events(void)
{
mp_sched_schedule_node(&network_poll_node, network_poll);
} from renesas-ra/mpnetworkport.c. into stm32/mpnetworkport.c, build now raises CC mpnetworkport.c
mpnetworkport.c: In function 'network_poll':
mpnetworkport.c:116:9: error: implicit declaration of function 'soft_timer_remove' [-Werror=implicit-function-declaration]
116 | soft_timer_remove(&network_timer);
| ^~~~~~~~~~~~~~~~~
mpnetworkport.c:116:28: error: 'network_timer' undeclared (first use in this function)
116 | soft_timer_remove(&network_timer);
| ^~~~~~~~~~~~~
mpnetworkport.c:116:28: note: each undeclared identifier is reported only once for each function it appears in
mpnetworkport.c: In function 'mod_network_poll_events':
mpnetworkport.c:123:29: error: 'network_poll_node' undeclared (first use in this function); did you mean 'network_poll'?
123 | mp_sched_schedule_node(&network_poll_node, network_poll);
| ^~~~~~~~~~~~~~~~~
| network_poll
cc1: all warnings being treated as errors
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting and function soft_timer_remove() does not exist in stm32 port, leading to a deep hole :) |
Beta Was this translation helpful? Give feedback.
-
How can I contribute ? |
Beta Was this translation helpful? Give feedback.
-
Hi,
Running 1.24.0
Ethernet network runs happily on a NUCLEO_STM32F767.
I am trying to set-up WIFI with the same NUCLEO_STM32F767 and the esp-hosted driver.
I have added MICROPY_PY_NETWORK_ESP_HOSTED=1 to make file.
Also added pins in mpconfigboard.h (SPI4 was chosen):
Compiling runs fine.
extmod.mk in line 487 seems to take into account MICROPY_PY_NETWORK_ESP_HOSTED=1 as
esp_hosted_wifi.c, esp_hosted_netif.c & esp_hosted_hal.c matching .o and .P files are created in build/drivers/esp-hosted directory.
Running the following code:
Ethernet network runs happily. But
raises AttributeError: 'module' object has no attribute 'WLAN'
How can WLAN be declared ?
Beta Was this translation helpful? Give feedback.
All reactions