Skip to content

Populate Modem object in BootNotificationRequest for OCPP 2.0.1 #1172

@biubiuzhang

Description

@biubiuzhang

OCPP Version

OCPP2.0.1

Describe the problem

Currently, the BootNotificationRequest in libocpp does not populate the Modem object within the ChargingStation structure, even when ICCID and IMSI values are configured in the device model.

According to the OCPP 2.0.1 specification, the ChargingStation type includes an optional modem field of type Modem, which contains:

  • iccid (optional) - Integrated Circuit Card Identifier of the modem's SIM card
  • imsi (optional) - International Mobile Subscriber Identity of the modem's SIM card

For charging stations using cellular connectivity, this modem information is valuable for:

  • Remote SIM management and tracking
  • Network diagnostics and troubleshooting
  • Asset identification and inventory management

Currently, even if ICCID and IMSI are defined in ControllerComponentVariables, they are not included in the boot notification sent to the CSMS.

Describe your solution

Modify Provisioning::boot_notification_req() in lib/ocpp/v2/functional_blocks/provisioning.cpp to:

  1. Read ICCID and IMSI values from the device model using get_optional_value<std::string>()
  2. If either value is present, create a Modem object and populate the available fields
  3. Attach the Modem object to charging_station.modem
    This approach:
  • Maintains backward compatibility (modem is only added if values exist)
  • Follows existing patterns in the codebase for optional field population
  • Requires no changes to the device model schema (ICCID and IMSI are already defined in ControllerComponentVariables)

Additional context

  • The ICCID and IMSI variables are already defined in ControllerComponentVariables but were not being utilized in boot notifications
  • This is particularly useful for deployments using 4G/LTE cellular modems where SIM identification is important for fleet management
  • Reference: OCPP 2.0.1 Part 2 - Appendices, Section "ChargingStationType" and "ModemType"
  • This feature request is contributed by Enteligent Inc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions