pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
196 stars 167 forks source link

OSError: the requested operation is not possible when using send_raw() #609

Open elmaghba opened 1 year ago

elmaghba commented 1 year ago

The Pycom board you are using (Fipy). sysname='FiPy', nodename='FiPy', release='1.20.2.rc7', version='v1.11-6d01270 on 2020-05-04', machine='FiPy with ESP32', lorawan='1.0.2', sigfox='1.0.1', pybytes='1.4.0')

When I try to send raw WiFi data using send_raw() function, I get the following error: "OSError: the requested operation is not possible"

I saw in an old issue that this function only supports management packets such as Beacon and Probe request, but it did not work for me even for those packets.

This is the part of the code regarding this issue:

wlan.promiscuous(True) pkt = #b'\x00\x00\x08\x00\x00\x00\x00\x00@\x00\x00\x00\xff\xff\xff\xff\xff\xff\xf0\x08\xd1\xcb\xe1\xd8\xff\xff\xff\xff\xff\xff\x00\x00\x00\x08Pycom AP\x01\t\x03\x12\xc2\x96\x18$0H`\x03\x01\x01'

pkt = b'\x00\x00\x08\x00\x00\x00\x00\x00@\x00\x00\x00\xff\xff\xff\xff\xff\xff<q\xbf\x87m,\xff\xff\xff\xff\xff\xff\x00\x00\x00\x08Pycom AP\x01\t\x03\x12\xc2\x96\x18$0H`\x03\x01\x01'

WLN.send_raw(Buffer=pkt, interface=WLAN.STA)

Thank you in advance!