A BMC communication method, system, device and storage medium

By creating a proxy server and client between BMC and HOST, and establishing connections using sockets and KCS interfaces, the problem of UDS communication between BMC and HOST cannot be realized between the different systems of BMC and HOST is solved, efficient inter-process communication is achieved, and the development process is simplified.

CN115914340BActive Publication Date: 2025-05-02SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211375169.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-04
Publication Date
2025-05-02
Estimated Expiration
2042-11-04

AI Technical Summary

Technical Problem

In the prior art, it is difficult to realize UDS communication between a BMC and a HOST because the prerequisite for UDS communication is that two processes must be on one system, while BMC and HOST are different systems and UDS communication cannot be realized.

Method used

By creating server and proxy clients/server in the host and BMC, establishing connections using sockets and KCS interfaces, UDS socket communication between BMC and HOST is achieved.

Benefits of technology

It provides a common and mature inter-process communication method between BMC and HOST, simplifies application developers' calls to KCS drivers, improves development efficiency, and facilitates message, tool and log exchange between BMC and HOST.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914340B_ABST
    Figure CN115914340B_ABST
Patent Text Reader

Abstract

The present invention discloses a BMC communication method, comprising the following steps: creating a server and a proxy client in a host and creating a client and a proxy server in a BMC; establishing a connection between the server and the proxy client in the host through a socket; establishing a connection between the proxy client in the host and the proxy server in the BMC through a KCS interface; establishing a connection between the proxy server and the client in the BMC through a socket; communicating between the BMC and the host through the server and the proxy client in the host and the client and the proxy server in the BMC. The present invention also discloses a system, a computer device, and a readable storage medium. The solution proposed in the present invention abstracts a layer of UDS proxy, and application developers do not need to consider how to call complex KCS drivers. They only need to implement simple UDS sockets to perform inter-process communication, improve development efficiency, and more conveniently exchange messages, tools, and logs between the BMC and the HOST.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of servers, and in particular to a BMC communication method, system, device and storage medium. Background Art

[0002] Currently, servers basically contain two systems, the arm linux system of the BMC and the x86 linux system of the HOST. The two are different systems. The two processes on the BMC and the HOST cannot realize UDS communication, because the prerequisite for UDS communication is that the two processes must be on the same system. At present, most of the process communication between the BMC and the HOST is through the system interface, and the communication method is to use KCS (system interface) to call the KCS driver to send and receive data, but it is very inconvenient for application developers. There is no more common and mature method for inter-process communication between the BMC and the HOST. Summary of the invention

[0003] In view of this, in order to overcome at least one aspect of the above problems, an embodiment of the present invention proposes a BMC communication method, comprising the following steps:

[0004] Create a server and proxy client in the host and create a client and proxy server in the BMC;

[0005] Establishing a connection between the server and the proxy client in the host through a socket;

[0006] Establishing a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface;

[0007] Establishing a connection between the proxy server and the client in the BMC via a socket;

[0008] The communication between the BMC and the host is carried out through the server and the proxy client in the host and the client and the proxy server in the BMC.

[0009] In some embodiments, establishing a connection between the server and the proxy client in the host through a socket further includes:

[0010] Using the server to create a socket and create a socket-type file in a preset folder;

[0011] In response to the proxy client detecting that the server has created a socket file in a preset folder, a socket is created and the socket-type file is used to connect to the server.

[0012] In some embodiments, establishing a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface further includes:

[0013] The proxy client calls the KCS interface to send an instruction to the BMC, wherein the instruction carries the file name and path of a socket type file to be created;

[0014] The proxy server creates a socket and creates a socket type file based on the received file name and path.

[0015] In some embodiments, establishing a connection between the proxy server and the client in the BMC through a socket further includes:

[0016] A socket is created on the client and a connection between the proxy server and the client is realized through a socket-type file in the proxy server.

[0017] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a BMC communication system, including:

[0018] Create a module, configured to create a server and proxy client in the host and create a client and proxy server in the BMC;

[0019] A first connection module is configured to establish a connection between the server and the proxy client in the host through a socket;

[0020] A second connection module is configured to establish a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface;

[0021] A third connection module is configured to establish a connection between the proxy server and the client in the BMC through a socket;

[0022] The communication module is configured to communicate between the BMC and the host through the server and the proxy client in the host and the client and the proxy server in the BMC.

[0023] In some embodiments, the first connection module is further configured to:

[0024] Using the server to create a socket and create a socket-type file in a preset folder;

[0025] In response to the proxy client detecting that the server has created a socket file in a preset folder, a socket is created and the socket-type file is used to connect to the server.

[0026] In some embodiments, the second connection module is further configured to:

[0027] The proxy client calls the KCS interface to send an instruction to the BMC, wherein the instruction carries the file name and path of a socket type file to be created;

[0028] The proxy server creates a socket and creates a socket type file based on the received file name and path.

[0029] In some embodiments, the third connection module is further configured to:

[0030] A socket is created on the client and a connection between the proxy server and the client is realized through a socket-type file in the proxy server.

[0031] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer device, including:

[0032] at least one processor; and

[0033] A memory storing a computer program executable on the processor, wherein the processor executes the following steps when executing the program:

[0034] Create a server and proxy client in the host and create a client and proxy server in the BMC;

[0035] Establishing a connection between the server and the proxy client in the host through a socket;

[0036] Establishing a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface;

[0037] Establishing a connection between the proxy server and the client in the BMC via a socket;

[0038] The communication between the BMC and the host is carried out through the server and the proxy client in the host and the client and the proxy server in the BMC.

[0039] In some embodiments, establishing a connection between the server and the proxy client in the host through a socket further includes:

[0040] Using the server to create a socket and create a socket-type file in a preset folder;

[0041] In response to the proxy client detecting that the server has created a socket file in a preset folder, a socket is created and the socket-type file is used to connect to the server.

[0042] In some embodiments, establishing a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface further includes:

[0043] The proxy client calls the KCS interface to send an instruction to the BMC, wherein the instruction carries the file name and path of a socket type file to be created;

[0044] The proxy server creates a socket and creates a socket type file based on the received file name and path.

[0045] In some embodiments, establishing a connection between the proxy server and the client in the BMC through a socket further includes:

[0046] A socket is created on the client and a connection between the proxy server and the client is realized through a socket-type file in the proxy server.

[0047] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are performed:

[0048] Create a server and proxy client in the host and create a client and proxy server in the BMC;

[0049] Establishing a connection between the server and the proxy client in the host through a socket;

[0050] Establishing a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface;

[0051] Establishing a connection between the proxy server and the client in the BMC via a socket;

[0052] The communication between the BMC and the host is carried out through the server and the proxy client in the host and the client and the proxy server in the BMC.

[0053] In some embodiments, establishing a connection between the server and the proxy client in the host through a socket further includes:

[0054] Using the server to create a socket and create a socket-type file in a preset folder;

[0055] In response to the proxy client detecting that the server has created a socket file in a preset folder, a socket is created and the socket-type file is used to connect to the server.

[0056] In some embodiments, establishing a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface further includes:

[0057] The proxy client calls the KCS interface to send an instruction to the BMC, wherein the instruction carries the file name and path of a socket type file to be created;

[0058] The proxy server creates a socket and creates a socket type file based on the received file name and path.

[0059] In some embodiments, establishing a connection between the proxy server and the client in the BMC through a socket further includes:

[0060] A socket is created on the client and a connection between the proxy server and the client is realized through a socket-type file in the proxy server.

[0061] The present invention has one of the following beneficial technical effects: the solution proposed in the present invention implements a new method for using UDS sockets for process communication between BMC and HOST through KCS; from the perspective of application developers, the present invention abstracts a layer of UDS agent, and application developers do not need to consider how to call complex KCS drivers. They only need to implement simple UDS sockets to perform inter-process communication, thereby improving development efficiency and making it more convenient to exchange messages, tools and logs between BMC and HOST. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0063] Figure 1 A flow chart of a BMC communication method provided by an embodiment of the present invention;

[0064] Figure 2 A principle block diagram of a BMC communication method provided by an embodiment of the present invention;

[0065] Figure 3 A server-side startup flow chart provided for an embodiment of the present invention;

[0066] Figure 4 A flowchart after the proxy.client is started provided by an embodiment of the present invention;

[0067] Figure 5 The proxy.server post-startup process provided by the embodiment of the present invention;

[0068] Figure 6 A client startup flow chart provided for an embodiment of the present invention;

[0069] Figure 7 A schematic diagram of the structure of a BMC communication system provided by an embodiment of the present invention;

[0070] Figure 8 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention;

[0071] Fig. 9 A schematic diagram of the structure of a computer-readable storage medium provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0072] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0073] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.

[0074] In the embodiment of the present invention, UDS: unix domain socket, a socket mode of process communication under Linux;

[0075] KCS:Keyboard Controller Style, a bus protocol implemented through LPC (low pin count)

[0076] According to one aspect of the present invention, an embodiment of the present invention provides a BMC communication method, such as Figure 1 As shown, it may include the steps of:

[0077] S1, create a server and proxy client in the host and create a client and proxy server in the BMC;

[0078] S2, establishing a connection between the server and the proxy client in the host through a socket;

[0079] S3, establishing a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface;

[0080] S4, establishing a connection between the proxy server and the client in the BMC through a socket;

[0081] S5, communicating between the BMC and the host through the server and the proxy client in the host and the client and the proxy server in the BMC.

[0082] The solution proposed in the present invention provides a method for simulating UDS process communication between BMC and HOST heterogeneous systems. By using the KCS interface between BMC and HOST, a universal and mature inter-process UDS communication is implemented between BMC and HOST heterogeneous systems, abstracting a message forwarding layer. For application developers, UDS is relatively universal and mature.

[0083] The advantage of this method is that application developers do not need to consider how to use the underlying KCS driver, they only need to develop an APP for upper-level UDS communication, which reduces the difficulty of inter-process program development and the existence of a lightweight communication framework at the abstract layer.

[0084] An abstract layer - message forwarding layer is proposed. In order to encapsulate and shield the underlying interaction, a new proxy.server (proxy server) is created as the proxy process of the BMC client, and a new proxy.client (proxy client) is created as the proxy process of the HOST server. The proxy process exchanges messages through the KCS interface, which is reflected in the upper layer as UDS communication between the server and the client.

[0085] The message forwarding layer mainly uses the KCS interface protocol to forward data. The send_data_to_bmc() and recv_data_to_bmc() functions on the HOST side encapsulate the KCS driver, which can receive data from the BMC and send data to the BMC; the send_data_to_host() and recv_data_to_host() functions on the BMC side also encapsulate the KCS driver, which can receive data from the BMC and send data to the HOST; the specific method is related to the kernel driver implementation method.

[0086] In some embodiments, Figure 2 As shown in the figure, it is the principle diagram of realizing UDS communication between BMC and HOST heterogeneous systems. The key technical point is Figure 2 The message forwarding layer abstracted from the BMC uses the KCS system interface between the BMC and the HOST to implement the abstraction layer.

[0087] In some embodiments, establishing a connection between the server and the proxy client in the host through a socket further includes:

[0088] Using the server to create a socket and create a socket-type file in a preset folder;

[0089] In response to the proxy client detecting that the server has created a socket file in a preset folder, a socket is created and the socket-type file is used to connect to the server.

[0090] Specifically, in the process of using UDS communication, the server starts first and waits for the client to connect. Figure 3 As shown, the server startup process on the HOST side is:

[0091] Pass / tmp / uds_conn / xx.sock to the server and start the server;

[0092] Create a socket with domain AF_UNIX;

[0093] Assign the input parameter xx.sock path to the member sun_path in the sockaddr_un structure; (that is, create a socket type file xx.sock in the / tmp / uds_conn / folder, and this / tmp / uds_conn / folder will also be monitored by proxy.client);

[0094] The Bind function binds the socket;

[0095] Loop to listen for messages sent by the proxy client.

[0096] In some embodiments, establishing a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface further includes:

[0097] The proxy client calls the KCS interface to send an instruction to the BMC, wherein the instruction carries the file name and path of a socket type file to be created;

[0098] The proxy server creates a socket and creates a socket type file based on the received file name and path.

[0099] Specifically, Figure 4 As shown in the figure, after the proxy.client is started, it monitors the / tmp / uds_conn folder. Once a socket type file is created in the folder, it immediately creates a socket with the domain AF_UNIX, and then connects to the server on the HOST side through the file. Then it calls the KCS sending interface, sends instructions to the BMC proxy server, and receives the data returned by the BMC.

[0100] In some embodiments, establishing a connection between the proxy server and the client in the BMC through a socket further includes:

[0101] A socket is created on the client and a connection between the proxy server and the client is realized through a socket-type file in the proxy server.

[0102] Specifically, Figure 5 As shown in the figure, after the proxy.server is started, it will wait for the UDS establishment command sent by the proxy.client. The command contains the name of the socket file to be created. After successfully establishing a UDS server, it returns 0x55 to the proxy.server on the HOST side and waits for the client on the BMC side to connect. Figure 6 As shown in the figure, after the client on the BMC side is started, it will establish a UDS connection with the proxy.server.

[0103] The solution proposed in the present invention implements a new method for process communication between BMC and HOST using UDS socket through KCS; from the perspective of application developers, the present invention abstracts a layer of UDS agent, and application developers do not need to consider how to call complex KCS drivers. They only need to implement simple UDS sockets to perform inter-process communication, thereby improving development efficiency and making it more convenient to exchange messages, tools and logs between BMC and HOST.

[0104] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a BMC communication system 400, such as Figure 6 As shown, including:

[0105] A creation module 401 is configured to create a server and a proxy client in the host and to create a client and a proxy server in the BMC;

[0106] A first connection module 402 is configured to establish a connection between the server and the proxy client in the host through a socket;

[0107] The second connection module 403 is configured to establish a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface;

