Newbie Looking to use His Microsoft Mouse in Mac OS X
Newbie Looking to use His Microsoft Mouse in Mac OS X
- Subject: Newbie Looking to use His Microsoft Mouse in Mac OS X
- From: Eliot Simcoe <email@hidden>
- Date: Thu, 13 Mar 2003 19:43:34 -0500
Hello everyone.
My name is Eliot Simcoe, and two days ago I bought Microsoft's new
Bluetooth mouse not realizing that it would not work with my Macintosh.
I really like the mouse, but there have not been device drivers
released for it... yet.
When I plug in the bluetooth "stick" I am able to find my mouse and
open a connection to it using the following code, but I don't receive
anything in the data callback, and when I write to the connection,
nothing happens.
//
// BMController.m
// Bluetooth Monitor
//
// Created by Eliot Simcoe on Wed Mar 12 2003.
// Copyright (c) 2003 Impulse Development. All rights reserved.
//
#import "BMController.h"
#import <IOBluetooth/IOBluetoothUtilities.h>
#import <IOBluetooth/objc/IOBluetoothDevice.h>
#import <IOBluetooth/objc/IOBluetoothL2CAPChannel.h>
#import <IOBluetooth/objc/IOBluetoothRFCOMMChannel.h>
static void bluetoothL2CAPChannelIncomingDataListener(
IOBluetoothL2CAPChannelRef l2capChannel, void *data, UInt16 length,
void *refCon )
{
NSLog( @"Got Data!!!" );
}
@implementation BMController
- (id)init
{
self = [super init];
if( self )
{
BluetoothDeviceAddress deviceAddress;
IOBluetoothDevice *mouseDevice;
// get the mouse device
IOBluetoothNSStringToDeviceAddress( @"00-50-f2-7f-05-47",
&deviceAddress );
mouseDevice = [IOBluetoothDevice withAddress:&deviceAddress];
if( mouseDevice )
{
IOBluetoothL2CAPChannel *mouseL2CAPChannelPtr[1];
if( [mouseDevice
openL2CAPChannel:kBluetoothL2CAPPSMHIDControl
findExisting:YES
newChannel:mouseL2CAPChannelPtr] ==
kIOReturnSuccess )
{
IOBluetoothL2CAPChannel *mouseL2CAPChannel =
mouseL2CAPChannelPtr[0];
if( [mouseL2CAPChannel
registerIncomingDataListener:&bluetoothL2CAPChannelIncomingDataListener
refCon:self] == kIOReturnSuccess )
{
NSLog( @"L2CAPChannel Created" );
}
}
}
}
return self;
}
@end
The sad fact is, that I have no idea what a L2CAPChannel is. I have
never written a device driver before, and I am grasping at straws doing
anything that seems to work.
Could someone please explain what some of the different abbreviations
mean that are used so frequently in the header files? (L2CAP, OBEX,
RFCOMM, SDP, UUID, any others that I should know about...)
What I am doing above is probably very wrong, but this is really
something I would like to do. Any pointers would be greatly
appreciated. I am assuming that I will have to reverse engineer the
protocol used by the mouse, so I was wondering if anyone knows of a
bluetooth packet sniffer or transmission watcher that I could use. I
couldn't find one anywhere except the developer tools which doesn't
seem to work...
I would also appreciate any hints on how a bluetooth mouse driver might
be written. I am kind of flying blind.
Thanks - I know this is a lot to ask - Eliot Simcoe
_______________________________________________
bluetooth-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/bluetooth-dev
Do not post admin requests to the list. They will be ignored.