Menu

#12 A problem in sendCommand

open
nobody
None
5
2006-12-28
2006-12-28
Anonymous
No

I think the code of sendCommand is wrong there:

for (i = 0; i < 10; i++){
ret = [cchan writeSync:buf length:length];
if (kIOReturnSuccess == ret){
//NSLog(@"send command successfull \n");
break;
}
usleep(10000);
}

NSLog(@"send command successfull \n");

The NSLog always report a success even when on my ppc it clearly doesn't work. I have modified the code (see commented line. What a great patch ;-) ) and now it doesn't report a success when it doesn't work. In fact on my ppc any sendCommand seems to fail after a certain point. The last success is for 0x12 0x02 0x31 command.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Sorry, forget the code upper it was a mistake.
    But the fact remains that sendCommand seems not working after the deviceInquiryDeviceFound ends. Any other sendCommand fails after that. So In darwin remote the last successfull commands sent to the wiimote were in the WiiRemoteDiscovered method of AppController class.
    After completion of deviceInquiryDeviceFound method any other command sent to the Wiimote fails on my ppc mac. If someone has any hints here ...

     
  • Nobody/Anonymous

    Logged In: NO

    Ok after some test, I face a problem I didn't understand.
    I'm on a PB G4 1,5 GHz. with 10.4.8.
    During the discovery prcedure I can send any command to the wiimote successfully : setting LEDs, use force feedback, ...
    But after the deviceInquiryDeviceFound method terminates. It seems impossible to use the cchan object. almost any com methods end with an error 'No Such Device' (0xe00002c0). If try to getDevice on cchan I get the device and if I try to see if the device isConnected I get a YES... I have no crash, just it doesn't work at all after discovery phase.

     

Log in to post a comment.