X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fbrymen-dmm%2Fapi.c;h=dacbee889267f7949e4e18ca08daa20ef31110b3;hp=230b6adf4bd86692604e57501aaafa0c2a8c27d8;hb=11addc897a86a039f72cefbebb5058611ad79102;hpb=648f32d11966917a53caed2d2b640ea75de5c3dd diff --git a/src/hardware/brymen-dmm/api.c b/src/hardware/brymen-dmm/api.c index 230b6adf..dacbee88 100644 --- a/src/hardware/brymen-dmm/api.c +++ b/src/hardware/brymen-dmm/api.c @@ -111,7 +111,12 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) devices = NULL; - conn = serialcomm = NULL; + /* + * BEWARE! Default 'conn' is not desirable when the device cannot + * reliably get detected. Insist that users specify the port. + */ + conn = NULL; + serialcomm = "9600/8n1/dtr=1/rts=1"; for (l = options; l; l = l->next) { src = l->data; switch (src->key) { @@ -126,10 +131,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) if (!conn) return NULL; - if (serialcomm) - devices = brymen_scan(di, conn, serialcomm); - else - devices = brymen_scan(di, conn, "9600/8n1/dtr=1/rts=1"); + devices = brymen_scan(di, conn, serialcomm); return devices; }