Replies: 6 comments 2 replies
-
|
Ciao Clemente, I tested your exact code and it works correctly on my ESP32-C6. The auto-start from
This will generate incoming traffic to the ESP32, which produces a CSI frame for each ping. Let me know if the ping workaround helps. |
Beta Was this translation helpful? Give feedback.
-
|
Ciao Francesco, Even when sending a “fast” ping to the ESP32-C6, the streaming output always remains at 0 pps. The only way I can make it work is by using mpremote. it works correctly and packets are sent. Honestly, this is quite strange 🙂 Let me know if you have any ideas or if there’s something else I should try. TIA |
Beta Was this translation helpful? Give feedback.
-
|
Quick update that might be useful: I see the same behavior on a XIAO ESP32-S3 Sense as well. If the same code is executed from So this does not seem to be specific to the XIAO ESP32-C6 board. Clemente |
Beta Was this translation helpful? Give feedback.
-
|
Hi Clemente, I hadn’t realized you were on Windows 😅 Jokes aside, the issue might be file encoding or line endings. Windows uses CRLF ( This would explain why:
Please try creating your Option A - Use Notepad++:
Option B - Create file directly via mpremote: mpremote connect COM31 exec "f=open('main.py','w'); f.write('from src.csi_streamer import stream_csi\nstream_csi(\"192.168.1.8\", 0)\n'); f.close()"Then reset the board. Let me know if this helps! |
Beta Was this translation helpful? Give feedback.
-
|
Found it!!! It was not a terminator issue, but rather how I was calling the function. I changed my from src.csi_streamer import stream_csi
def main():
# Start streaming to the PC
stream_csi('(192.168.1.8)', 0)
if __name__ == "__main__":
main()to this: from src.csi_streamer import stream_csi
def main():
# Start streaming to the PC
stream_csi("192.168.1.8", 0)
if __name__ == "__main__":
main()And now it works! 🎉 My Python knowledge is quite basic, so honestly I don’t fully understand why calling the function like this: does not work, but at least the root cause is clear now. Thanks again for the help! |
Beta Was this translation helpful? Give feedback.
-
|
I ran a few more tests, and this is not a smart quotes issue. When calling the function as: the IP address passed to Inside the function, the following variable is defined: which therefore becomes: Later in the code handling the UDP send with # Build and send packet
try:
packet = struct.pack(packet_format, MAGIC_STREAM, num_sc, seq_num, *iq_values)
sock.sendto(packet, dest_addr)
packet_count += 1
seq_num = (seq_num + 1) & 0xFF
except Exception:
print("sock.sendto ERROR!")
passThis is the resulting output, with the error printed and counters staying at zero: So yes — my apologies for the confusion and for wasting your time 🙏 Thanks again for your time and patience! Best regards |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I am using a XIAO ESP32-C6 board to experiment with μESPectre and micro-espectre.
I created a
main.pyfile in the root of the flash with the following code:My goal is to automatically start CSI data streaming at board boot, so that data can be continuously acquired without keeping the PC connected to the board via serial.
❌ Problem
When the board boots and executes
main.py, the output is:No packets are sent, which is also confirmed on the receiving side:
✅ What works
Everything works correctly if I start streaming manually using the
mecommand over serial:In this case, packets are sent correctly and received on the PC:
❓ Question
main.py?meCLI?Any help or pointers would be greatly appreciated.
Thanks in advance!
Clemente
Beta Was this translation helpful? Give feedback.
All reactions