usbscale

Getting a stamps.com Model 510 5 Lbs. USB Scale usable in a small (CentOS 7.9 Minimal) virtual machine. (I had this working natively under macOS, but it’s tempermental and doesn’t always work.)

In the libudev source directory:

# make
# make install

In the libusb source directory:

# export LDFLAGS="-L/usr/local/lib"
# ./configure
# make
# make install

In the usbscale directory:

# make
# make lsusb
# cp usbscale lsusb /usr/local/bin
# vi /etc/ld.so.conf.d/usb.conf
    /usr/local/lib
# ldconfig

In my case, using CentOS 7.9, I also had a pre-C11 compiler, which libusb didn’t like, so I had to fix that:

# yum install centos-release-scl
# yup upgrade
# yum list all | grep devtoolset # see what the latest version is
# yum install -y devtoolset-9
# gcc --version   # looking for 4.7+ and ideally at least 4.8
# scl enable devtoolset-9 bash

Connect the scale and make sure the VM connects it to your virtual machine. (Mine shows up - under VMware or, what I’m using today, Virtual Box, as X.J.Group IOUSBHostDevice.)



Should see it with lsusb (1446:6a73) and be able to read a weight from it with usbscale:

Comments