Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does spdm-emu tool works over SMBUS/I2C lines? #45

Closed
PrakashK94 opened this issue Jan 12, 2022 · 5 comments
Closed

Does spdm-emu tool works over SMBUS/I2C lines? #45

PrakashK94 opened this issue Jan 12, 2022 · 5 comments

Comments

@PrakashK94
Copy link

If it works over SMBUS/I2C lines, could you please provide the patch so that it will be helpful for me to run that tool inside Raspberry PI 3 Model B+ and we should be able to send and receive data over SMBUS/I2C lines between requester and responder.

@jyao1
Copy link
Member

jyao1 commented Jan 12, 2022

Emu is an OS application tool.
It does not support SMBUS/I2C line at this moment.

@PrakashK94
Copy link
Author

ok thanks for your answer. I would like to know is there a plan to support SMBUS/I2C communication in future?

Also, the MCTP library which it is using does it support I2C/SMBUS communication?

@jyao1
Copy link
Member

jyao1 commented Jan 12, 2022

The emulator just sends MCTP message to network socket.

If you want to use this, you need write an SMBUS/I2C library to send message to SMBUS/I2C device.

We don't have plan at this moment. But you are welcome to contribute if you want.

@PrakashK94
Copy link
Author

Thanks again. I will try replacing socket calls with I2C init, read, write functions and use the same MCTP library to check SMBUS/I2C communication, but before trying it out I would like to ask you is this the correct way to try this?

@jyao1
Copy link
Member

jyao1 commented Jan 12, 2022

right, you need write code to send data to SMBUS/I2C instead of network socket.

To be specific, you need implement libspdm_device_send_message_func() and libspdm_device_receive_message_func() declared in https://github.com/DMTF/libspdm/blob/main/include/library/spdm_common_lib.h. Then you need register them via libspdm_register_device_io_func().

You may search those 3 APIs, to see how they are used or implemented in spdm-emu.

@jyao1 jyao1 closed this as completed May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants