The Open Charging Protocol (OCPP) can provide a unified communication solution between charging stations and any central management system. Based on this protocol, the charging pile client and server were built through C language coding and debugging in the Ubuntu system under embedded Linux, and the corresponding file configuration was performed. Finally, based on the Steve server, the connectivity between the two ends and the real-time information response was well achieved through Web Sockets technology, which provides a reference for the management and development model of electric vehicle charging piles.

Electrification is currently the most popular trend in the development of automobiles worldwide, and the infrastructure needed to support the development of new energy vehicles includes charging stations. However, the openness of communication protocols is just as much of a problem in the realm of electric cars as charging stations. Because only openness can support the switching of services between different charging networks without changing charging sites and can support the operation and interconnection of services between different charging networks.
1. Introduction to OCPP 1.6
OCPP is the abbreviation of Open Charging Protocol, and its Chinese name is Open Charging Protocol. It is an open communication standard introduced by the Open Charging Alliance, mainly used to solve the communication difficulties between dedicated charging networks. OCPP supports communication between charging stations and the supplier’s central system (CSM).
The core advantages of OCPP are:
1) It can well support the owners of charging points to use flexible methods to select and switch their network operators, which can improve the utilization rate of charging points and avoid idle charging points;
2) The basic function is to provide communication between charging points and network service providers, but it can also provide services for the power grid;
3) It realizes the provision of a unified information interface at charging points and consistent roaming charging services, which can directly encourage users to buy electric vehicles.

2. Charging station client construction
Basic model of charging station and central system: A three-layer model based on central system → charging station → power supply system. The charging station can be regarded as a physical system for charging electric vehicles. A charging station can have one or more electric vehicle power supply system devices. The central system will reply to the charging station’s request for the charging station to begin notifying when it receives it. The response will include the central system’s current time, interval, and status.
Three primary categories of status exist: (1) Accepted; (2) Pending; and (3) Refused. When the central system responds with an “Accepted” start notification response, the charging station will adjust the heartbeat interval according to the interval of the response field, and it is recommended that it always synchronizes its internal time with the current time of the central system provided. If the central system returns a status of ” Rejected”, the charging station will not send any OCPP messages to the central system until the above retry interval expires. During this time interval, the charging point may not be reachable from the central system. For example, it can close its communication channel or shut down its communication hardware. The central system can also close the communication channel to free up system resources. When “rejected”, the charging station will not respond to any messages initiated by the central system.
3. Server-side configuration and installation
First, make sure the time zone of the MYSQL server is the same as Steve’s time zone. OCPP uses UTC, and the default setting in Steve is UTC. To set the time zone in MYSQL.
Before running Steve, some basic configurations are required, as follows:
1) Configure the database;
2) Configure the correct IP address from the local server;
3) Configure the web interface credentials

4. Interaction Implementation
According to the server built above, log in to the page. To monitor the charging point’s data and status and manage the central system to send messages to the charging point, the administrator mostly uses this page to log in. After entering the login page, register the charging station so that the client can connect to the server. Run the command in the Ubuntu terminal, and the OCPP client is successfully connected.
The charging station sends a heartbeat request to the server, and the server replies to the client with the current time to confirm that the connection between the two ends is normal. This process is quite similar to that of sending a start notification request between the client and the server. The client sends the server a heartbeat request, which the server can promptly receive, to confirm the connectivity and real-time performance of both ends.
In conclusion, this article briefly introduces the main functions of the OCPP protocol and its role and influence in the charging pile industry. Based on the OCPP1.6 protocol, the client and server of the charging station are constructed. Based on the Steve server, the connection between the two ends is realized through Web Sockets technology. After testing, the information interaction between the two is well realized, which provides a basis and ideas for the subsequent implementation of various functions covered by OCPP1.6.