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: 
SOLVED

SDK USB Mouse Data Layer

SDK USB Mouse Data Layer

Open
Occasional Contributor

Hello Community,

I am new to SDK and managed to access app build environment via CtrlX WORKS. 

I am following this blog https://developer.community.boschrexroth.com/t5/Store-and-How-to/Using-the-libusb-library-within-a-s...
Here is what i did

1) I downloaded the datalayer.mouse-data.zip

1a) deleted sdk-py-mouse-data_2.0.0_arm64.snap

2) Import them into visual studio code in app build environment

3) Changed vendor and product ID into my mouse ID in mouse_data.py

4) Entered the snapcarft build command in the visual code terminal for arm

5) Install apps using newly created snapped file in to CtrlX

When i installed the newly created snap file into my CtrlX successfully, i couldn't find the mouse data in my CtrlX datalayer. (see attached)

Any resolution for this issue?

Warmest regards,

10 REPLIES 10

nickH
Community Moderator
Community Moderator

Hi, 

could you look at the diagnostics->logbook, enable system messages in the settings (click on the gear symbol) and filter for "snap.sdk-py-mouse-data.provider.service"? 

Maybe this could give you some information on what goes wrong. Additionaly I would recommend you to look at the python samples inside the SDK (V1.14) and compare them to the sdk-py-mouse-data sample. Maybe some dependencies got updated in the meanwhile. 

Best regards,

Nick

Open
Occasional Contributor

Hello Nick,

Attached files is the error in my logbook. 

How do i resolve this error?

Warmest regards,

nickH
Community Moderator
Community Moderator

Hello, 

like I recommended, I compared the mouse-data example with the Python samples in the SDK (see ctrlx-automation-sdk/smaples-python/datalayer.provider). 

I saw that the python wheel datalayer got updated to ctrlxdatalayer (see ctrlx-datalayer on PyPI). So I changed the import to the new python wheel. Then you also have to add the datalayerdeb to the parts in your snapcraft.yaml. 

Now the provider of the app is working and I can see the nodes in the Data Layer (sdk-py-mouse-data).

I tested it with a ctrlX CORE (V1.14.0). But I could not test the input form a mouse, cause I did not have a USB-C adapter at hand.

Please have a look into the attached edited sample and try it out.

Best regards, 

Nick

Open
Occasional Contributor

Hello,

Sorry to bring this up again, i am not good with SDK.

I was able to create a snap file of the datalayer mouse previously, but however upgrading to ctrlX works v1.16 from v1.14 and creating a new app build environment. I am not able to snap the datalayer mouse data. 

The error i get is no such file or directory for ctrlx-datalayer.deb file when i run ARM build task.

Open_0-1669770019997.png

But however when i build ARM with the sample template of python datalayer provider i have no issue.

Open_1-1669770232666.png

I have run install-sdk.sh in my SSH terminal, and ctrlx-datalayer debian file is installed.

Open_2-1669770306517.png

Anyone know a resolution to this issue? 

Warmest regards,

nickH
Community Moderator
Community Moderator

Hi Open, 

the problem is that snapcraft searches for the datalayer debain package at this relative path "../../../../../deb/ctrlx-datalayer-1.*.*.deb". In your case snapcraft can't find the debian package at this place. 

This path does match, if you put the datalayer.mouse-data sample beside the other python-samples in the SDK (ctrlx-automation-sdk/samples-python/).

 

Best regards, 

Nick

Open
Occasional Contributor

Thank you Nick!

It is working.

Open_0-1670203155545.png

Warmest regards,

I did that, managed to build the snap and adding it to the core, but it's not visible there. I got no error or anything when building the snap. I get this error in the logbook:

thuvarejanX_0-1671542125141.png

It's also in the right directory:

thuvarejanX_1-1671542169303.png

I get this problem quite often. Reinstalling the ctrlx-datalayer.deb was the solution but this time around it doesn't seem to work.

Does anyone have a solution for this?

nickH
Community Moderator
Community Moderator

Hi, 

which version of the SDK do you use? Did you update to V1.18?

Maybe take a look at this issue:  SOLVED Error SDK V1.18. Not able to snap, because the package 'ctrlx-datalayer' was not found. 

Best regards, 

Nick

I'm using the 1.16 version.

nickH
Community Moderator
Community Moderator

Maybe, the error occurs, because we already released the new python datalayer and fbs wheels on pypi.org. These python wheels get downloaded during the snap process and the new python wheels for version 1.18 does not match with the datalayer Debian package of V1.16 (ctrlx-datalayer-1.8.6.deb).

I would recommend to update to V1.18. If you want to perform the update to V1.18, its easiest to create a new build environment with ctrlX WORKS V1.18 and execute the install-sdk.sh there. If you want to use your existing App Build Environment with the new SDK you have to remember this. But if you still want to use SDK V1.16 there is also this way: 

So, to continue using the V1.16 SDK you need to download and use the python packages ctrlx-datalayer = 2.2.0 and ctrlx-fbs==1.3.0. Please add these versioning in the setup.py file and in the requirements.txt. These screenshots are from the datalayer.client.sub, but works for alle the python samples the same:

nickH_0-1673344768148.png

nickH_1-1673344768149.png

 

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