erjiang / usbscale

Reads weight data from USB scales.
GNU General Public License v3.0
90 stars 22 forks source link

accupost PP-10 #15

Closed dansmall99 closed 1 year ago

dansmall99 commented 7 years ago

I set added vendorID and productID in scale.h:

Hi! I am trying to add this accupost scale, and it keeps giving me a USB transfer error.

I have added the change for the device to scales.h: // // NSCALES should be kept updated with the length of the list. //

define NSCALES 10

// // What is the number of the weighing result to show, as the first result may be incorrect (from the previous weighing) //

define WEIGH_COUNT 2

// // Scales // ------ // uint16_t scales[NSCALES][2] = { // Stamps.com Model 510 5LB Scale {0x1446, 0x6a73}, // USPS (Elane) PS311 "XM Elane Elane UParcel 30lb" {0x7b7c, 0x0100}, // Stamps.com Stainless Steel 5 lb. Digital Scale {0x2474, 0x0550}, // Stamps.com Stainless Steel 35 lb. Digital Scale {0x2474, 0x3550}, // Mettler Toledo {0x0eb8, 0xf000}, // SANFORD Dymo 10 lb USB Postal Scale {0x6096, 0x0158}, // Fairbanks Scales SCB-R9000 {0x0b67, 0x555e}, // Dymo-CoStar Corp. M25 Digital Postal Scale {0x0922, 0x8004}, // AccuPost PP-10 UAB {0x04d9, 0x8010}, // DYMO 1772057 Digital Postal Scale {0x0922, 0x8003} };

and changed permissions for the port using the udev rules (adding the vendor and device id to that as well). @dansmall99 dansmall99 9 hours ago also, here is the output with debug enabled: small@small-Inspiron-530:~/code/usbscale$ ./usbscale Found scale 04d9:8010 (bus 6, device 2) It has descriptors: manufc: 1 prodct: 2 serial: 0 class: 0 subclass: 0 Manufacturer: Holtek first read = -7 bEndpointAddress 0x81 Error in USB transfer

I added a print to report the first return code from trying to read the first junk report off the port.... return value r is -7, timeout. The second read does the same.

erjiang commented 7 years ago

When the scale is turned on and being used, are you able to read raw data from the HID device? You'd have to use a command like sudo cat /dev/hidraw3 or something similar.

See this page for more info: http://notes.ericjiang.com/posts/54

dansmall99 commented 7 years ago

Hi Jiang,

Thanks for getting back to me! Yes, I id'd the scale as /dev/hidraw1 by looking at the /dev directory before and after plugging it in.

sudo cat /dev/hidraw1 produces no discernable output to stdout.

I was thinking I might need to sniff the usb port on windows using their provided software to see if it's polled?

Thanks,

Dan

On Wed, Nov 16, 2016 at 12:00 PM, erjiang notifications@github.com wrote:

When the scale is turned on and being used, are you able to read raw data from the HID device? You'd have to use a command like sudo cat /dev/hidraw3 or something similar.

See this page for more info: http://notes.ericjiang.com/posts/54

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erjiang/usbscale/issues/15#issuecomment-261038663, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjaYswR6VG0uHcfQMcZdE67Mg8IQ0fsks5q-1K5gaJpZM4KwgkG .

erjiang commented 7 years ago

Based on that it sounds like the scale does not use the standard protocol. Do you have further information about it? Non-standard scales will probably not be supported by this project - I don't have any non-standard scales so I probably can't help. maybe someone else knows more about your scale?

erjiang commented 1 year ago

Closing issue - seems to be a non-standard scale.