itm / wsn-device-drivers

Drivers for Wireless Sensor Network Devices
Other
6 stars 4 forks source link

Warning if user has insufficient rights to connect to device #119

Open danbim opened 12 years ago

danbim commented 12 years ago

From the logs:

2012-05-02 13:34:43,125 | DeviceObserver-Thread 0        | AbstractSerialPortConnection   | WARN  | Port /dev/ttyUSB3 not found.
2012-05-02 13:34:43,236 | DeviceObserver-Thread 0        | AbstractSerialPortConnection   | WARN  | Port /dev/ttyUSB3 not found.
2012-05-02 13:34:43,345 | DeviceObserver-Thread 0        | AbstractSerialPortConnection   | WARN  | Port /dev/ttyUSB3 not found.
2012-05-02 13:34:43,457 | DeviceObserver-Thread 0        | AbstractSerialPortConnection   | WARN  | Port /dev/ttyUSB3 not found.
2012-05-02 13:34:43,583 | DeviceObserver-Thread 0        | AbstractSerialPortConnection   | WARN  | Port /dev/ttyUSB3 not found.
2012-05-02 13:34:43,692 | DeviceObserver-Thread 0        | AbstractSerialPortConnection   | WARN  | Port /dev/ttyUSB3 not found.
2012-05-02 13:34:43,805 | DeviceObserver-Thread 0        | AbstractSerialPortConnection   | WARN  | Port /dev/ttyUSB3 not found.
2012-05-02 13:34:43,917 | DeviceObserver-Thread 0        | AbstractSerialPortConnection   | WARN  | Port /dev/ttyUSB3 not found.
2012-05-02 13:34:44,027 | DeviceObserver-Thread 0        | AbstractSerialPortConnection   | WARN  | Port /dev/ttyUSB3 not found.
2012-05-02 13:34:44,137 | DeviceObserver-Thread 0        | AbstractSerialPortConnection   | WARN  | Port /dev/ttyUSB3 not found.

If a user is not part of group "dialout" he will only get the error messages displayed above which is not really helping to find the root cause. It might be possible to check for the file rights in order to determine if the users rights are sufficient before actually trying to connect.