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

LibUSB not found on version ctrlX OS 2 (Ubuntu core22)

LibUSB not found on version ctrlX OS 2 (Ubuntu core22)

Maxmai
New Poster

Hello community,

I followed this guide to enable a USB port on our ctrlX Core X7, to use it as an input method and publish the data to the datalayer. Although many things had to be modified to get it to work with our version, it ended up working great after these modifications. The main problems were related to the snap not finding the required libraries, namely: the ctrlxdatalayer and LibUSB libraries.

ctrlxdatalayer: This problem was solved by using a different sample as the base for the communication with the datalayer. In this case, we used the python sample code /home/boschrexroth/scripts/ctrlx-automation-sdk/samples-python/datalayer.provider.all-data/

libusb: This issue was solved by explicitly defining where to find the libusb library as explained in this post. 

The snap was working perfectly on the X7 on the older Ubuntu Core20. Nevertheless, we updated the hardware to the newer ctrlX OS 2.2 (ubuntu core22) version. The snap had to be adapted, due to the newer ubuntu core version. Furthermore, a newer SDK and ctrlX Works (ctrlx-automation-sdk-2.4.3) were used to create the new snap, because the older one (ctrlx-automation-sdk-1.18.0) did not allow core22 snaps to be created. The only modification made to the newer version was changing the base to core22 (see picture).

Maxmai_0-1709652972950.png

When running the snap on the X7 the LibUSB library is once again not being found. The next picture shows how the library path is defined. Nevertheless, the snap does not find the library. The older snap uses the library libusb-1.0-0_1.0.23-2build1_amd64.deb. The current library being used by the newer snap is the libusb-1.0-0_1.0.25-1ubuntu2_amd64.deb

Maxmai_2-1709653851464.png

I have tried defining the path multiple times, but none seem to work. (.../libusb-1.0.so.0.3.0, .../libusb-1.0-0_1.0.25-1ubuntu2_amd64.deb ,.../libusb-1.0-0). Any advice on this problem?

@jochen-scheib @CodeShepherd @DiluMarku 

Thanks in advance!

Max 🙂

 

1 REPLY 1

bostroemc
Occasional Contributor

Try changing the path to   .../current/usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.

In my case (snap=rfid-card-reader) the path was redefined as:

Untitled.png

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