3.2 Boot Notification
The BootNotification message in OCPP 1.6J is sent by a charge point to the central system when it powers up or reboots. It shares important details such as the model, vendor and serial number, allowing the central system to recognize and connect with the device. The central system then responds with an acknowledgment, confirming the charge point’s registration and setting a heartbeat interval to ensure ongoing communication. This message is essential for establishing the charge point’s initial connection.
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
SendBootNotificationRequest |
This function sends the BootNotification request packet. It forms the OCPP packet and sends it to the server. It also handles error checking for the WebSocket connection. |
(void) |
BOOTNOTIFICATION_SUCCESS BOOTNOTIFICATION_FAILED |
Example:
case TRIGGER_MESSAGE_TYPE_BOOT_NOTIFICATION:
(void)SendBootNotificationRequest();
break;
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
GetBootNotificationInterval |
This function copies the Boot Notification response parameters into the provided structure. |
void |
void |
Example:
uint32_t bootNotificationInterval = (uint32_t)GetBootNotificationInterval();
switch (responsecode)
{
case BOOTNOTIFICATION_RESPONSE_FAILED:
{
LogDebug("APP_LOG", " \nBoot Notification Response Failed BOOTNOTIFICATION_RESPONSE_FAILED\n\n\n");
LogDebug("APP_LOG", " \nBootNotification Failed Retry interval will be: %u\n\r", bootNotificationInterval);
StartBootNotificationTimer(bootNotificationInterval);
globalOcppCoreParams.validBootnotification = BOOT_NOTE_NOT_VALID;
}
break;
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
SetChargeBoxSerialNumber |
This function assigns the provided serial number value to the specified charge point within the Boot Notification request. |
char* value |
void |
Example:
if (cJSONHasObjectItem(ChP, "chargeBoxSerialNumber"))
{
cJSON *item = cJSONGetObjectItem(ChP, "chargeBoxSerialNumber");
if (cJSONIsString(item) && (item->valuestring != NULL))
{
SetChargeBoxSerialNumber(item->valuestring);
OCPPLogMessage(LOG_DEBUG, LOG_SENDING, "Charge Box Serial Number set Successfully\n\r");
}
}
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
SetChargePointModel |
This function assigns the provided model value to the specified charge point within the Boot Notification request. |
char* value |
void |
Example:
if (cJSONHasObjectItem(ChP, "chargePointModel"))
{
cJSON *item = cJSONGetObjectItem(ChP, "chargePointModel");
if (cJSONIsString(item) && (item->valuestring != NULL))
{
SetChargePointModel(item->valuestring);
OCPPLogMessage(LOG_DEBUG, LOG_SENDING, "Charge Point Model set Successfully\n\r");
}
}
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
SetChargePointSerialNumber |
This function sets the serial number for the charge point within the Boot Notification request. |
char* value |
void |
Example:
if (cJSONHasObjectItem(ChP, "chargePointSerialNumber"))
{
cJSON *item = cJSONGetObjectItem(ChP, "chargePointSerialNumber");
if (cJSONIsString(item) && (item->valuestring != NULL))
{
SetChargePointSerialNumber(item->valuestring);
OCPPLogMessage(LOG_DEBUG, LOG_SENDING, "Charge Point Serial Number set Successfully\n\r");
}
}
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
SetChargePointVendor |
This function sets the vendor's name or identifier for the charge point within the Boot Notification request. |
char* value |
void |
Example:
if (cJSONHasObjectItem(ChP, "chargePointVendor"))
{
cJSON *item = cJSONGetObjectItem(ChP, "chargePointVendor");
if (cJSONIsString(item) && (item->valuestring != NULL))
{
SetChargePointVendor(item->valuestring);
OCPPLogMessage(LOG_DEBUG, LOG_SENDING, "Charge Point Vendor set Successfully\n\r");
}
}
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
SetFirmwareVersion |
This function sets the firmware version of the charge point in the Boot Notification request. |
char* value |
void |
Example:
if (cJSONHasObjectItem(ChP, "firmwareVersion"))
{
cJSON *item = cJSONGetObjectItem(ChP, "firmwareVersion");
if (cJSONIsString(item) && (item->valuestring != NULL))
{
SetFirmwareVersion(item->valuestring);
OCPPLogMessage(LOG_DEBUG, LOG_SENDING, "Firmware Version set Successfully\n\r");
}
}
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
SetIccid |
This function sets the ICCID, which is a unique identifier for the SIM card, in the Boot Notification request. |
char* value |
void |
Example:
if (cJSONHasObjectItem(ChP, "iccid"))
{
cJSON *item = cJSONGetObjectItem(ChP, "iccid");
if (cJSONIsString(item) && (item->valuestring != NULL))
{
SetIccid(item->valuestring);
OCPPLogMessage(LOG_DEBUG, LOG_SENDING, "ICCID set Successfully\n\r");
}
}
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
SetImsi |
This function sets the IMSI, a unique identifier associated with the mobile subscriber. |
char* value |
void |
Example:
if (cJSONHasObjectItem(ChP, "imsi"))
{
cJSON *item = cJSONGetObjectItem(ChP, "imsi");
if (cJSONIsString(item) && (item->valuestring != NULL))
{
SetImsi(item->valuestring);
OCPPLogMessage(LOG_DEBUG, LOG_SENDING, "IMSI set Successfully\n\r");
}
}
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
SetMeterSerialNumber |
This function sets the unique serial number of the meter associated with the charge point in the Boot Notification request. |
char* value |
void |
Example:
if (cJSONHasObjectItem(ChP, "meterSerialNumber"))
{
cJSON *item = cJSONGetObjectItem(ChP, "meterSerialNumber");
if (cJSONIsString(item) && (item->valuestring != NULL))
{
SetMeterSerialNumber(item->valuestring);
OCPPLogMessage(LOG_DEBUG, LOG_SENDING, "Meter Serial Number set Successfully\n\r");
}
}
| API Syntax | Description | Input Params | Return Value |
|---|---|---|---|
|
SetMeterType |
This function sets the type of the meter associated with the charge point in the Boot Notification request. |
char* value |
void |
Example:
if (cJSONHasObjectItem(ChP, "meterType"))
{
cJSON *item = cJSONGetObjectItem(ChP, "meterType");
if (cJSONIsString(item) && (item->valuestring != NULL))
{
SetMeterType(item->valuestring);
OCPPLogMessage(LOG_DEBUG, LOG_SENDING, "Meter Type set Successfully\n\r");
}
}
| Syntax | Description | Constants/Members |
|---|---|---|
|
BOOTNOTIFICATIONERROR_T |
This enum defines the possible error codes that can be returned by the Boot Notification functions. |
BOOTNOTIFICATION_SUCCESS BOOTNOTIFICATION_FAILED BOOTNOTIFICATION_RESPONSE_FAILED BOOTNOTIFICATION_RESPONSE_ACCEPT_FAILED BOOTNOTIFICATION_RESPONSE_SUCCESS BOOTNOTIFICATION_RESPONSE_PENDING BOOTNOTIFICATION_RESPONSE_REJECTED |
|
REGISTRATIONSTATUS |
This structure holds the values received in the Boot Notification response, including status, current time and interval. |
REGISTRATION_STATUS_ACCEPTED REGISTRATION_STATUS_PENDING, REGISTRATION_STATUS_REJECTED |
|
BOOTNOTIFICATIONCONFIG_T |
Status of the Boot Notification Current time from the response Interval for the next Boot Notification or Heartbeat |
REGISTRATIONSTATUS status dateTime currentTime uint32_t interval |
|
RX_BOOTNOTIFICATION |
Values from this central system are stored in this structure. |
|
