On mendag, okt 6, 2003, at 13:23 Europe/Stockholm, Eivind Andersen
wrote:
> I have a problem when running the following code:
>
> - (NSArray *)selectRemoteUser
> {
> IOBluetoothDeviceSelectorController * deviceSelector =
> [IOBluetoothDeviceSelectorController deviceSelector];
> NSArray * returnArray = [deviceSelector
> runPanelWithAttributes:NULL];
> return returnArray;
> }
>
> It runs all right, but I get a wrong result.
>
> After running the piece of code, I take out the object
> (IOBluetoothDevice), and runs the getAddress metod on is. The code for
> this looks like this:
>
> IOBluetoothDevice * device = [woolModel selectedDevice];
> BluetoothDeviceAddress * deviceAddress = [device getAddress];
> NSString * deviceAddressString =
> IOBluetoothNSStringFromDeviceAddress(&deviceAddress);
>
> I know my device address is: 00-80-37-b1-21-f5, but using the code
> above I get something like:
> 00-1a-ad-08-3d-ba. (actually it4s different every time I compile).
> Does anyone know what I4ve done wrong?
Remove the "&" in front of deviceAddress in your call to
IOBluetoothNSStringFromDeviceAddress, and you should be fine. I'm
surprised you don't get compiler warnings about this (you are reading
the compiler warnings, right?). Unless you need the device address
object, you may also want to consider using
IOBluetoothDeviceGetAddressString instead.
Best,
Jonas
_______________________________________________
bluetooth-dev mailing list | bluetooth-dev(a)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.
On mendag, okt 6, 2003, at 13:23 Europe/Stockholm, Eivind Andersen
wrote:
> I have a problem when running the following code:
>
> - (NSArray *)selectRemoteUser
> {
> IOBluetoothDeviceSelectorController * deviceSelector =
> [IOBluetoothDeviceSelectorController deviceSelector];
> NSArray * returnArray = [deviceSelector
> runPanelWithAttributes:NULL];
> return returnArray;
> }
>
> It runs all right, but I get a wrong result.
>
> After running the piece of code, I take out the object
> (IOBluetoothDevice), and runs the getAddress metod on is. The code for
> this looks like this:
>
> IOBluetoothDevice * device = [woolModel selectedDevice];
> BluetoothDeviceAddress * deviceAddress = [device getAddress];
> NSString * deviceAddressString =
> IOBluetoothNSStringFromDeviceAddress(&deviceAddress);
>
> I know my device address is: 00-80-37-b1-21-f5, but using the code
> above I get something like:
> 00-1a-ad-08-3d-ba. (actually it4s different every time I compile).
> Does anyone know what I4ve done wrong?
Remove the "&" in front of deviceAddress in your call to
IOBluetoothNSStringFromDeviceAddress, and you should be fine. I'm
surprised you don't get compiler warnings about this (you are reading
the compiler warnings, right?). Unless you need the device address
object, you may also want to consider using
IOBluetoothDeviceGetAddressString instead.
Best,
Jonas
_______________________________________________
bluetooth-dev mailing list | bluetooth-dev(a)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.
I have a problem when running the following code:
- (NSArray *)selectRemoteUser
{
IOBluetoothDeviceSelectorController * deviceSelector =
[IOBluetoothDeviceSelectorController deviceSelector];
NSArray * returnArray = [deviceSelector
runPanelWithAttributes:NULL];
return returnArray;
}
It runs all right, but I get a wrong result.
After running the piece of code, I take out the object
(IOBluetoothDevice), and runs the getAddress metod on is. The code for
this looks like this:
IOBluetoothDevice * device = [woolModel selectedDevice];
BluetoothDeviceAddress * deviceAddress = [device getAddress];
NSString * deviceAddressString =
IOBluetoothNSStringFromDeviceAddress(&deviceAddress);
I know my device address is: 00-80-37-b1-21-f5, but using the code
above I get something like:
00-1a-ad-08-3d-ba. (actually it4s different every time I compile).
Does anyone know what I4ve done wrong?
OT question: does anyone know why project builder fails in building
every second time.
(Build -> "build failed" -> no changes -> Build -> Build succeeded)
This happens EVERY time on my computer.
best regards,
Eivind Andersen
_______________________________________________
bluetooth-dev mailing list | bluetooth-dev(a)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.