Recent

Author Topic: Problem opening UART, when autostarting UBUNTU with lazarus application  (Read 529 times)

pascalbythree

  • Sr. Member
  • ****
  • Posts: 292
Lazarus people,

When configuring autostart,

Code: Pascal  [Select][+][-]
  1. [Desktop Entry]
  2. Type=Application
  3. Exec=/home/pascalbythree/WVW_ENDCODE_V2/project1
  4. Hidden=false
  5. NoDisplay=false
  6. X-GNOME-Autostart-enabled=true
  7. Name=My Application

My own made lazarus application gives this error as seen in screenshot.
When connecting to /dev/ttyAMA0, the onboard 3.3V UART of my raspberry 5
PS: I am booting UBUNTU 26 and lazarus 4.99 FPC 3.3.1

When i boot to the GUI and execute the project1 executable by hand, it fully works fine.

Anybody knows what to do to fix this? Greets, Wouter van Wegen, pascalbythree

The project i am currently working on is a equalizer on my Samsung TV, with has serial port input make graphical.

ccrause

  • Hero Member
  • *****
  • Posts: 1116
When i boot to the GUI and execute the project1 executable by hand, it fully works fine.

Could be a permission problem associated with the user context.  Trap the exception and call SysUtils.GetLastOSError to retrieve the OS error.  This could help to identify the cause (but depends on the internal design of the serial component you are using).  You can also check under which user ID your program is running by calling BaseUnix.FpGetuid.

 

TinyPortal © 2005-2018