Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 

Access ttyACM device by Python script

Access ttyACM device by Python script

8run0tti
New Poster

Dear ctrlX Community!

We tried to access ttyACM0 device by Python script, but we ran into the following error:

 

audit: type=1400 audit(1688986787.001:132): apparmor="DENIED" operation="open" profile="snap.rexroth-ide.ide" name="/dev/ttyACM0" pid=6499 comm="python3" requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0

 

Could You recommend a solution to this issue?

Thanks in advance!

 

4 REPLIES 4

nickH
Community Moderator
Community Moderator

Hi @8run0tti 

Just to avoid some confusion: Are you using your self created python snap? Or do you use our python runtime and IDE-App?

In case you are using a self created snap then you have to use the serial-port interface in your snap. 

In case you are using our IDE-App: connecting to a serial port is currently not possible from this app. I can forward this request to the develop team. 

Best regards, 

Nick 

Hi Nick!

Thanks for the answer!
We use the Python runtime with IDE app. We need to provide some data ftom ttyACM device to PLC app whit this simple Python script, because the PLC app can only handle ttyUSB devices. The pyserial extension is currently available in the runtime, the only issue is with access rights.

If the development team could fix this issue, it would be great!

nickH
Community Moderator
Community Moderator

I forwarded your request to the development team. I will let you know, when I got news for you on this topic. 

You are right, we need the right interface. We push again the question to the devs 🙂

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist