Open amuthakrishnasamy opened 11 months ago
spdm-emu is just an emulation program running on Windows/Linux OS environment with TCP/IP.
If you want to use it MCTP, then it is NOT an emulation. It is a real platform environment. You need to write your own device layer function to send/receive function.
See https://github.com/DMTF/libspdm/blob/main/doc/user_guide.md#spdm-responder
0.5, implement required SPDM device IO functions - libspdm_device_send_message_func and libspdm_device_receive_message_func according to spdm_common_lib.
If I run --trans MCTP it still does everything as tcp/ip.
MCTP supports a socket layer, so instead of listening on tcp, it should listen on an MCTP socket, like the echo listener here:
https://github.com/CodeConstruct/mctp/blob/main/src/mctp-echo.c
But all the socket calls are TCP/IP.
Is this a change in how it was intended to be used?
Another option is to use SPDM-Utils. Like spdm-emu it uses libspdm but is aimed at testing real devices instead of emulators.
SPDM-Utils can currently communicate with a SPDM device over PCIe DOE. We don't yet have MCTP support, but we are working on it. It should be pretty easy for you to extend SPDM-Utils to support MCTP as well
Hi Jiewen,
I am creating requester and responder model using SPDM_EMU. Raspberry pi is used to simulate requester model and Riscv32 processor to used to simulate responder model. Requester and responder is connected thru I2C. However, for requester implementation in https://github.com/DMTF/spdm-emu/blob/main/spdm_emu/spdm_emu_common/spdm_emu.c SPDM_EMU, init_client function, I see the socket communication is happening thru TCP packet bool init_client(SOCKET *sock, uint16_t port) { SOCKET client_socket; struct sockaddr_in server_addr; int32_t ret_val;
ifdef _MSC_VER
endif
ifdef _MSC_VER
else
endif
I am getting connection error ( on requester side) due to there is no TCP connection between requester and responder. What would be the suggested implementation that I can use to make connection between requester and responder over MCTP transport layer and I2C/SMBUS.
Thanks AKrishnasamy