You are working too hard :).  The driver handles the message routing and
formatting on the IPMB, you don't create the header.  There were also
some problems in your message: You were sending to LUN 2 instead of LUN
0 and you did not put in the PICMG IANA into the message, as required by
ATCA.  To do what you want, do:

        ipmb_addr.addr_type = IPMI_IPMB_ADDR_TYPE;
        ipmb_addr.channel = 0; // primary ipmb
        ipmb_addr.slave_addr = 0x8a; // remote blade ipmb address
        ipmb_addr.lun = 0x00;

        req.addr = (unsigned char*)&ipmb_addr;
        req.addr_len = sizeof(ipmb_addr);       
        req.msg.netfn = PICMG_NETFN;
        req.msg.cmd = PICMG_GET_ADDRESS_INFO_CMD;
        --Fill data with the picmg id, per the spec
        req.msg.data = data;
        req.msg.data_len = 3;

The message response will automatically be routed back to your file
descriptor, and you should get the response instead of a timeout.

-Corey

Thirumalai kumar wrote:
>  
> Hi Corey,
> Im framing a IPMB message and sending it to the remote chassis on the same
> enclosure. 
> I am sending the IPMI message to IPMB bus as follows,
>       ipmb_addr.addr_type = IPMI_IPMB_ADDR_TYPE;
>         ipmb_addr.channel = 0; // primary ipmb
>         ipmb_addr.slave_addr = 0x8a; // remote blade ipmb address
>         ipmb_addr.lun = 0x02;
>
>         req.addr = (unsigned char*)&ipmb_addr;
>         req.addr_len = sizeof(ipmb_addr);     
>       req.msgid = 1;
>         req.msg.netfn = IPMI_NETFN_APP_REQUEST;
>         req.msg.cmd = SEND_MESSAGE;
>
>         unsigned int data[1024];
>         unsigned short len = req.msg.data_len;
>
>         // build IPMB message structure
>         data[len++] = 0x8a;     // rs.SA
>         data[len++] = 0x2c; // NetFun // picmg netfn
>         data[len++] = 0x1e;     // Checksum1
>         data[len++] = 0x20;     // rq.SA
>         data[len++] = 0x06;     // rqSeqNum 7-2 bits+ rq.lun 1-0 bits
>         data[len++] = PICMG_GET_ADDRESS_INFO_CMD;
>       req.msg.data = data;
>       req.msg.data_len = len;
>
>       then ioctl sysem to call to send the message. How to receive the
> response from the BMC.
>       here I am getting 0xc3 timeout error.
>
> Thanks,
> Thiru
>
> -----Original Message-----
> From: Corey Minyard [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, October 17, 2006 9:01 PM
> Cc: [email protected]
> Subject: Re: [Openipmi-developer] read IPMB Response
>
> You don't give enough information for me to understand exactly what you are
> doing, but there are some problems with what you have done.  The driver
> handles doing the get message automatically, you don't have to do anything.
> All you need to do is send your original command and wait for the response.
>
> -Corey
>
> Thirumalai kumar wrote:
>   
>> Hi All,
>>  
>> I am forming a IPMB message and sending it through the ioctl system 
>> call. The message is sent properly.
>> the /proc/ stat count is getting incrementing properly. after that i 
>> am sending app_response and get message command to read the response 
>> from the receive message queue. but i am not able to read the 
>> response.
>> any one has idea on this, how to read the response.
>> sample code
>>  
>>         ipmb_addr.addr_type = IPMI_IPMB_ADDR_TYPE;
>>         ipmb_addr.channel = 0;
>>         ipmb_addr.slave_addr = 0x20; //bmc
>>         ipmb_addr.lun = 0x02;
>>         req1.addr = (unsigned char*)&ipmb_addr;
>>         req1.addr_len = sizeof(ipmb_addr);
>>         req1.msg.netfn = IPMI_NETFN_APP_RESPONSE;
>>         req1.msg.cmd = GET_MESSAGE;
>>         req1.msg.data = (unsigned char*) &(ipmi_res.data);
>>         req1.msg.data_len = 32;
>>  
>>         if ( ioctl(fd, IPMICTL_SEND_COMMAND, &req1) < 0 )
>>         {
>>             printf("\n IOCTL GET MSG send ERROR %s ", strerror(errno));
>>         }
>>         ioctl(fd, IPMICTL_RECEIVE_MSG, &recv) now i am getting time 
>> out error. Timely help will be appreciated.
>>     
> Assuming
>   
>>  
>> Thanks and Regards,
>> Thirumalai kumar S
>>  
>> ----------------------------------------------------------------------
>> --
>>
>> ----------------------------------------------------------------------
>> --- Using Tomcat but need to do more? Need to support web services, 
>> security?
>> Get stuff done quickly with pre-integrated technology to make your job 
>> easier Download IBM WebSphere Application Server v.1.0.1 based on 
>> Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
>> 42
>> ----------------------------------------------------------------------
>> --
>>
>> _______________________________________________
>> Openipmi-developer mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/openipmi-developer
>>   
>>     
>
>
>
>
>  The information contained in this electronic message and any attachments to 
> this message are intended for the exclusive use of the addressee(s) and may 
> contain proprietary, confidential or privileged information. If you are not 
> the intended recipient, you should not disseminate, distribute or copy this 
> e-mail. Please notify the sender immediately and destroy all copies of this 
> message and any attachments.   WARNING: Computer viruses can be transmitted 
> via email. The recipient should check this email and any attachments for the 
> presence of viruses. The company accepts no liability for any damage caused 
> by any virus transmitted by this email.   www.wipro.com 
>   


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to