Page 1 of 1

When exporting datas:BrokenPipeError: [Errno 32] Broken pipe #40

Posted: Sat Nov 13, 2021 3:41 am
by pandabiu
**Describe the bug
When using the command:idf.py -p /dev/ttyUSB0 monitor | grep "CSI_DATA" > my-experiment-file.csv ,there is a error:BrokenPipeError: [Errno 32] Broken pipe

**Tool Settings

Baud Rate: [1152000] (using a lower baud rate WILL cause issues. this is the most common issue)
WiFi Channel per Device: [ 6]
FreeRTOS > Tick rate (Hz): [1000]

**Steps to reproduce the behavior:

1.use the code of ESP-CSI TOOL ,cd ./active_ap

2.Recording to the README.md use the commond: idf.py menuconfig

3.idf.py -p /dev/ttyUSB0 flash

4.use the commond :idf.py -p /dev/ttyUSB0 monitor ,then let my phone connect to the AP,it can collect CSI successfully.
QQ图片20211112105551.png
QQ图片20211112105551.png (60.51 KiB) Viewed 2751 times
5.use the commond:idf.py -p /dev/ttyUSB0 monitor | grep "CSI_DATA" , let my phone connect to the AP, then it printed the error like this :
QQ图片20211112123648.png
QQ图片20211112123648.png (106.6 KiB) Viewed 2751 times
6.use the commond:idf.py -p /dev/ttyUSB0 monitor | grep "CSI_DATA" > my-experiment-file.csv , let my phone connect to the AP, then it printed the error like this :
QQ图片20211112105720.png
QQ图片20211112105720.png (94.95 KiB) Viewed 2751 times
Desktop (please complete the following information):

OS: [Ubuntu16.04]
ESP-IDF Version: [4.2.1]

Re: When exporting datas:BrokenPipeError: [Errno 32] Broken pipe #40

Posted: Sat Nov 13, 2021 5:36 am
by ESP_Sprite
The monitor is intended to run interactively, that is, without its output redirected. As a workaround, you can use ctrl-L in a monitor session to copy the output to a log-file, then after you're done, grep that log file for your data.