Bug 1673

Summary: "want 2x packet size" reported on Raspberry Pi
Product: libsigrok Reporter: Dmitry Burstein <DmitryBurstein>
Component: Driver: mastech-ms6514Assignee: Nobody <nobody>
Status: CONFIRMED ---    
Severity: normal CC: Gerhard.Sittig
Priority: Normal    
Version: unreleased development snapshot   
Target Milestone: ---   
Hardware: ARM   
OS: Linux   

Description Dmitry Burstein 2021-03-08 16:03:28 CET
Hi.
After building the latest (0.8) release on Raspberry Pi, I'm trying to get a reading with Mastech thermometer, and getting the following:

~ $ LD_LIBRARY_PATH=/home/<>/sr/lib /home/<>/sr/bin/sigrok-cli --driver mastech-ms6514:conn=/dev/ttyUSB0 --samples 1
sr: serial: Small stream detect RX buffer, want 2x packet size.
No devices found.

The device itself is connected and working perfectly with another program.
Comment 1 Gerhard Sittig 2021-03-08 20:03:16 CET
This issue is unrelated to libserialport. It's an issue in the libsigrok 
driver for this device. The driver's scan() routine uses too small a buffer 
when it tries to synchronize to the serial data stream which communicates 
packets of a fixed size. The error message suggests that the buffer size 
should be at least two times the size of the expected receive data. The 
MS6514 may be a special case since multiple displays are involved, so I 
don't know of a simple and reliable fix that'd be appropriate.

Can you raise the driver author's awareness of this issue?
Comment 2 Dmitry Burstein 2021-03-08 23:06:43 CET
Could you put him on CC List of this bug report? Dave Buechi <db@pflutsch.ch>