Skip to content

Use CloudTokens instead of deviceId for communication#1

Open
Clindbergh wants to merge 2 commits intoDurandA:masterfrom
Clindbergh:master
Open

Use CloudTokens instead of deviceId for communication#1
Clindbergh wants to merge 2 commits intoDurandA:masterfrom
Clindbergh:master

Conversation

@Clindbergh
Copy link
Copy Markdown

device.id is not consistent across multiple connections at different times.

We suggest to use the Thingy:52 cloud token instead (see Nordic Thingy:52 v2.1.0 Firmware Architecture). This is initially unset. If we discover that the token is empty, we assign it a random token. The token is composed of the current millisecond since epoch and a random number and can therefore considered to be unique. When a new thingy connects, we fetch the cloud token when the connection is opened. All request to mqtt then use the cloud token instead of the device id.

The GUI still shows the device id instead of the cloud token which should probably be fixed. The functionality is tested and works so far.

@DurandA
Copy link
Copy Markdown
Owner

DurandA commented Nov 16, 2018

Thanks for the PR. Since I want this proxy to work with any GATT device (not only Thingy:52), I am looking for a more generic solution.

I would prefer to use the Eddystone URL with the device.id as a fallback if the characteristic is unavailable. Are you interested in making such contribution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants