eProsima / Micro-XRCE-DDS-Agent

Micro XRCE-DDS Agent respository. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
112 stars 80 forks source link

Raspberry Pi 4 daemon install #289

Open cedricmelancon opened 2 years ago

cedricmelancon commented 2 years ago

Issue template

Steps to reproduce the issue

I want to use microros-arduino to communicate from an OpenCR to a RaspberryPi 4. I did the snap installation and the following configuration:

sudo snap set micro-xrce-dds-agent transport=serial dev=/dev/ttyACM0
sudo snap set micro-xrce-dds-agent daemon=true
snap connect micro-xrce-dds-agent:serial-port snapd:virtualcomport

Then reboot.

Expected behavior

The agent connects properly to the usb device and receive data from the OpenCR.

Actual behavior

When coming back from the boot, if I do dmesg | grep tty, I get the following message:

audit: type=1400 audit(1637948726.589:47): apparmor="DENIED" operation="open" profile="snap.micro-xrce-dds-agent.daemon" name="/dev/ttyACM0" pid=1804 comm="MicroXRCEAgent" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0

So I'm not able to get data from the device.

Also, how can we see the log from the agent when running as daemon?

Additional information

cedricmelancon commented 2 years ago

Got some improvements. I found how to get the logs and realized that the service was not started. Now it works, but I get no connection from the OpenCR. When I plug the OpenCR on my laptop with Linux 20.01, I get automatic communication.