Closed librarianmage closed 8 years ago
Assuming you added the vendor and product IDs correctly to the scales.h file, can you try compiling with debugging turned on, and then paste the output here?
You can do it by changing this line in the Makefile:
CFLAGS=-Wall -DDEBUG
and then running make clean; make usbscale
The new build should print out more information.
The same problem but with another scale. With the changes in the Makefile , no messages , no errors.
The result of execute "usbscale" is:
`./usbscale Found scale 067b:2303 (bus 3, device 6) It has descriptors: manufc: 1 prodct: 2 serial: 0 class: 0 subclass: 0 Manufacturer: Prolific Technology Inc. bEndpointAddress 0x81 -7 Error in USB transfer
-7 is the value of var r = libusb_interrupt_transfer
Any idea?
067b:2303
is a USB to Serial Bridge Controller from Prolific. I doubt that it could work as a scale.
Yes, i have a usb to serial bridge controller but connected a scale to it. If i do in terminal cat /dev/port i can see the de data of scale.
usbscale
is for USB HID scales that work over specialized protocol, not your regular serial port. You can't do that trick with cat /dev/port
with these scales, hence this program.
Really, if you could simply read data from a plain old serial port, you should do just that.
@MathWhiz if you haven't sorted it out, please post your scales.h
OK, Thanks for your help. Regards Juan
@erjiang @sanmai Sorry, still haven't figured it out. Will post scales.h
and debug info ASAP.
@erjiang
Found scale 04d9:8010 (bus 1, device 7)
It has descriptors:
manufc: 1
prodct: 2
serial: 0
class: 0
subclass: 0
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/007: Permission denied
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
This is after I move the udev rules
What if you run that with sudo
?
I see that at least someone managed to read data from this model.
@sanmai I get
Found scale 04d9:8010 (bus 1, device 7)
It has descriptors:
manufc: 1
prodct: 2
serial: 0
class: 0
subclass: 0
Manufacturer: Holtek
bEndpointAddress 0x81
Error in USB transfer
What if you read directly from /dev/hidrawX
?
Are you using the latest version of usbscale
?
I am using the latest version of usbscale On Mon, Aug 1, 2016 at 12:05 AM Alexey Kopytko notifications@github.com wrote:
Are you using the latest version of usbscale?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erjiang/usbscale/issues/14#issuecomment-236490352, or mute the thread https://github.com/notifications/unsubscribe-auth/ALz_8y_pgkj6z4jxFRtG9qa0km1-ZcdBks5qbX6dgaJpZM4IgRQB .
None of the /dev/hiddraw* things output anything On Mon, Aug 1, 2016 at 12:07 AM Ray Arndorfer raymond.arndorfer@gmail.com wrote:
I am using the latest version of usbscale On Mon, Aug 1, 2016 at 12:05 AM Alexey Kopytko notifications@github.com wrote:
Are you using the latest version of usbscale?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erjiang/usbscale/issues/14#issuecomment-236490352, or mute the thread https://github.com/notifications/unsubscribe-auth/ALz_8y_pgkj6z4jxFRtG9qa0km1-ZcdBks5qbX6dgaJpZM4IgRQB .
If you will move things off and on the scale, will there be any output from any of the /dev/hiddraw*
?
No On Mon, Aug 1, 2016 at 12:18 AM Alexey Kopytko notifications@github.com wrote:
If you will move things off and on the scale, will there be any output from any of the /dev/hiddraw*?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erjiang/usbscale/issues/14#issuecomment-236491597, or mute the thread https://github.com/notifications/unsubscribe-auth/ALz_8x97t1kKrDVLR4eLCzpjCuwy-Uybks5qbYGjgaJpZM4IgRQB .
Well, apparently you need a different approach because if you can't read a thing from /dev/hiddrawX
neither usbscale
can. Unfortunately.
Maybe I was just doing it incorrectly… On Mon, Aug 1, 2016 at 1:32 AM Alexey Kopytko notifications@github.com wrote:
Well, apparently you need a different approach because if you can't read a thing from /dev/hiddrawX neither usbscale can. Unfortunately.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erjiang/usbscale/issues/14#issuecomment-236499878, or mute the thread https://github.com/notifications/unsubscribe-auth/ALz_8yjHRKhwuNWoM0_yH6EbokiyYXgBks5qbZMGgaJpZM4IgRQB .
The forum that @sanmai linked that purportedly contains working code for this scale indicates that the Holtek scale does not follow the USB HID scale spec. It uses report ID=9 (setReport(9, array('B',(0x10,0,0,0,0,0,0,0)))
) which isn't even one of the six reports listed in the USB HID scale spec.
Closing this for now - unlikely that usbscale will support non-standard scales when support for standard scales is still so barebones.
Hi, I'm having a similar problem with my satorius scale. I've added the debugging line to the make file and then did a make clean and make usbscale. it does find the scale and can id the manufacturer, etc. below is the output:
pi@raspberrypi:~/Downloads/usbscale $ sudo ./usbscale Found scale 24bc:0010 (bus 1, device 15) It has descriptors: manufc: 1 prodct: 2 serial: 3 class: 239 subclass: 2 Manufacturer: Sartorius libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=22 bEndpointAddress 0x85 Error in USB transfer
Any advice would be so greatly appreicated! Thanks! -Stephen
@seacuello for new scales, please open a separate issue. It's possible the scale does not follow the USB standard, but every scale is different and some investigation needs to be done. The test of reading from hiddraw would help, for example.
I received an Accupost PP-10USB - 10 lbs USB postal scale for a project that I am working on. I would like to read data from it using this code. After plugging it in and running
lsusb
, I deduced that it wasBus 001 Device 004: ID 04d9:8010 Holtek Semiconductor, Inc.
. I put it into the file specified in the repo and it compiled without an error. However, running it causes it to hang before spitting outError in USB transfer
. Is there anything I am doing wrong? The output fromlsusb -v
is: