OS:

  ubuntu 22.04 x64

user:

  cashier 22222322

display:

  設定值 > 顯示器 > 顯示器模å¼
    é¸æ“‡å–®ä¸€é¡¯ç¤ºå™¨, 把å¦ä¸€å€‹ä¸å­˜åœ¨çš„5:4螢幕關閉

close sleep mode:

  設定值 > é›»æº
    轉黑螢幕 -> æ°¸ä¸
â€ƒâ€ƒâ€ƒâ€ƒè‡ªå‹•æš«åœ -> 關閉
  設定值 > éš±ç§ > 螢幕
    自動鎖定螢幕: 關閉

install ssh:

sudo apt install openssh-server

Set up users to have access to peripherals:

add user to dialout group, it need to reboot after setting

sudo adduser cashier dialout

sudo reboot

Check the serial port path:

it usually is ttyS[0-5], but you can double check by follow way:

  1. check serial port:

sudo dmesg | egrep --color 'serial|ttyS'

[    2.299420] 00:04: ttyS2 at I/O 0x3e8 (irq = 6, base_baud = 115200) is a 16550A
[    2.322086] 00:05: ttyS3 at I/O 0x2e8 (irq = 6, base_baud = 115200) is a 16550A
[    2.344684] 00:06: ttyS4 at I/O 0x2e0 (irq = 6, base_baud = 115200) is a 16550A
[    2.367047] 00:07: ttyS5 at I/O 0x2f0 (irq = 6, base_baud = 115200) is a 16550A
[    2.389464] 00:08: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    2.411914] 00:09: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[ 3627.420845] usbcore: registered new interface driver usbserial_generic
[ 3627.420882] usbserial: USB Serial support registered for generic
[ 3627.429607] usbserial: USB Serial support registered for pl2303
  1. Plug an entity into the RS232 port(e.g. printer)
  2. Check serial info:

sudo cat /proc/tty/driver/serial

serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:786 rx:1 CTS|DSR
1: uart:16550A port:000002F8 irq:3 tx:0 rx:0
2: uart:16550A port:000003E8 irq:6 tx:405 rx:405 RTS|DTR
3: uart:16550A port:000002E8 irq:6 tx:0 rx:0
4: uart:16550A port:000002E0 irq:6 tx:0 rx:0
5: uart:16550A port:000002F0 irq:6 tx:0 rx:0
6: uart:unknown port:00000000 irq:0
...

look for the CTS, DSR, (D)CD or RI flags, which is connected to physical device
and check those port, which is match the result of the previous command
e.g. 000003F8 -> 0x3f8, so it use 'ttyS0', so if you want to set this device path, it is '/dev/ttyS0'

Check usb device path:

  1. open a terminal, to listen the device plugged in

udevadm monitor

  1. Plug an entity into the usb port(e.g. scanner), then the mointor will display info:
KERNEL[65092.863135] add      /devices/pci0000:00/0000:00:14.0/usb2/2-3 (usb)
KERNEL[65092.864157] change   /devices/pci0000:00/0000:00:14.0/usb2/2-3 (usb)
KERNEL[65092.864798] add      /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:2.0 (usb)
KERNEL[65092.865369] add      /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:2.0/tty/ttyACM0 (tty)
KERNEL[65092.865484] bind     /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:2.0 (usb)
KERNEL[65092.865711] add      /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:2.1 (usb)
KERNEL[65092.865798] bind     /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3:2.1 (usb)

look for the 'tty' flags, for this case, it use 'ttyACM0', so if you want to set this device path, it is '/dev/ttyACM0'

Setting auto start app:

  1. install app, download deb file from server
  2. check app path

which payment-app

/usr/bin/payment-app
  1. find "åˆå§‹å•Ÿå‹•ç¨‹å¼" at menu, choose "新增"
    path is the the result of the previous command
    and set a name, "payment app"

  2. reboot

sudo reboot

Return to Top