Recent

Author Topic: Access to ttyUSB* in Lazarus/Linux program  (Read 4265 times)

bvn123

  • New Member
  • *
  • Posts: 17
Re: Access to ttyUSB* in Lazarus/Linux program
« Reply #15 on: January 04, 2021, 06:53:50 pm »
/Why/ didn't it work? What does ls -l for the ttyUSBx device show? Did you remember to logout and then back in?
MarkMLl
Thank You MarkMLl,
it works too, and Your variant is simpler.
So, I added to dialout group user me:
Code: Pascal  [Select][+][-]
  1. sudo usermod -a -G dialout me
  2. <entered password>
  3. <restarted Linux>

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: Access to ttyUSB* in Lazarus/Linux program
« Reply #16 on: January 04, 2021, 07:14:13 pm »
Big grin here. I'm not sure whether having a user in BOTH dialout and plugdev is relevant, since the ttyXXX device will be in one group or the other as shown by  ls -a

You need to be aware of the udev stuff, but strictly it's something that you do when you buy a new board and is distinct from setting up user permissions.

Assuming that you're using some variant of Arduino, look carefully at the setup instructions that come with whatever type of board you go on to buy: this /particularly/ applies to Teensies where you have to get something JUST RIGHT (i.e. no trailing blank lines etc.) manually.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

bvn123

  • New Member
  • *
  • Posts: 17
Re: Access to ttyUSB* in Lazarus/Linux program
« Reply #17 on: January 04, 2021, 07:39:38 pm »
Assuming that you're using some variant of Arduino, ...
MarkMLl
Mainly I use CP2102 USB-UART bridges,
sometimes FTDI chips when USB to fast parallel port adapter is preferable.
« Last Edit: January 04, 2021, 07:44:39 pm by bvn123 »

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: Access to ttyUSB* in Lazarus/Linux program
« Reply #18 on: January 04, 2021, 07:50:35 pm »
A useful thing about (genuine) FTFI chips is that you can "brand" them with a serial number, which makes detecting what's actually plugged in a bit easier. However enumerating device properties is an utter- and I hope that the community will turn an eye to my bad language /bitch/: while you can hook udev hotplug messages using (checks) NetLink, all too often you end up walking a file/directory tree in /sys

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018