Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

SMBus find devices
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[i] & 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

Report this thread to moderator Post Follow-up to this message
Old Post
RedLion
09-29-04 10:00 AM


Re: SMBus find devices
Charl> Hi, What I would like to do is to read all kind of sensor data
Charl> out of the BMC (Baseboard Management Controller), lets take for
Charl> example the processor temperature.

<plug>
http://savannah.gnu.org/projects/freeipmi
</plug>

--
"It's not true or not."  A reality show producer (real quote)

Report this thread to moderator Post Follow-up to this message
Old Post
Ian Zimmerman
12-21-04 08:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Unix Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:44 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.