I noticed the network API does not have any support for promiscuous mode. I was wondering if this is just because it wasn't added when it got support in idf a long while ago?
Also could someone point me towards the files that define the network library when use don't on the ESP32? It seems the modnetwork.c and modnetwork,h don't actually contain the function declares for the network library.
Accessing promiscuous mode on the ESP32?
Re: Accessing promiscuous mode on the ESP32?
Yep, it's a combination of doing the work to enable the feature, but also providing an API to work with it. (i.e. raw sockets I guess)
esp32/modnetwork.c contains all the code for configuring the WLAN interface.
I'm not sure what you mean by the network library... perhaps esp32/modsocket.c which provides the socket code (via ESP32 IDF's LWIP) ?
Re: Accessing promiscuous mode on the ESP32?
I know inside of modnetwork the methods used for the connect method don’t exist. Was wondering where that was defined. Unless it’s esp_connect. But if it is I don’t know how it ends up being network.connect at least based of the C extension information that says the functions are package_name
Re: Accessing promiscuous mode on the ESP32?
At the end of modnetwork.c, the WLAN class is provided by:
Slightly further up, WLAN.connect is provide by
Which is implemented in
Code: Select all
STATIC const mp_rom_map_elem_t mp_module_network_globals_table[] = {
...
{ MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&get_wlan_obj) },
Code: Select all
STATIC const mp_rom_map_elem_t wlan_if_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&esp_connect_obj) },
Code: Select all
STATIC mp_obj_t esp_connect(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
...
ESP_EXCEPTIONS( esp_wifi_connect() );
...
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(esp_connect_obj, 1, esp_connect);
Re: Accessing promiscuous mode on the ESP32?
Also as for an API to use promiscuous mode I don't see a problem with using a callback like is used in the C code. where your given an object the represents that packet with all the information in it. Sort of like desktop python api's for wifi packet capture.
Re: Accessing promiscuous mode on the ESP32?
I might try and implement some sort of basic implementation of this. Need to wrap my head around how functions are passed around in the C++/C code.
Re: Accessing promiscuous mode on the ESP32?
hi chibill,
did you progress?
I would like to transfer my PAXCounter to Micropython
maybe I can also help a little
did you progress?
I would like to transfer my PAXCounter to Micropython
maybe I can also help a little