[0108] The third connection module 404 is configured to establish a connection between the proxy server and the client in the BMC through a socket;

[0109] The communication module 405 is configured to perform communication between the BMC and the host through the server and the proxy client in the host and the client and the proxy server in the BMC.

[0110] In some embodiments, the first connection module 402 is further configured to:

[0111] Using the server to create a socket and create a socket-type file in a preset folder;

[0112] In response to the proxy client detecting that the server has created a socket file in a preset folder, a socket is created and the socket-type file is used to connect to the server.

[0113] In some embodiments, the second connection module 403 is further configured to:

[0114] The proxy client calls the KCS interface to send an instruction to the BMC, wherein the instruction carries the file name and path of a socket type file to be created;

[0115] The proxy server creates a socket and creates a socket type file based on the received file name and path.

[0116] In some embodiments, the third connection module 404 is further configured to:

[0117] A socket is created on the client and a connection between the proxy server and the client is realized through a socket-type file in the proxy server.

[0118] The solution proposed in the present invention implements a new method for process communication between BMC and HOST using UDS socket through KCS; from the perspective of application developers, the present invention abstracts a layer of UDS agent, and application developers do not need to consider how to call complex KCS drivers. They only need to implement simple UDS sockets to perform inter-process communication, thereby improving development efficiency and making it more convenient to exchange messages, tools and logs between BMC and HOST.

[0119] Based on the same inventive concept, according to another aspect of the present invention, Figure 7 As shown, an embodiment of the present invention further provides a computer device 501, including:

[0120] at least one processor 520; and

[0121] The memory 510 stores a computer program 511 that can be run on the processor. When the processor 520 executes the program, the processor 520 performs the steps of any of the above BMC communication methods.

[0122] Based on the same inventive concept, according to another aspect of the present invention, Figure 8As shown, an embodiment of the present invention further provides a computer-readable storage medium 601, which stores a computer program 610. When the computer program 610 is executed by a processor, the steps of any of the above BMC communication methods are performed.

[0123] Finally, it should be noted that a person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods.

[0124] Furthermore, it should be appreciated that the computer-readable storage medium (eg, memory) herein may be either a volatile memory or a nonvolatile memory, or may include both volatile memory and nonvolatile memory.

[0125] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0126] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0127] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.

[0128] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0129] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0130] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A BMC communication method, characterized in that: The following steps are involved: Create a server and proxy client in the host and create a client and proxy server in the BMC; Establishing a connection between the server and the proxy client in the host through a socket; Establishing a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface; Establishing a connection between the proxy server and the client in the BMC via a socket; The BMC and the host communicate via the server and the proxy client in the host and the client and the proxy server in the BMC; Establishing a connection between the server and the proxy client in the host through a socket further includes: Using the server to create a socket and create a socket-type file in a preset folder; In response to the proxy client detecting that the server has created a socket file in a preset folder, creating a socket and connecting to the server using the socket-type file; Establishing a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface further includes: The proxy client calls the KCS interface to send an instruction to the BMC, wherein the instruction carries the file name and path of a socket type file to be created; The proxy server creates a socket and creates a socket type file based on the received file name and path.

2. The method according to claim 1, characterized in that Establishing a connection between the proxy server and the client in the BMC through a socket further includes: A socket is created on the client and a connection between the proxy server and the client is realized through a socket-type file in the proxy server.

3. A BMC communication system, characterized in that: include: Create a module, configured to create a server and proxy client in the host and create a client and proxy server in the BMC; A first connection module is configured to establish a connection between the server and the proxy client in the host through a socket; A second connection module is configured to establish a connection between the proxy client in the host and the proxy server in the BMC through the KCS interface; A third connection module is configured to establish a connection between the proxy server and the client in the BMC through a socket; A communication module, configured to communicate between the BMC and the host through the server and the proxy client in the host and the client and the proxy server in the BMC; The first connection module is further configured as: Using the server to create a socket and create a socket-type file in a preset folder; In response to the proxy client detecting that the server has created a socket file in a preset folder, creating a socket and connecting to the server using the socket-type file; The second connection module is further configured as: The proxy client calls the KCS interface to send an instruction to the BMC, wherein the instruction carries the file name and path of a socket type file to be created; The proxy server creates a socket and creates a socket type file based on the received file name and path.

4. The system according to claim 3, characterized in that The third connection module is further configured as: A socket is created on the client and a connection between the proxy server and the client is realized through a socket-type file in the proxy server.

5. A computer device comprising: at least one processor; as well as A memory storing a computer program executable on the processor, wherein the processor executes the steps of the method according to any one of claims 1 to 2 when executing the program.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are performed.

Citation Information

Patent Citations

  • Data access method, device, system and storage medium

    CN111061692A