How exactly would one go about creating a raw socket on the MAC layer in Micropython?
The UNIX equivalent is:
eth_p_all=3
netif='wlan0'
s=socket.socket(socket.AF_PACKET,socket.SOCK_RAW,socket.htons(eth_p_all))
s.bind((netif,0))
For one, it is not clear how to get the interface name, and there is no socket.AF_PACKET
or socket.htons
.
So, if there is no way to do this with the stock libraries or firmware, which libraries should I choose, or if firmware modification is required, how exactly should I modify the firmware?