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

c++ datalayer client doesn't connect DL_CLIENT_NOT_CONNECTED

c++ datalayer client doesn't connect DL_CLIENT_NOT_CONNECTED

JLG_War
Established Member

I have a problem with the c++ datalayer client example. When I build the snap and run it on the virtual ctrlx core I can write data to the datalayer. But when I try the sample app on the core itself then I get the message DL_CLIENT_NOT_CONNECTED. Addationally when the app is installed I can't see the data layer anymore. Is there some sort of security that blocks the client access to the datalayer, I find it strange that the sample works on the virtual core but not on the real core.

JLG_War_1-1646642143870.png

Thanks in advance

 

5 REPLIES 5

nickH
Community Moderator
Community Moderator

Hello, 

the samples work fine for me, on ctrlX CORE and ctrlX COREvirtual. 

Have you installed the sdk-cpp-alldata sample first? And are you sure your CORE is in operation mode? 

Please have a look at Apps and check if you can switch to Operation mode. 

nickH_0-1646648094887.png

If you can see the possibility to switch to service mode, your CORE is in Operation mode. On the other hand, if the button says "Operation mode" your control is in service mode.  

 

Best regards, 

Nick

JLG_War
Established Member

Yes I've installed the necesarry apps en the core is in operation mode. After a bit more searching I found a difference between my core and the virtual core. And that is that I don't have a system/root user. This is the only thing that is different between my real core and the virtual core.

CodeShepherd
Community Moderator
Community Moderator

The root user does not have any impact on the examples of the SDK. But beware when you are connected via a tcp communication you have to add a fitting IP, username and password to your application code. Only on DL_IPC_AUTO, what should be standrad in the all data provider example, it works without.

SDK connection to Data LayerSDK connection to Data Layer

Oke but what I don't understand is why the sample code is working on the virtual core but not on the real core, there must be something that is different. If I look at the log messages then the communication that is used is the DL_IPC. Is there something in the sample code that I need to change to make it work on the real core or should the sample code work on the real core without changing something in the code?

nickH
Community Moderator
Community Moderator

Please have a look at the variable "_connectionClient" (line 22 of datalayerclient.h)  

2022-03-07_15h32_37.png

 

This connection string defines a tcp connection to the Data Layer of the localhost of the control. It contains the username and the password of the control (both "boschrexroth"). This connection only works at your control without any changes, if you use the same password and username. 

If you have a different username or password, you can either change the default "boschrexroth:boschrexroth" of the tcp string to your username and password. Or you can use the connection with DL_IPC_AUTO, then you don't have to worry about usernames or passwords.

 

std::string _connectionClient =  DL_IPC_AUTO;

 

 

Here you can access further information about the connection types of clients (and providers).

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