Tangara Companion Flatpak (Linux) not connecting
#1
Hi I received my nice Tangara some days ago, and I want to flash the firmware from the current 1.0.0. version.

I have followed the instructions to use flatpak (a tool I am not very familair with alas) to flash via the tangara-companion tool (current version0.4.3). I can get this to work, but the screen stays completely empty.

I have added my user to the Dialout group (I found that can be required) but it still does not work.

When I open the companion-tool via the command line I get this error telling me that the flatpak version cannot connect to device "/dev/ttyACM0":

Code:
[color=#686868][[/color][color=#000000]2025-01-31T09:23:17Z [/color][color=#1818b2]DEBUG[/color][color=#000000] tangara_companion::device[/color][color=#686868]][/color][color=#000000] watch: new params: Some(ConnectionParams { serial: SerialPortInfo { port_name: "/dev/ttyACM0", port_type: UsbPort(UsbPortInfo { vi[/color]d: 4617, pid: 8212, serial_number: None, manufacturer: None, product: None }) }, usb: UsbPortInfo { vid: 4617, pid: 8212, serial_number: None, manufacturer: None, product: None } })
error opening tangara: Port(Error { kind: Io(PermissionDenied), description: "Permission denied" })


Does anybody know how to solve this?
  Reply
#2
Yes, your user is not member of the dialout group.

You can add the user to the group with this command:

sudo usermod -a -G dialout <username>

Afterwards you need to login again to make the group change known to your system.
  Reply
#3
Is it better/no difference to do sudo su or usermod? I used sudo su but not really sure either way.
  Reply
#4
(2025-01-31, 08:00 PM)spindle Wrote: Is it better/no difference to do sudo su or usermod? I used sudo su but not really sure either way.

Ok, I assumed you are using a linux machine.

su is a program to gain admin rights on your machine.
sudo is a program to do certain tasks that require admin rights. The user has to be member of the sudo group or have the rights for the command in /etc/sudoers
usermod is a program to modify a user account

You want your user to be in the group dialout to interact with the microcontroller that is accessible via usb via the device /dev/ttyACM0.

So when you are using a standard linux distribution like ubuntu your user is normally in the group sudo. So with the command I sent you you should then be able to add your user to the group dialout and use the companion application.
  Reply
#5
What linux distro are you using?  That might help to get to the bottom of this

I learned with my computers (all running CachyOS, a derivative of ArchLinux), there actually wasn't a dialout group -- instead, it was tied to the group 'uucp' - once I added my user to that group, I had no issues with the Tangara Companion flatpak or CLI.

It might help to verify what group is assigned permissions to '/dev/ttyACM0'.  You can try one or both of these:

--  In the terminal, run the command "ls-l /dev/ttyACM0"
You should see something like this as an output - 

ls -l /dev/ttyACM0
crw-rw---- 166,0 root 31 Jan 02:02 /dev/ttyACM0

In my case, it didn't show me the group (you should see something like 'root dialout'), so I got creative

-- In your file manager, go to "/dev", and find the object "ttyACM0"
Right click on this object and choose Properties
Look at the permissions - this should tell you what group has access to the device.

Then assign your user to the group assigned, and don't forget to log out and back in afterwards.  Hopefully that helps!
  Reply
#6
Sorry for replying a bit late. Some answers.

- I use Opensuse Leap 15.6 (latest version)

- I have a Dialout group and enabled it for my user (via Yast: is easier then via the cli).

- The device is assigned to this group:
Code:
  user@device:~> ls -l /dev/ttyACM0
  crw-rw---- 1 root dialout 166, 0 Feb  4 10:01 /dev/ttyACM0

Despite that the flatpak version uses something different or is blocked by it's sandbox.

I was able to get the flatpak to work by updating access for the device
(can only be done after connecting the device, otherwise it does not exist).
- As user root do (I never was very much into sudo):
Code:
chmod 666 /dev/ttyACM0

Thanks for all the help! And I hope this helps other people.

PS: It would be much easier if we could load the flatpak via flathub and not via a local file? For some reason the flatpak is not visible into flatseal but luckily I can install via discover (package manager for KDE). I found flatseal as a tool to update settings, but it is not working for this local file as it does not show.
  Reply


Forum Jump: