MultiWiiConf: connect to serial port rfcomm0 as normal user?

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
asti
Posts: 12
Joined: Thu Apr 21, 2016 8:56 pm

MultiWiiConf: connect to serial port rfcomm0 as normal user?

Post by asti »

Hi,

I have a bluetooth adapter on my multicopter, which works great. Now I want to connect to this device with my Linux laptop. I have paired the bluetooth device using blueman and the serial port /dev/rfcomm0 opens. Furthermore I can use this serial port when I run MultiWiiConf as root. All works great.
However, when I open MultiWiiConf as normal user, I can not connect to rfcomm0. The port shows up in MultiWiiConf but clicking the button does nothing.

Please note that my user is in the dialout group and rfcomm0 is owned by the dialout group. Actually I changed the permissions of /dev/rfcomm0 to 666 so I get

Code: Select all

ll /dev/rfcomm0
crw-rw-rw- 1 root dialout 216, 0 Aug  2 10:52 /dev/rfcomm0

But still I am not able to open this port in MultiWiiConf as my normal user.

I am also not able to connect to this port using baseflight configurator so it is not an issue with MultiWiiConf.

asti
Posts: 12
Joined: Thu Apr 21, 2016 8:56 pm

Re: MultiWiiConf: connect to serial port rfcomm0 as normal u

Post by asti »

I just noticed that I have the same issue when using the USB serial port ttypUSB0. I always have to run MultiWiiConf as root. So it is not related to the bluetooth connection.

LutzB
Posts: 67
Joined: Sun Feb 08, 2015 4:01 pm
Location: Germany

Re: MultiWiiConf: connect to serial port rfcomm0 as normal u

Post by LutzB »

Just add your user to the group "dialout".

asti
Posts: 12
Joined: Thu Apr 21, 2016 8:56 pm

Re: MultiWiiConf: connect to serial port rfcomm0 as normal u

Post by asti »

Please note that my user is in the dialout group and rfcomm0 is owned by the dialout group.

LutzB
Posts: 67
Joined: Sun Feb 08, 2015 4:01 pm
Location: Germany

Re: MultiWiiConf: connect to serial port rfcomm0 as normal u

Post by LutzB »

Oh.. sorry missed that one.
Can you post what commands or config you use for rfcomm? Please include any error messages too.

asti
Posts: 12
Joined: Thu Apr 21, 2016 8:56 pm

Re: MultiWiiConf: connect to serial port rfcomm0 as normal u

Post by asti »

I solved it. Such a stupid issue, really. Running MultiWiiConf from command line I get an error message when clicking the serial button:

Code: Select all

java.io.FileNotFoundException: /home/aas/Proggen/Arduino/MultiWiiConf/SerialPort.txt (Keine Berechtigung)

This means the application can't open the SerialPort.txt file in which it saves the last used connection. The file was owned by root and was in the root group. Propably because I ran MultiWiiConf as root.

Thus deleting SerialPort.txt (or changing its owner to the normal user) is the solution.
Baseflight Configurator however does still not work. But this is irrelevant for me.

Post Reply