FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
01-30-2023 09:16 AM - edited 01-30-2023 09:42 AM
Hello,
As I deployed a python-based snap to read values from datalayer (based on the example provided by ctrlX Automation SDK), I encountered the following issue where the snap was unable to connect to datalayer client.
The error messages are logged as per the attachment below:
I have tried deploying similar snap built with C++ and it works. Can anyone help/advise on this issue? Thanks 🙂
Regards,
Lin
Solved! Go to Solution.
01-31-2023 08:55 AM - edited 01-31-2023 09:10 AM
Hi Lin,
First of all, you can ignore the message you get (apparmor="DENIED" operation="open"....). This was a bug in the device admin, which got already fixed in the newer versions. But other than notifications in the logbook this bug didn't have any negative effect and can be ignored. See also this post.
Which version do you use? (You can check the version, when you look at the system apps on your ctrlX CORE).
If you use a version prior to V1.16, you could check if your ctrlX CORE is in operating mode.
Best regards,
Nick
01-31-2023 09:46 AM
Hi Nick,
Thanks for your clarification regarding the bug. However, I've tried both V1.12 and V1.18 running in Operating Mode on ctrlX Core physical device and still received the error:
AVC apparmor="DENIED" operation="open" profile="snap.dev-sdk-py-datalayer.client" name="/sys/devices/platform/amba_pl@0/a0020000.ecm-ip-core/uio/uio0/name" pid=4117 comm="python3" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Four your reference, I also attach hereby the yaml file to build the snap application:
name: dev-sdk-py-datalayer
version: 2.4.0
summary: Data Layer client sample written in Python for ctrlX.
title: dev-sdk-py-datalayer
description: |
The sample demonstrates how to read values from ctrlX Data Layer tree and write out the values to console.
base: core20
confinement: strict
grade: stable
apps:
client:
command: bin/main.py
plugs:
- network
- datalayer
daemon: simple
passthrough:
restart-condition: always
restart-delay: 10s
parts:
client:
plugin: python
source: .
stage-packages:
- libzmq5
- ctrlx-datalayer
plugs:
datalayer:
interface: content
content: datalayer
target: $SNAP_DATA/.datalayer
01-31-2023 10:34 AM - edited 01-31-2023 10:37 AM
Thanks for the additional information. Your snapcraft.yaml looks good. Did you try it with the samples from our SDK (without changes)? I was not able to reproduce your error. If you did some changes, what did you change?
04-24-2023 09:26 AM
Is this still an issue or can the topic be closed?