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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to diable C# SDK gateway mode

zhuwenxi
12-Amethyst

How to diable C# SDK gateway mode

I use C# EMS sdk to make my device as a remote thing. SO I create a ConnectedThingClient object and VirtualThing object to connect to Thingworx server and it works. But there're two remote thing show Thingworx remote things Unbound list. One is my thing, the other is the gateway.

How can I disable the sdk gateway as a remote thing?

ACCEPTED SOLUTION

Accepted Solutions
zhuwenxi
12-Amethyst
(To:zhuwenxi)

'config.json' is not part of .NET EMS sdk.

But I finally find the solution.

First, do not set a name to clientConfigurator instance, kepp clientConfigurator.Name to empty.

second, set clientConfigurator's type to empty, clientConfigurator.setType("").

After this, the client do not bind himselef as a thing.

View solution in original post

7 REPLIES 7
mnarang
17-Peridot
(To:zhuwenxi)

Zhu Wenxi​ - What do you exactly mean by disabling the gateway ? You don't want to see the gateway at all ?
I tried this but on some other SDK and hoping this part is same in all the SDK .So for example in JAVA SDK "ClientConfigurator" class is responsible for all these settings and even you don't set the sdk gateway name while connecting it to ThingWorx ,still gateway will appear in remote thing with a default name .So as per my knowledge we can not remove the gateway ,still can you elaborate about the use case ,why do you want to to remove/disable gateway from Remote thing ?


Thanks ,

Mukul Narang

zhuwenxi
12-Amethyst
(To:mnarang)

Yes, I just don't want to see the gateway. If I deploy 100 sdk program to 100 devices, I will have 200 remote things in unbound list. It's not reasonable.

supandey
19-Tanzanite
(To:zhuwenxi)

Zhu Wenxi​ just for the clarity are you using both C EDGE SDK and EMS? From the description it looks like you are using EMS if so do you have gateway enabled in the auto-bind section something like this?

"auto_bind": [{

"name": "GatewayEnabledThing",

"gateway": true

}],

With gateway property set to false it shouldn't create ephemeral GatewayThing

zhuwenxi
12-Amethyst
(To:supandey)

I use EMS .NET SDK, not C SDK. And I can not find any setting for that.

supandey
19-Tanzanite
(To:zhuwenxi)

Zhu, this property is in the config.json located in \etc folder of EMS

zhuwenxi
12-Amethyst
(To:zhuwenxi)

'config.json' is not part of .NET EMS sdk.

But I finally find the solution.

First, do not set a name to clientConfigurator instance, kepp clientConfigurator.Name to empty.

second, set clientConfigurator's type to empty, clientConfigurator.setType("").

After this, the client do not bind himselef as a thing.

supandey
19-Tanzanite
(To:zhuwenxi)

Zhu Wenxi​ it sounds like you are not using EMS after all (may be you have your own custom EMS?). You're likely only working with .NET SDK else config.json would be available to you for editing.

Anyhow, good to know that the issue is now resolved

Announcements


Top Tags