This diagram shows the main objects and requests between them::
On the left: the Keon WiFi device. It receives commands and sends back its status updates and button-press events.
On the right: the client application (mobile, web, or desktop). It sends commands to the Keon WiFi and shows its statuses to the customer.
At the top: the token-exchange server (OAuth server). This server lets you swap tokens from various providers in order to get an access token for the communications server (CC WS Server).
At the bottom: the communications server (CC WS Server). It provides an isolated, secure connection between the customer’s application and the Keon WiFi device.

The interaction starts when the customer’s application sends a request to the OAuth server:
1. Obtain the Customer Access Token
The process begins when the Web or Mobile Application (Web/Mob App) requests a customer access token from the OAuth server. This token will be used to authenticate and authorize all further interactions on behalf of the customer.
2. Request the Registration Token
Next, the Web/Mob App asks for a registration token, which will later be transferred to the device. This token typically includes essential details, such as server addresses.
3. Connect to the Communication Server
Using the customer’s access token, the Web/Mob App establishes a Socket.io connection with the Communication Server (CC WS Server). It then sends a status request to discover any connected devices. The responses from these devices update the Web/Mob App’s interface. If no devices are found, proceed to the next stage.
4. Begin Device Provisioning
Provisioning the device starts via Bluetooth, where the following data is transmitted to the device:
Here, the WiFi credentials specify the nearby 2.4 GHz network that the device should connect to for internet access. The registration token is a JWT containing:
5. Configure the Device for Internet Access
Using the data received during provisioning, the device connects to the specified 2.4 GHz Wi-Fi network. Once online, it exchanges its registration token for a device-specific access token from the OAuth server, whose address is included in the registration token.
6. Connect the Device to the Communication Server
With the newly acquired device access token, the device establishes a connection to the Communication Server (CC WSS), using the address also provided in the registration token.
7. Exchange Data via Socket.io
After connecting, the device uses the Socket.io channel to periodically send the following information:
Device Status (for example):
"KEON": {
"ble_address": "00:00:00:00:00:00",
"serial_number": "",
"battery_status": 100,
"status_package": "V1.4",
"encoder_pos": 2,
"motor_speed": 0,
"wifi_strength": 100,
"intensity": 8,
"stroker_level": 4,
"firmware_version": "V2.3.2",
"status_period": 100,
"error_code": 0
}
User Activity: For instance, it can report when physical buttons on the device are pressed.
In addition, the device remains ready to receive commands—such as adjusting the slider position, modifying motion intensity, switching operational modes, and more.