Openbravo Issue Tracking System - Retail Modules
View Issue Details
0031641Retail ModulesWeb POS Hardware Managerpublic2015-12-02 13:302022-03-03 14:10
malsasua 
adrianromero 
normalminoralways
closedfixed 
5
 
 
malsasua
No
0031641: To improve the documentation about the hw manager running ubuntu
it will be nice to improve the documentation about how to run the hw manager over ubuntu.

For example:

- In order for Linux to detect a USB-to-Serial device, the module ftdi_sio must be enabled in modprobe (not enabled by default in Ubuntu 14.04+ and Linux Mint Rebecca, as far as I can tell)
- If the device does not get mapped as ttyUSB0 right away (you can check that in /var/log/syslog), you have to manually add its ID to the config file of ftdi_sio

about serial ports:
 create a new rule:
SUBSYSTEM=="usb",ATTRS{idVendor}=="0519", ATTRS{idProduct}=="0007", RUN+="/sbin/modprobe", RUN+="/bin/sh -c 'echo 0519 0007 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"

if it is needed to change the bauds, you need to aggregate the next line to udev rule:
KERNEL=="ttyUSB0", RUN+="/bin/stty -F /dev/ttyUSB0 19200 raw -echo"
n/a
documentation
Issue History
2015-12-02 13:30malsasuaNew Issue
2015-12-02 13:30malsasuaAssigned To => Retail
2015-12-02 13:30malsasuaTriggers an Emergency Pack => No
2015-12-02 13:30malsasuaTag Attached: documentation
2015-12-02 14:31malsasuaNote Added: 0082535
2015-12-02 14:48pcg_elopezIssue Monitored: pcg_elopez
2022-01-11 12:31alostaleAssigned ToRetail => Triage Platform Conn
2022-03-03 14:04adrianromeroStatusnew => scheduled
2022-03-03 14:04adrianromeroAssigned ToTriage Platform Conn => adrianromero
2022-03-03 14:05adrianromeroNote Added: 0135428
2022-03-03 14:05adrianromeroStatusscheduled => resolved
2022-03-03 14:05adrianromeroResolutionopen => fixed
2022-03-03 14:10malsasuaReview Assigned To => malsasua
2022-03-03 14:10malsasuaStatusresolved => closed

Notes
(0082535)
malsasua   
2015-12-02 14:31   
Installation example of a Star Micronics SCD122 (USB) in Ubuntu Linux (14.04 - 15.10)

1 - Check if the USB-to-Serial driver is loaded after a fresh start (dmesg | grep -i ftdi)
2 - If it not loaded, add a new line "ftdi_sio" to the bottom of the the file /etc/modules and reboot, so that the driver is properly loaded at startup. Repeat step 1 and confirm the driver has been loaded. The output should look like this:

[ 3.143155] usbcore: registered new interface driver ftdi_sio
[ 3.143164] usbserial: USB Serial support registered for FTDI USB Serial Device

3 - Open a terminal and monitor the system logs (tail /var/log/syslog -f)
4 - Plug in the device
5 - If the device gets mapped to ttyUSB0, you can skip to step 9. Otherwise, go to next step.
6 - Register the Vendor and Product ID in the driver by adding creating a new udev rule 99-star-micronics.rules in the /etc/udev/rules.d folder:
SUBSYSTEM=="usb",ATTRS{idVendor}=="0519", ATTRS{idProduct}=="0007", RUN+="/sbin/modprobe", RUN+="/bin/sh -c 'echo 0519 0007 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"

7 - Reload udev rules (sudo udevadm control --reload-rules) or reboot
8 - Repeat steps 3-5 and confirm the device now gets mapped to ttyUSB0
9 - Configure the speed of the serial port ttyUSB0 creating a new udev rule 99-star-micronics.rules in the /etc/udev/rules.d folder (If you do not perform this step, the display will only show "noise"):

KERNEL=="ttyUSB0", RUN+="/bin/stty -F /dev/ttyUSB0 19200 raw -echo"

10 - Reload udev rules (sudo udevadm control --reload-rules) or reboot
11 - Define the device in openbravo.properties as follows:

machine.display = epson:file,/dev/ttyUSB0

12 - Start the Hardware Manager, access to the "Printer" Tab, click the button "Test Display" and confirm the display is working correctly.
(0135428)
adrianromero   
2022-03-03 14:05   
http://wiki.openbravo.com/wiki/Retail:Hardware_and_Peripherals_Installation#Serial_and_parallel_port_configuration [^]