I'm running Raspbian Jessie on my Raspberry Pi 3.
Is Raspbian Jessie the most current Linux option available?

I think the stock libusb is libusb-1.0.9.  It appears
that the libusb project has gotten up to 1.0.21 though. 
I think a project I'm trying to enhance is leading me 
into a known issue that has long ago been fixed.

Adding these two lines of C code to TemperInterruptRead in
comm.c gets me around the issue:
...
usb_reset(t->handle);
usb_close(t->handle);
...

The original project I'm trying to take a step further:
https://github.com/~ruibm/temperpi

The issue is, if I do more than 120*6 readings, 6 sensors,
I get a segmentation fault in usb_interrupt_read.

I'm trying to iterate in a loop in temper.c over usb device 
handle creation, usb initialization, reading from a device, 
and detaching the device.  The loop takes me through all 
connected devices of the same type and an outer loop runs 
the inner loop 120 times.  The temperature readings go into
a sqlite3 database file that is specified on the command line
and for each run of readings there is a command line specified 
delay in seconds between runs.  Possibilities for segmentation
fault happening when doing more than 120 runs: known issue in
stock libusb that comes with Raspbian Jessie or maybe I'm 
creating device handles and not freeing them properly when 
I'm done with them.  The original project is not designed to
do multiple runs in C and create the database in C.  It wasn't
designed to work with more than one TEMPer2 temperature sensor
either.
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to