Reading a USB stream from a DYMO M10 scales
Posted: Saturday 26th November 2016 4:13am
Hi all.
Anyone have any experience reading usb hid streams? This is new territory for me and I might not be doing this correctly, so any help is greatly appreciated.
I have a Dymo M10 scale that I would like to read the output stream, along trying to decode it. My first issues is an "access forbidden" error...
Any ideas (short of running as root) to get around access permission? Changing access permissions only work until the scale goes into auto power-off. The hidraw file is recreated once the scale is powered on again and permissions are reset.
I'm not 100% sure what type of data type to use. When changing access permission on hidraw3, and running, this...
just outputs a steady stream of "3"'s. Using other data types just give me different output numbers.
From what I can find on the 'net, there should be a data packet of 6 elements. If I'm able to get this worked out, I'd like to tie the scale into the inventory system I wrote this past week.
If this output from dmesg is of any help...
Thanks!
Anyone have any experience reading usb hid streams? This is new territory for me and I might not be doing this correctly, so any help is greatly appreciated.
I have a Dymo M10 scale that I would like to read the output stream, along trying to decode it. My first issues is an "access forbidden" error...
Code: Select all
hFile = Open "/dev/hidraw3" For Read Watch
I'm not 100% sure what type of data type to use. When changing access permission on hidraw3, and running, this...
Code: Select all
Public Sub File_Read()
Dim iByte As Byte
Read #hFile, iByte
Print "Got one byte: "; iByte
End
From what I can find on the 'net, there should be a data packet of 6 elements. If I'm able to get this worked out, I'd like to tie the scale into the inventory system I wrote this past week.
If this output from dmesg is of any help...
Code: Select all
[1221565.175330] usb 2-8: USB disconnect, device number 34
[1221626.550068] usb 2-8: new low-speed USB device number 35 using ohci-pci
[1221626.744476] usb 2-8: New USB device found, idVendor=0922, idProduct=8003
[1221626.744489] usb 2-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1221626.744496] usb 2-8: Product: M10 10 lb Digital Postal Scale
[1221626.744501] usb 2-8: Manufacturer: DYMO
[1221626.744506] usb 2-8: SerialNumber: 0071431044934
[1221626.772802] hid-generic 0003:0922:8003.0026: hiddev0,hidraw3: USB HID v1.01 Device [DYMO M10 10 lb Digital Postal Scale] on usb-0000:00:02.0-8/input0