Skip to main content
12-Amethyst
November 7, 2017
Solved

How to diable C# SDK gateway mode

  • November 7, 2017
  • 7 replies
  • 3544 views

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?

Best answer by 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.

7 replies

5-Regular Member
November 7, 2017

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

zhuwenxi12-AmethystAuthor
12-Amethyst
November 7, 2017

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.

5-Regular Member
November 7, 2017

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

zhuwenxi12-AmethystAuthor
12-Amethyst
November 7, 2017

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

5-Regular Member
November 7, 2017

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

zhuwenxi12-AmethystAuthorAnswer
12-Amethyst
November 9, 2017

'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.

5-Regular Member
November 9, 2017

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