|
Last Updated: 11-14-05
|
|
|
Update 11/14/05: Source Code released I decided to release all the source code that I worked on in case somebody else wants to work on it. It doesn't do much, but it would serve as a good starting point. It consists of two Metrowerks Codewarrior 8.3 Projects, one for the USB driver and one for the Bluetooth Control Center application (Powerplant Framework). Do not email me about it, I will not answer questions about it. OS 9 USB Bluetooth Driver and Bluetooth Control Center Source Code (3.6 MB) Update 5/11/04: Bluetooth Mice and Keyboards already work in OS 9!!! Well, it seems that I've wasted a lot of time getting Bluetooth devices to work in OS 9, because they have worked since 10/15/2003...its just that nobody noticed. And who was responsible for adding this support? None other than Apple themselves. On October 15th of last year, Apple released firmware update 1.0.2 for the D-Link Bluetooth adapters. The release notes noted that the firmware update will render the adapter unusable under Windows systems. I had always wondered about this, but never looked into it further because I had a Belkin adapter...not a D-Link. It turns out that this firmware update turns the adapter into a generic composite USB device with 2 HID interfaces, one for the keyboard and one for the mouse. Apple did this because they needed to be able to use the mice and keyboards earlier in the boot process, particularly at the open firmware prompt. This tricks the system into thinking that the Bluetooth USB dongle is really just a mouse and a keyboard. That way they didnt have to write an openfirmware driver for the bluetooth devices since they already had an open firmware driver for USB devices. The side effect of all this is that OS 9 sees the device as 2 HIDs, and loads the USB keyboard and mouse drivers for them. I can't believe nobody ever noticed this (by the way, thanks to Tim Porter for alerting me to this so I didn't waste any more time). This only works with the D-Link bluetooth adapter that Apple supports. All other USB Bluetooth adapters can't do this without a firmware update. The other caveat is that you have to have paired your devices in OS X before you can use them in 9. This is because the Bluetooth module needs to save your encrypted link key so it can be used in 'pseudo-usb mode'. So I guess there still is some room for a configuration utility to be developed so that you don't have to boot into OS X to configure your devices, but I'll be less likely to work on that now. Feel free to email me with your thoughts. Update 2/26/04: Here's a little teaser to wet your appetite.
This is the the control panel interface where all the device configuration will be done. It is mostly working at this point. Mouse support is coming along nicely. I haven't actually made the device move the cursor on the screen yet, but it is sending HID reports to the driver, so I just have to tie the two together. I haven't done anything with keyboard support since I first started. I decided the mouse would be easier to finish first. Thanks for being patient with me and sending emails encouraging me to finish. I hope you all havn't given up on me yet! Update 1/29/04: Work has resumed full force on the drivers now that I have some more time on my hands. I have learned a lot about Mac OS driver programming over the last month, and I expect development to proceed more rapidly at this point. Thanks for the literally hundreds of emails I have recieved encouraging me to finish the drivers...that really means a lot. I didn't respond to all of them, but I kept your email address so I can email you when I have any announcements to make. Update 12/14/03: I haven't been able to work on the driver at all over the past month. I now have some more free time to spend coding. I'm still working on the L2CAP layer. I was hoping to get some help from the open source community for this layer, but most implementations have too many OS-specific calls that I can't use. Update 11/3/03: Well, I guess having a working driver done by the end of October was a little too optimistic. The main reason why I haven't finished yet is...well...because...ummm...writing usb drivers is HARD! I will continue to plug away until I have something to show for it. For those of you with intimate knowledge of the Bluetooth protocol stack, here is where I stand: I have fully implemented the driver transport layer and the HCI layer. I skipped over the L2CAP layer in hopes that I could come up with something with only the functionality I needed to get an HID device working. A fully complient L2CAP layer would have much more functionality than I required. I also implemented the HID compatibility shim that ultimately provides the MacOS access to the keyboard and mouse. So now its back to the L2CAP layer and filling in the blanks. I'm currently struggling through packetizing the ACL data for transport over the channel. So thats where I stand...I not even going to try to give another estimate so I don't disappoint anybody else. Project Status Update 10/19/03: I have been struggling with the encryption settings for the past couple of weeks. As you might imagine, Bluetooth keyboards require an encrypted link to the host so that sensitive information like passwords isn't intercepted. This particular link is a strong 128-bit encrypted link. I think I have that all figured out now. I keep finding little things that don't fit the official Bluetooth HID profile but have been able to work around them. I hope they didn't get off the path too far with anything major. Project Status Update 9/26/03: I dropped by my local Apple Store last night and they had the wireless keyboards (but no mice) for sale there. Since my order from the online store hadn't shipped yet, I just cancelled it. So now I have a Bluetooth keyboard in hand and am ready to continue development. The mouse can wait till I get the keyboard working. Project Status Update 9/24/03: I am progressing to the point where I can't code any further without actually having the Bluetooth keyboard and mouse physically at my computer. I'm still awaiting mine to arrive from Apple. Thank you all for the positive responses. I recieved about 50 "Go for it" emails...which was about what I expected. I am very confident that I can get this working by the end of October. The only thing that worries me is Apple's claims of "Adaptive Frequency Hopping". I hope this is something that ends up being transparent to the driver or it will probably stall my efforts. The other thing that could slow me down is if Apple's devices are not fully Bluetooth HID compliant, but I doubt they would go with something proprietary since everything else is standards compliant. As always, email me with any ideas. Planned Adapter Support* : any USB Bluetooth adapter that conforms to the Bluetooth 1.1 HCI specification. This includes D-Link, Belkin, and many others.
Planned Device Support* : Apple Wireless keyboard and mouse.
Will the driver be free?* : I havn't decided yet. It depends on how much time and effort it takes to finish. If I do charge for it, it won't be more then $10. Can I help? : Yes, you can help 2 ways. First, if you are interested in seeing this project completed, send me an email (link below) and let me know. This will help me gauge interest. Second, I will need some other USB Bluetooth modules to test with. I currently have a Belkin module, and I would appreciate if somebody would let me borrow some different modules to test with. And of course, if you are interested is lending me your development talents, I won't turn them down. Project Background : This project originally started as a fake driver that tricked OS 9 into recognizing the device so that I wouldn't get the annoying "Driver not found" error message when I had my Bluetooth adapter plugged in under OS 9. However, once rumors of Apple wireless mice and keyboard started surfacing, I thought it would be really nice to be able to actually use them in OS 9 since there is no chance that Apple would ever write drivers for anything other then X. So for the past 3 weeks I have basically coded out the entire Bluetooth 1.1 HCI specification and linked it in with Mac OS 9's USB architecture. Today Apple came through with the mouse and keyboard, and I put in my order (2-3 weeks delivery estimate). I am still about a month away from having a functional driver, but keep your eyes on this page for updates. The Future : If I am successful with getting HID's (human interface devices, such as mice and keyboards), I may take the project a step further and open up the API to other developers who want to write plug-in modules for devices like Palms or Bluetooth-enabled phones. *Any information on this page is subject to change at any time. There is no guarantee that I will be able to support all devices or configurations. |