cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Libusb / Import Datalayer

Libusb / Import Datalayer

thuvarejanX
Member

Hello, I'm trying to run this documentation:  https://developer.community.boschrexroth.com/t5/Store-and-How-to/Using-the-libusb-library-within-a-s...

I managed to build the snap and add it to the CORE, but it doesn't detect my mouse. My question is, correct me if I understood it wrong, it's now "import ctrlxdatalayer" and not "import datalayer", like in the attached file. So that means I have to change the code in the file from "datalayer" to "ctrlxdataly", is that right? And could that be the reason it doesn't work?

And if anyone already followed this documentation and managed to run it, please let me know.

 

thuvarejanX_0-1674811524198.png

 

 

Kind regards,

Thuvi

 

4 REPLIES 4

nickH
Community Moderator
Community Moderator

Hi Thuvi, 

this community post is based on the version 1.12 of the SDK. In the meanwhile the python wheel for the Data Layer got updated and the name was changed to ctrlxdatalayer. So you are right, you have to change these lines. 

I already mentioned this and some other issues in another blog post here

Best regards, 

Nick

nickH
Community Moderator
Community Moderator

Hi, 

I just tried it and it works for me. To build it I use the ctrlX WORKS integrated App Build Environment V1.18. I also changed the line in the snapcraft.yaml where it looks for the ctrlx-datalayer deb (reason). 

I upload the project for you, which works with V1.18. But remember, this is not an official app and also not part of our SDK. 

Best regards,

Nick

 

Thank you very much Nick! I just managed to run it on my own, by adding "datalayerdeb" to the .yaml file and it worked.

thuvarejanX_0-1675168158410.png

If I see it correctly you don't have that part in your .yaml file, but you added "ctlrx-datalayer" and "libzmq5" to the stage-packages which looks like a smoother solution. Can you explain me what the difference/connection between our versions are, because both seem to work. I am trying to understand the technical aspect.

nickH
Community Moderator
Community Moderator

I'm happy that this solved your issue. 

Like I tried to explain in this post: To use the Data Layer in your snap you need the ctrlx-datlayer.deb. This debian package gets published with the SDK on GitHub. And gets downloaded to your Build Envrionment when you download the complete SDK form GitHub (like when you execute the install-sdk.sh). Now you need to include it to your snap with the snapcraft.yaml. And there are two ways to do this. The way you showed and the way we have currently in the SDK. There the snapcraft.yaml files of all sample projects got simplified.  But therefore, the storage folder (ctrlx-automation-sdk/deb) of the ctrlx-datalayer debian package in the SDK needs to be registered in the sources list (/etc/apt/sources.list.d/ctrlx-automation.list) so the debian package can be found by snapcraft. But this is already done in the App Build Environment of ctrlX WORKS V1.18. 

Best regards, 

Nick

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