VOXL2 mini J3 connector (USB3) not working well with external storage for data logging
-
I am trying to log camera data to an external SSD using the voxl-logger utility, with the SSD hooked up to the J3 port of the VOXL2 mini. According to voxl-inspect-cam, the frames I'm trying to save are ~3.11MB, so at 30FPS would require around 93MBps write speed. The external ssd we have hooked up (temporarily) is a 2TB samsung T7 shield, which has an advertised write speed of up to 1000MBps, well over what we need.
The main problem is voxl-logger's output:
voxl-logger -c hires_small_color -d /mnt/ssd Welcome to voxl-logger 1906214 MB left in /mnt/ssd/ starting new log: /mnt/ssd/log0001/ connected to ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/ ERROR: invalid metadata, magic number=-2055633543, expected 1448040524 most likely client fell behind and pipe overflowed flushing backed up pipe ch 0 /run/mpa/hires_small_color/ flushing backed up pipe ch 0 /run/mpa/hires_small_color/
It works for a while, then eventually something backs up and the logger prints this debug message infinitely. It becomes unresponsive and I can't kill it with Ctrl+C. It seems like there's some bottleneck preventing the client (voxl-logger?) from receiving frames at the correct rate from the mpa pipe.
I am aware of the potential issues with the superspeed lines of the connector, but I get this output when taking the diagnostic steps that page details:
voxl2:/$ lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 10000M |__ Port 1: Dev 23, If 0, Class=Mass Storage, Driver=usb-storage, 10000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
So I don't think datarates on the port/cable are the issue, and unless samsung is lying on their documentation by over 10x, I dont know how the ssd itself could be the issue either.
I was also able to test the data rate to this SSD with dd (linux utility) and saw some weird stuff. When trying to push lumps of data ~2GB, it would push the first 80% extremely fast (like 900MBps) and then lock up on the remaining data and take over 40s to transfer the rest. Seeing that made me think it could also be browning out.
Is there anything I am doing wrong / falsely expecting the VOXL2 to be able to perform? I can try a regular VOXL2 with the USB3 expansion and see if that works better for now, but in the end we need to use the mini anyway so I would like to get this issue figured out.
Thank you!
-
@jonathankampia Oh yeah, also, we tried modding the cable like the documentation I linked said to. All we had on hand were some tiny 220nF caps, not the caps linked in the docs. The modded cable wouldn't even allow the USB slave device to show up on lsusb.
-
@jonathankampia Another strange issue! On a standard VOXL2 with the USB3 expansion board, same SDK version (1.5.0), the VOXL is unable to detect the external SSD's partitions so I can't even mount it. Same SSD plugs into a VOXL2 mini and partitions are detected.
-
Hi @jonathankampia
Can you please post some pics of your setups?
I cannot tell exactly how you are using J3, and which version of VOXL 2 Mini do you have? M0104 or the new rounded corner M0204 with fixed SS lines?Do you have a spec of the SSD you are trying to use? What other 5V peripherals are you using. We could be pulling too much current, since V2 Mini only has 900mA TOTAL 5V support so other 5V peripherals will eat into that budget.
Thanks!
Vinny