Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does anybody know of a USB Postage Scale that's Linux compatible?

Tags:

linux

scale

usb

I'm looking for a postage scale that already has linux support (drivers, etc) for a shipping system that I'm working on. I'm planning to use Ubuntu 9.04, but I am willing to switch distro's for compatibility.

Does anybody know of any scales that currently work? Is there an open source project that's working on scale drivers or similar?

Thanks!

like image 933
Nick Avatar asked Apr 23 '10 19:04

Nick


2 Answers

I use the 5lb stamps.com scale. You can pick it up for $10 if you sign up for an account with them and then cancel it.

To read from it in linux, get this script: http://gist.github.com/503896

Edit the script file to set the proper hidraw device path. You can find the path by running dmesg after you've plugged the scale in. You will see something like "/dev/hidraw2".

After setting the hidraw path in the script, add execute permission and then run it as root:

chmod +x usbscale.pl

sudo ./usbscale.pl

Place an object on the scale and it will print the weight.

like image 181
mattismyname Avatar answered Oct 03 '22 04:10

mattismyname


Update:

I've created a newer version of my earlier script that mattismyname linked. It's written in C, and you can find it at https://github.com/erjiang/usbscale

To use it, just download the source code and run (inside its directory):

sudo aptitude install libusb-1.0-0-dev
make
./usbscale

You might need to copy the 50-usb-scales.rules to your /etc/udev/rules.d (or run as root, haha) if you run into a permissions error.

like image 39
erjiang Avatar answered Oct 03 '22 04:10

erjiang