I am trying to connect the scale to odoo11 with posbox but without raspberry pi. The whole system is on a ubuntu 18.04.
It does not give me errors when debugging but it does not find the device either and in the system there is no path "/ dev / serial / by-path /"
The scale is connected by rs232, in the ttyS0 system.
I have only touched the scale class and in the Hw_proxy "drivers" and "rs232_devices" as I show below.
Any solution?
Thanks a lot!
Hw_scale:
class Scale(Thread):
def __init__(self):
Thread.__init__(self)
self.lock = Lock()
self.scalelock = Lock()
self.status = {'status':'connecting', 'messages':[]}
self.input_dir = '/dev/serial/by-path/' #The directory does not exist in my ubuntu
self.weight = 0
self.weight_info = 'ok'
self.device = '/devices/pnp0/00:05/tty/ttyS0'
self.path_to_scale = '/dev/ttyS0'
self.protocol = 'ADAMEquipmentProtocol'
Hw_proxy:
drivers = {'scale': '16550A'}
rs232_devices = {'/devices/pnp0/00:05/tty/ttyS0':'16550A'} # {'/path/to/device': 'driver'}
rs232_lock = Lock() # must be held to update `rs232_devices