SMBus find devices

R

RedLion

Hi,

What I would like to do is to read all kind of sensor data out of the
BMC (Baseboard Management Controller), lets take for example the
processor temperature.

I'm developing with C on a FreeBSD kernel. It's an Intel SE7210TP1-E
TPS motherboard. It supports IPMI 2.0. And the mBMC chip on the
motherboard is from National Semiconductor PC87431 interated
management controller.

As far as I've found in the documentation the BMC can be accessed
through two interfaces on this motherboard:
- SMBus
- LOM (Lan On Motherboard)

I would like to accomplish this using the SMBus, and can be found on
/dev/smb0. This is working, but then find the BMC. So I scan through
the addresses 0x20 till 0x4f and send the command 0x03 (Get UDID = get
Unique Device Identifier) for this I take an SMB frame as in the
machine/smb.h is defined. Looking in the documentation it explains
that the Device capabilitities field within the UDID frame which is
returned in the smb frame should have the value 38(dec). When trying
this with the folowing code I don't get an result that make any
sense????

[code sample]
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <machine/smb.h>
#include <stdlib.h>
#include <err.h>

/* scan */
int fd;
struct smbcmd s;
int i;
short n;
char data[32];

if ((fd = open("/dev/smb0", O_RDWR)) < 0)
warn("unable to open smb");

for (n = 0x20; n < 0x4f; n++) {
s.slave = n;
s.cmd = 3;
s.count = 17;
s.data.byte_ptr = data;
memset(s.data.byte_ptr, 0, s.count);
if (ioctl(fd, SMB_BREAD, &s) < 0)
continue;

printf("slave = 0x%02X data = ", n);
for (i = 0; i < s.count; i++) {
printf("%02X ",
((unsigned int)s.data.byte_ptr & 0x00ff));
} putchar('\n');
}
close(fd);
[/code sample]

I just got 4 responses from devices, and from the data returned I
can't make up what devices they are?
It looks more if the data returned is incorrect, and have nothing to
do with the request.

And now I got really stuck, any help or ideas will be appreciated!

Thanks,

Charl
 
J

Joona I Palaste

RedLion said:
What I would like to do is to read all kind of sensor data out of the
BMC (Baseboard Management Controller), lets take for example the
processor temperature.
I'm developing with C on a FreeBSD kernel. It's an Intel SE7210TP1-E
TPS motherboard. It supports IPMI 2.0. And the mBMC chip on the
motherboard is from National Semiconductor PC87431 interated
management controller.

You'll want comp.unix.programmer or a FreeBSD-specific newsgroup.

--
/-- Joona Palaste ([email protected]) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"I said 'play as you've never played before', not 'play as IF you've never
played before'!"
- Andy Capp
 
R

RedLion

Isn't ther anyone who can help me with this?

I've posted to a couple of groups now, but haven't had any responses...
 
C

CBFalconer

RedLion said:
Isn't ther anyone who can help me with this?

I've posted to a couple of groups now, but haven't had any responses...

Not here, as you were already told.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top