An IOBluetoothDevice object has the following metod:
- (IOReturn)remoteNameRequest:(id)target;
What is the (id)target argument? What should the argument be if i want
to send the REMOTE_NAME_REQUEST message to my mobile phone?
(The thing is: I want to get the name of the bluetooth device, without
having to set up a full link establisment first)
I would be grateful for any help!
Best regards,
Eivind Andersen
Hi Elvind: We've tried to a decent job at headerdoc'ing everything. If there is some that is not clear, please let us know. In answer to your question, from IOBluetooth/objc/IOBluetoothDevice.h: /*! @method remoteNameRequest: @abstract Issues a remote name request to the target device. @discussion If a target is specified, the request is asynchronous and on completion of the REMOTE_NAME_REQUEST command, the method -remoteNameRequestComplete:status:name: will be called on the specified target. If no target is specified, the request is made synchronously and won't return until the request is complete. This call with operate with the default page timeout value. If a different page timeout value is desired, the method -remoteNameRequest:withPageTimeout: should be used instead. @param target The target to message when the remote name request is complete @result Returns kIOReturnSuccess if the remote name request was successfully issued (and if synchronous, if the request completed successfully). */ - (IOReturn)remoteNameRequest:(id)target; Basically, target is your obj-c object that you want to get notified when the remote name request is complete. Just implement - (void)remoteNameRequestComplete:(IOBluetoothDevice *)device status:(IOReturn)status; In that object and you will get the device back, and if you call getNameorAddress on that device at that point you will get the remote name that was retrieved (or the address if we failed to get it). HTH, Jason bubba@apple.com _______________________________________________ bluetooth-dev mailing list | bluetooth-dev@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/bluetooth-dev Do not post admin requests to the list. They will be ignored.
participants (1)
-
Bubba Giles