User Tools

Site Tools


using_serial_ports_in_linux

Differences

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]
richardrussell
using_serial_ports_in_linux [2022/03/06 22:15] (current)
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
 +</code>
 +
 +For this change to become active it is likely that you will need to restart your PC.
  
using_serial_ports_in_linux.1646406271.txt.gz · Last modified: 2022/03/04 15:04 by richardrussell