User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
using_serial_ports_in_linux [2022/03/04 15:04]
using_serial_ports_in_linux [2022/03/06 22:15]
richardrussell Added notes on permissions
Line 14: Line 14:
 <code bb4w> <code bb4w>
-      OSCLI "ldattach -1 -8 -n -s 9600 0 /dev/ttyUSB0" +      OSCLI "ldattach -1 -8 -n -s 9600 0 /dev/ttyUSB0;
-      OSCLI "stty -F /dev/ttyUSB0 9600 raw"+      OSCLI "stty -F /dev/ttyUSB0 9600 raw;"
       serial% = OPENUP("/dev/ttyUSB0.")       serial% = OPENUP("/dev/ttyUSB0.")
 </code> </code>
Line 28: Line 28:
       REM Continue with any background tasks       REM Continue with any background tasks
 </code> </code>
 +====Notes on permissions====
 +Typically to access a serial port in Linux you will either need root privileges (e.g. by using **sudo**) or
 +be a member of the **dialout** group.  You can add the current user to the dialout group as follows:
 +<code bash>
 +sudo usermod -a -G dialout $USER
 +For this change to become active it is likely that you will need to restart your PC.
using_serial_ports_in_linux.txt · Last modified: 2022/03/06 22:15 by richardrussell