Arduino ID Manager Protocol
This protocol helps ID management. Every device's ID is stored. Every ID has a
position in the ID Manager. The ID Manager's ID is in the first position.
How to test ID Manager on Arduino Mega?
Arduino codes are included.
I. "Welcome" event from microcontroller
Example
c=welcome&id=qwertz&type=OzIDManager&pos=1&t=3
Parameters
Parameter |
Type |
Range |
Functionality |
c |
String |
"welcome" |
Identifies the welcome message. |
id |
String |
6 characters (numbers, uppercase and lowercase characters) |
The ID of the device which is chose by the microcontroller. |
type |
String |
"OzIDManager" |
Determines the type of the device. |
pos |
Byte |
0-255 |
Determines the position of the device on the list of the ID manager of the microcontroller.
Please make sure there are no other devices in the same position. |
t |
Byte |
0-255 |
Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again. |
II. Commands to microcontroller
"Get ID" command
With this command you can get the ID of a device on a given position.
Example
c=getid&pos=1&t=0&id=ah35q1
Parameters
Parameter |
Type |
Range |
Functionality |
c |
String |
"getid" |
Identifies the command. |
pos |
Byte |
0-255 |
This is the position of the searched device inside the ID manager.
|
t |
Byte |
0-255 |
Counts the number of commands sent. Counts from 0 to 255 then from 0 again. |
id |
String |
6 characters (numbers, uppercase and lowercase characters) |
The ID of the IDManager. |
Response
c=getid_resp&pos=1&devid=qwertz&id=ah35q1&t=3
Parameters
Parameter |
Type |
Range |
Functionality |
c |
String |
"getid_resp" |
Identifies the response. |
pos |
Byte |
0-255 |
This is the position of the searched device inside the ID manager. |
devid |
String |
6 characters |
This is the ID of the searched device inside the ID manager. |
id |
String |
6 characters (numbers, uppercase and lowercase characters) |
The ID of the IDManager. |
t |
Byte |
0-255 |
Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again. |
"Set ID" command
With this command you can add or rewrite the ID of a device on a given position.
Example
c=setid&pos=1&devid=jz6o32&t=1&id=ah35q1
Parameters
Parameter |
Type |
Range |
Functionality |
c |
String |
"setid" |
Identifies the command. |
pos |
Byte |
0-255 |
This is the position of the searched device inside the ID manager. |
devid |
String |
6 characters |
The device will get this new ID. |
t |
Byte |
0-255 |
Counts the number of commands sent. Counts from 0 to 255 then from 0 again. |
id |
String |
6 characters (numbers, uppercase and lowercase characters) |
The ID of the IDManager. |
Response
c=setid_resp&pos=1&devid=jz6o32&id=ah35q1&t=4
Parameters
Parameter |
Type |
Range |
Functionality |
c |
String |
"setid_resp" |
Identifies the response. |
pos |
Byte |
0-255 |
This is the position of the searched device inside the ID manager. |
devid |
String |
6 characters |
This is the ID of the searched device inside the ID manager. |
id |
String |
6 characters (numbers, uppercase and lowercase characters) |
The ID of the IDManager. |
t |
Byte |
0-255 |
Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again. |
"Clear ID" command
With this command you can delete the ID from a given position. A new ID will be generated if arduino restarted.
Example
c=clearid&pos=2&t=2&id=sf6z34
Parameters
Parameter |
Type |
Range |
Functionality |
c |
String |
"clearid" |
Identifies the command. |
pos |
Byte |
0-255 |
This is the position of the searched device inside the ID manager. |
t |
Byte |
0-255 |
Counts the number of commands sent. Counts from 0 to 255 then from 0 again. |
id |
String |
6 characters (numbers, uppercase and lowercase characters) |
The ID of the IDManager. |
Response
c=clearid_resp&pos=2&id=sf6z34&t=5
Parameters
Parameter |
Type |
Range |
Functionality |
c |
String |
"clearid_resp" |
Identifies the response. |
pos |
Byte |
0-255 |
This is the position of the searched device inside the ID manager. |
id |
String |
6 characters (numbers, uppercase and lowercase characters) |
The ID of the IDManager. |
t |
Byte |
0-255 |
Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again. |
III. Event from microcontroller
More information