6 posts / 0 new
Last post
tthayer
Device ID

I am trying to ping my kit in terminal via:

java -jar sdkcoapclient-1.0.0-SNAPSHOT.one-jar.jar --conf coap.json

Contents of coap.json are below:

{     "proxyHost": "api.coap-test.developer.ssni.com",     "proxyPort": "5683",     "clientPort": "6000",     "method": "GET",     "timeout": "30",     "clientId": "<MyClientID",     "clientSecret": "MySecret",     "devices": [         {             "deviceId": "4beb14f7-5624-41fa-84c7-90f27a2bbd95",             "deviceHost": "SSN001350050047dd8e.shared-starfish-test-install.eng.ssnsgs.net",             "devicePort": "5683",             "devicePath": "/",         }     ] }

Unfortunately this doesnt seem to be returing a ping.  The device ID I got from following the Starfish Data Platform tutorial video and creating my own solution name and registering a device.  However on the platform is this message:

  • Devices purchased via the development portal will be part of the solution named sandbox

If I try to get all devices from the API with that solution name I receive response code 404 with response body 

{ "status": "NotFound", "message": "The requested resource was not found." }

What are people using for their Device ID? Or maybe my error is somewhere else?

tthayer
Any suggestions on this?

Any suggestions on this?

tthayer
Check the client-id and client-secret

Hi Sai. Can you share the json you used to get your CoAP session? Make sure your client-id and client-secret are correct (they are not set in your ping json). Did you get a "created" response on the session request?

Thanks - Bob

tthayer
Output

This actually looks like it was successful but im not 100% sure.

 

sdacunto-osx:target sdacunto$ java -jar sdkcoapclient-1.0.2-SNAPSHOT.one-jar.jar --conf coap.json

2017-05-04 12:15:19,848 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf proxyHost: api.coap-test.developer.ssni.com

2017-05-04 12:15:19,848 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf proxyPort: 5683

2017-05-04 12:15:19,849 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf clientPort: 6000

2017-05-04 12:15:19,849 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf method: GET

2017-05-04 12:15:19,849 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf timeout: 30

2017-05-04 12:15:19,849 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf clientId: 4ddac307-54fe-458e-a9d9-91131b0155cc

2017-05-04 12:15:19,849 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf clientSecret: +PL3nsKv9WksrzA66UA+6ABVhqJUqgSo3aZwtGGjqeaN62HvAr8F+Q

2017-05-04 12:15:19,850 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf deviceId: 4beb14f7-5624-41fa-84c7-90f27a2bbd95

2017-05-04 12:15:19,850 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf deviceHost: SSN001350050047dd8e.shared-starfish-test-install.eng.ssnsgs.net

2017-05-04 12:15:19,850 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf devicePort: 5683

2017-05-04 12:15:19,850 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf devicePath: /sensor/arduino/temp

2017-05-04 12:15:19,850 | main                             | OptionsArgumentsWrapper             | DEBUG | Conf deviceQuery: sens

2017-05-04 12:15:20,105 | SDKCoAPClient I/O Worker #1      | ClientOutboundReliabilityHandler    | DEBUG | HANDLE OUTBOUND MESSAGE: [Header: (V) 1, (T) CON (0), (TKL) 8, (C) GET (1), (ID) -1 | (Token) 0xB575DB9F2E414075 | Options: (No. 23) 3 (No. 35) coap://SSN001350050047dd8e.shared-starfish-test-install.eng.ssnsgs.net:5683/sensor/arduino/temp?sens (No. 124) <empty> | Content: <no content>]

2017-05-04 12:15:20,107 | SDKCoAPClient I/O Worker #1      | ClientOutboundReliabilityHandler    | INFO  | Set message ID to 46271

2017-05-04 12:15:20,108 | SDKCoAPClient I/O Worker #1      | ClientOutboundReliabilityHandler    | DEBUG | Scheduled transmission #2 with delay 2710 ms (Remote Socket: api.coap-test.developer.ssni.com/10.59.200.171:5683, message ID: 46271).

2017-05-04 12:15:20,108 | SDKCoAPClient I/O Worker #1      | ClientOutboundReliabilityHandler    | DEBUG | Scheduled transmission #3 with delay 8639 ms (Remote Socket: api.coap-test.developer.ssni.com/10.59.200.171:5683, message ID: 46271).

2017-05-04 12:15:20,109 | SDKCoAPClient I/O Worker #1      | ClientOutboundReliabilityHandler    | DEBUG | Scheduled transmission #4 with delay 19437 ms (Remote Socket: api.coap-test.developer.ssni.com/10.59.200.171:5683, message ID: 46271).

2017-05-04 12:15:20,109 | SDKCoAPClient I/O Worker #1      | ClientOutboundReliabilityHandler    | DEBUG | Scheduled transmission #5 with delay 38588 ms (Remote Socket: api.coap-test.developer.ssni.com/10.59.200.171:5683, message ID: 46271).

2017-05-04 12:15:22,820 | SDKCoAPClient I/O Worker #3      | SdkCallback                         | INFO  | Retransmission #1

2017-05-04 12:15:22,820 | SDKCoAPClient I/O Worker #3      | ClientOutboundReliabilityHandler    | DEBUG | Finished transmission #1: [Header: (V) 1, (T) CON (0), (TKL) 8, (C) GET (1), (ID) 46271 | (Token) 0xB575DB9F2E414075 | Options: (No. 23) 3 (No. 35) coap://SSN001350050047dd8e.shared-starfish-test-install.eng.ssnsgs.net:5683/sensor/arduino/temp?sens (No. 124) 0xB602C1D5 | Content: <no content>]

2017-05-04 12:15:28,748 | SDKCoAPClient I/O Worker #0      | SdkCallback                         | INFO  | Retransmission #2

2017-05-04 12:15:28,748 | SDKCoAPClient I/O Worker #0      | ClientOutboundReliabilityHandler    | DEBUG | Finished transmission #2: [Header: (V) 1, (T) CON (0), (TKL) 8, (C) GET (1), (ID) 46271 | (Token) 0xB575DB9F2E414075 | Options: (No. 23) 3 (No. 35) coap://SSN001350050047dd8e.shared-starfish-test-install.eng.ssnsgs.net:5683/sensor/arduino/temp?sens (No. 124) 0xB602C1D5 | Content: <no content>]

2017-05-04 12:15:39,548 | SDKCoAPClient I/O Worker #0      | SdkCallback                         | INFO  | Retransmission #3

2017-05-04 12:15:39,548 | SDKCoAPClient I/O Worker #0      | ClientOutboundReliabilityHandler    | DEBUG | Finished transmission #3: [Header: (V) 1, (T) CON (0), (TKL) 8, (C) GET (1), (ID) 46271 | (Token) 0xB575DB9F2E414075 | Options: (No. 23) 3 (No. 35) coap://SSN001350050047dd8e.shared-starfish-test-install.eng.ssnsgs.net:5683/sensor/arduino/temp?sens (No. 124) 0xB602C1D5 | Content: <no content>]

tthayer
Not Working

Nevermind, just duplicated the same output with my device unplugged so I know its not a response from my device. Actually my minAP has constant fast blink so I dont think my milli is even joining the network.