A POC/Mock for an IOT gateway based on FreeRTOS and AngularJs SPA client
The iot console application is a modified version of the freertos V9.0.0 FreeRTOS_Plus_TCP_and_FAT
The IOT application exposes a simple REST API that is used by the SPA for the purpose of developing the UI while hardware is being developed
Retrives the gateways configuration
{
"name" : "",
"nickname" : ""
}
name is the name that will be used by the gateway when requesting an IP address via DNS
nickname is the name that will be used by the gateway when requesting an IP address via DNS
Can be used to update either the devicename or nickname
{
"name" : "",
"nickname" : ""
}
Retrieves the devices network configuration
{
"ip": [192,168,1,128],
"networkmask": [255,255,255,0],
"gateway": [192,168,1,1],
"dns": [192,168,1,1],
"mac": [0,17,34,51,68,72]
}
ip is the IP address that was objained via DNS networkmask is the name that will be used by the gateway when requesting an IP address via DNS gateway is the gateway address dns is the IP address of the DNS service mac the mac address of the device
Retrives the radio configuration
{
"radios":
[
{
"enabled": true,
"faulted": false,
"type": 0,
"settings" :
{
}
},
{
"enabled": true,
"faulted": false,
"type": 1,
"settings" :
{
}
}
]
}
enabled indicates if the radio is enabled, i.e. powered on faulted indicates if the radio has faulted, i.e. indicates a power fault type indicates the type of radio settings these are the settings for the radio and will be different dependant on the radio type
Retrives a specified radios configuration. {0} is the Id of the radio from 0 ~ 3
{
"enabled": true,
"faulted": false,
"type": 0,
"settings": {}
}
Retrives a specified radios settings. {0} is the Id of the radio from 0 ~ 3
The settings will be different which is determined by the radio type
Updates the radios configuration.
{
"enabled": true/false,
"faulted": true/false,
"type" : 0
}
enabled enables or disables the radio faulted setting to false clears the power fault and reenables type sets the radios type, this action will disable and enable the radio
Update the radios settings, specified by {0} in the route