Skip to content

unix: no permission on serial port handling #411

@rusefillc

Description

@rusefillc

is it possible/should it be possible for application to know that it has no permission for serial port in *nix?

under root my stuff works

sudo java -jar console/rusefi_console.jar reboot_ecu
[sudo] password for debian:
I 220221 104531.089 [main] Launcher - rusEFI UI console 20220213
I 220221 104531.114 [main] Launcher - Compiled Mon Feb 14 12:49:06 EST 2022
I 220221 104531.114 [main] Launcher -


I 220221 104531.156 [main] PortDetector - Trying [ttyACM0, ttyS0]
I 220221 104531.162 [AutoDetectPort1] SerialIoStream - Using com.fazecast.jSerialComm 2.5.3
I 220221 104531.162 [AutoDetectPort1] BufferedSerialIoStream - [BufferedSerialIoStream] openPort ttyACM0
I 220221 104531.162 [AutoDetectPort2] BufferedSerialIoStream - [BufferedSerialIoStream] openPort ttyS0
I 220221 104531.176 [AutoDetectPort1] SerialAutoChecker - Got signature=rusEFI 2022.02.20.mre_f4.1768592053 from ttyACM0
I 220221 104531.176 [AutoDetectPort1] SerialIoStream - ttyACM0: Closing port...
I 220221 104532.186 [AutoDetectPort1] SerialIoStream - ttyACM0: Closed port.
I 220221 104532.187 [AutoDetectPort1] SerialAutoChecker - Propagating AutoDetectResult{serialPort='ttyACM0', signature='rusEFI 2022.02.20.mre_f4.1768592053'}

without root I have access control issue. I still get port in the list of ports available but all I get is a 'write' method failing to write.

Is there an API to detect that specific error? Should there be an API to detect that specific error?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions