WWDC2003 Session 501

Transcript

Kind: captions Language: en good morning and welcome to the Ricky working on a rebel the different acknowledge mr. I definitely evangelist physicist from American Samoa City Reuters Gilbert Arizona step debilidad Sudan or j Cole or Marco questioning good i automatically burncoat American able to come including already much better than watching my word avoid antenna she had a bigger tax and the commencement and you know again or no device will make another colony thanks again and cuddle oh it is today what we're going to get a little juice to do today it also know your solution about the moon emoticon estate opened it reduces annuity show de acuerdo de una cita con una foto de minas curtain rod today we're a teacup Adonis NIDA witnesses morning we want to sit so he like a lot for coming out today oh you know completed or even started i'm on your ground software engineer via bluetooth team for this is useful stand guard on John and looking at what we've done oh ok I got here how can we shouldn't go thinking of like lots of embers and there's a lot of you know that's a position in jaguar with some social values of Bluetooth in wooden x 1 n.o an extended number no capital ordinances we're kind of certification what is I feel couples yoga more than whole file footage later or equivalent hamsa maxing to any devices at main tunnel ladies I Syria to the zucchini it is initiated never thought I was not what you know they be allowed you a uniform like couple just did a cool idea as it was ok with any large association for the phone anything about your exes notice the internet and it real religious people about why i said well oh god that is so we also had to work our object the object profiles in the art of our quality learning though ok that this inside explaining unique equation rental company including the school rather than filed by vitac mauritius mexico tomoko convict individually yeah we had system preferences support control engagement oh no support and many equity body area will be delayed ominous operation instant Oh petition de acuerdo de mano y axis ooh oh ok Asha additionally instead in addition to do the system support we've opened what we have time oh did you get older you know no memory of it wasn't we're going to sell it again Charles and with the tennis event include in one Raila got a booty framework letting water ain't working this is nate yqa you know that is the distance of the whole line work provides all day Missoula core services ISS which is hard work by the way on the north we go through them a lot more into line the free article i don't know i'm not doing regular delusional hobo jack channel our comm channel hello anybody bexar good at this and they don't get is SVP x this is obviously not the more tickets initially we provide it that's one more do i no kodomo i was either of the comic day long handle it's open all you know why candidate I westerly buddy and initiation terrible you don't know or initiate the city was reduced energy to kiannaseto is equal to like a cuticle these are not even so that's what we had a noble down release back in jerez little over a year we did not like this often concern about an operational sure and also use soo do that but uh he might all right no increase in significance ago that when I became an worker in addition to push probe why Oklahoma decided attending a while transfer credit in a row qualified on or the 60s you know you don't even worry about it push a lot of it was fun relaxing goodbye to a faltering Rosa Colette if you're acting like you guys DP rustic didn't city rated clean we go file system photos I besito we've added north michigan would defile exchanges in the header here so tomorrow pictures of Bratislava Jerusalem testimony quick do not chargeable small a Conestoga música por cuanto a su no possibility now banged up to it Romeo nkosi justified omoide economics or Cristiano to do models is also mode again our latest release we are in coconut in profile up and so don't open up I that you can use your total mana most were think esteem as it makes it really the demo content to different bars instead of process it was a bad idea but with the price including system I speaker not gonna like it actually you guys look a long way quality night ago forget I said oh oka sangano but it is hard work that we do except particular that you know how that data report sir he doesn't seem like that an eager to decide if it is getting a little too complicated occasion what about the same code then if you reported I'm you're getting a hotel compartment channel or whatever people i don't know but i've read it and added a contagion what's the matter open it with people in it provides don't we dig into this good work powerful it is 400 years i reported open with a casa to equal to n de but duh we also have been in removing that from the preference to the names and all that I snap really interested the different devices emitting energy density know so much roasted one stop parody to do it was ok so for the most wicked a toga toga the kiddie initial part of the work that would not pass here well don't I have had a new API said I see especially looking fine on Redick so most of the main are real at any particular Venice knocked out a little bit also their disguises our cement wall ruiners devices as well about it much more importantly while 80 millimeters you go to do it without any particular on etsy dopa API and as always involve our and the generalized API I are both see and after a key system which is senior adviser mr. vizcarra is you know I didn't know patio or people suitable witness I'm getting a lot of course today it's a much cleaner or domestic about like I didn't skidded enough I want to do with the hid device keep it going to know that look mr. probably gonna go ahead might even tell you a little bit about a little bit put it on when you can be done and when a slide on full uncle Cody and food Alliance the gold plans subscribe now he's so much done all is important that I was acquitted engineer new hid device yeah there's events the driver the blows up next to the device under won't finish all of the profile but then I could have had a shocker no more that new content with what I think you know that makes Elmo wonder what / it manager Ed geri pls just a little bit a muscle extended if you don't think with the customer a supervisor because of that above hit manager John and James engelhardt word on the husband you saw this and another thing because we don't actually did you access email out our work so well I don't know content in touch it actually looks quite nice and estimates in noho copy them and we haven't looked into this yeah craig chiefly are don't know each other things that we posted at aloha screaming like a super excited after the demo but i don't know hundra second connector my you a little bit about a minute or two series we could it is not available to the scrimmage internal utilities your to do dinner what utilities that ok configure animals in any society the setting this incredible experience to Trails Association people have certain orientation Aries lettuce new content religion importance in a little earlier also a little work so it's kinda good to know how it works there are really two different types of serial ports that are subtly different semantics so it's good to treat them independently there's incoming port and outgoing port now it's a normal serial cable you don't have to worry about it connect up the table you talk to the device on the end it's not incoming or outgoing but with Bluetooth it it's a little bit different so with incoming serial ports a device itself will connect up to the system and any device can connect to a particular serial port service and the application that is listening on that serial port will get the data from that device now as a result of that the device is going to or the application rather is going to connect up an attempt to use the port before there's anything connected so in that particular case it treats it just like you would a serial port with no cable connected if you do a read you don't get any data if you write to it it just goes to bitbucket once a connection incoming connection is established it gets routed automatically to the applications that is as the serial port open has an outstanding read and just automatically starts passing data as far as outgoing serial ports are concerned it's up to the user to configure the net single outgoing port works with a single device so they select the device they can select any RF com based service on the device and that serial port becomes configured when you go to open up that port and an application the system will go and attempt to connect to the device attempt to open up the necessary channels to open to create the data pipes for that port now one possible problem here is that this open process is actually can be quite lengthy if the device is present their timeouts associated with it so you might spend 10-15 seconds in the synchronous open call waiting for connection to fail so as a result that's not always resulting in the best user experience so now that we know kind of how the serial ports work want to tell you that we really recommend that you don't use them they're really for legacy support if you've got an application that already written that needs to use your real port or you know maybe for debugging purposes it's a little bit easier that's fine but it for number of the reasons I've mentioned it's it's really an inefficient way to do it you can get full access to those serial ports by using the RF com api's that we provide and those API is provide you with a much much richer set of functionality if you a lot better and more granular error reporting you get a lot more direct control over the channel creation and the behavior of the channel itself as well as it provides a lot more information about it again we can't recommend this technique enough it just will result in a lot better applications in addition to the serial port changes we've added a number of features in our UI elements that make the user experience a lot a lot nicer now to support that we've added a couple of new device categories so we've allowed now the concept of favorite device or multiple favorite devices so that if you have a device that you use over and over again you just mark it as a favorite and then every time you go in any application to one of our UI channels that device will be accessible so if you'd say you always say send files over to your palm or want to send applica new applications to your palm now you can just use the bluetooth file exchange every time you go to send a file palm is going to be listed right there as a favorite device so you don't have to spend time going through a lengthy discovery process every time you want to send a file we've also added support for recent devices where we keep track of each connection that's established and we'll go ahead and list those and most recent first so if you're sending sending contacts to your phone and got three different ones you want to send as soon as you've sent that first one it now shows up in your recent list so you can keep selecting that phone over and over again so just again it drastically speeds up the process where you do the more than one thing at want in the UI itself we've added new filters that lets you filter by those categories so say you only want to see your favorites you can easily do that only want to see recent or just the discovered devices you can do all of those things as well we've let you filter by the actual type of device so computer PDA phones so if you're in an environment that tend to have a lot of Bluetooth devices which we're not there yet but someday will actually let you easily go and find a specific device you're looking for without having to wade through a long list in addition to those user features there's a number new pieces of API that makes things a lot better in the in the UI elements that allow you to for example run panel modal or as a sheet it's full control over all of the text that actually appears on the panel so the title bar the description the prompt that's used in the button to select a device are fully customizable by the application and as well lets you fully localize the information that you put in there so should be able to do pretty much anything you want with these panels we've also added support for filtering and validating the user selection so if you know you want to connect to say an object push service on a device you can tell the panel that I only want devices to let the user select a device that supports the object push service in that case it will actually go and verify it'll do an SCP query it will verify the device has that service before finalizing the selection so that way when your code returns you'll know that the device it will basically give you the service that you asked for you know that the device has it you don't have to worry about doing it yourself all of these new api's are fully header dot and they're consistent across all the different UI elements so once you learn it for one it applies to all of them to support the new the new different categories and device types we've added two new API on to the i/o Bluetooth device object itself so got a whole slew API to manage the favorite devices lets you get to list of the currently logged in users favorites lets you check to see if a single device is actually a favorite and then you can even add and remove the device from the favorites as well so hopefully only do that as a user prompting and not just behind their back because they probably wouldn't like it too much but we also add finely API to access a paired devices so you can get a list of all the system paired devices as well as find out if the individual devices paired and then in order to support reasons we've added a recent access date attribute to the device object so it lets you see when device was most recently accessed and there's API that lets you get the list of the end most recently accessed device for the user so say you only have room for five reasons well you just call this API and it will return you the five most recent devices for the user additionally we've added a lot of new functionality in the basically in our LT cap and RF com layers the original set of AP is we had worked but there wasn't really a distinction between asynchronous and synchronous versus the API so the api's that were there were kind of a combination of the two they would end up behaving asynchronously but without letting you know when an operator in complete operation completed and but might also block so you kind of get the worst of all worlds in that case what we've done now is to go ad fully asynchronous and fully synchronous versions of the API to l2cap and our comm channel so now there's channel open API is that lets you do that there's right ap is that lets you get either wait until the right completes or get notified when a complete there's number of new notifications about channel state changes now all of these new AP eyes are available only in 10 25 and forwards so if you do make use of them you will need to be dependent upon 10 25 however we highly recommend that you do this because these new API is especially for asynchronous behavior really lets you provide a much better user experience you can really improve the application responsiveness avoid the spinning cursor in a lot of cases since a number of the operations tend to take a long time especially in the failure cases so it's really worthwhile to use asynchronous API so that the user doesn't have to feel like the application isn't responding within the l2cap channel object in order to support the new asynchronous behavior we've added the concept of a channel delegate and what it does it allows the delicate delegate to them receive the necessary callbacks notifications and events that go along with the different happenings in the system so the delegate will get new incoming data when it'll get the channel open complete notification it'll get notified when the channel gets closed when it gets reconfigured this is a new one that we didn't have before so if the help to get channel itself has go through figuration process to get some new parameters it will do that it's also then a right complete notification so it's kind of a one-stop shop for all the asynchronous notifications within the channel the api's for those are divided in a couple different categories we've got a couple new api's on bluetooth device that lets you both open the channel asynchronously are synchronously now as a result of the new channel delegate you for every channel has to have a delegate when it opened so since that is now the one way to receive incoming data notifications for example it's a requirement that there is a delegate that at least implement the incoming data call back otherwise if data comes in it would just get dropped on the floor so pretty much have to have that set up the old method that was used to open the channel as we are going to be deprecating that so we definitely recommend that you move to these new API it's just generally a lot better you know whether it's a synchronous call you know whether it's an asynchronous call really defines what the behavior is rather than kind of leaving it up to you know how we've decided to do it we also have new asynchronous right methods on the l2cap channel objects so we've got right a sink and right sink that again behave the same way does the right thing in the right place the asynchronous right we'll go ahead return right away it's not going to block on you it lets you know gives you real good user experience with that both of these replace the old bright call our comm channel has API is really similar there's a new to our comm channel delegate object it gets the same messages when there's new incoming data channel open closed our comm has some additional control signals and flow control information that are communicated through the delegate gets the right complete notification and then there's a new cue space available notification that I'll explain in a little more detail in a minute for our comm api's we have the same kind of channel open api's on the Bluetooth device object itself for opening a channel synchronously asynchronously as with to capsids delegate is required to be able to open a new channel and as with l2cap we're going to be deprecating the old open our comm channel method as well the our comm channel API itself has you'd expect right a sink rate sink versions that are going to be replacing the old write and write simple methods now we're also deprecating the old incoming data listener and incoming event listener methods because all of those listeners are now replaced by the delegate everything goes to the one place in the delegate object now one of the things that in doing these fully synchronous fully asynchronous API s with our comp channel it's a little different than l2cap is that our comm provides flow control so we're basically told when we can and when we can't write data so in the case where we can't write data we have to queue it up internally now in order to avoid having just an unbounded to space there are some maximum set within the channel that are pretty high Sun likely you're going to run into a case where you're queuing up too much data but it's possible so in order to deal with that situation nicely we've added the case where a right call will may fail with KO return no space here so if that happens we will then subsequently call the delegate the Q space available notification once the Q is actually available again so you can easily just tend that operation until you're notified that we have Q space again it's pretty much in common operation when dealing with system with slope control now we've also gotten a number of questions about how SCP services work in the system it's it's not straight forward to just go and add new services so that it's a good idea to talk a little bit about how that works you pretty much if if you're looking to add support for you know new Bluetooth profiles or maybe you want to write your own profile like you know maybe your chat service or something like that you will likely need to add services to the system so that other devices can find that service so we've defined really two types of services transient persistent a transient service is as implied it's going to only just for a short period of time in our case what we've done is we've defined that amount of time to be the running time for the application that registered to the service so as soon as that application dies exit just quit by the user we're going to remove that service so you don't have to worry about cleaning up it'll just go away for you persistent service is a little bit better where maybe not better but more useful in some cases anyway where it will stick around outside of the scope of the application that registered it so it'll exist through reboot and doesn't actually require that your client application be running it can be configured to go and automatically launch an application one an incoming connection is created to the service now the service itself we've defined a dictionary format to describe how particular service looks so the dictionary itself has individual entries where each entry corresponds to an sdp attribute now that that format itself is a little bit in depth a little bit more that we can go into here but it should be fully deaf fully documented in the header doc and if you do have any questions about it we've got a developer mailing list was more than happy to help you with anything you need there in addition to the format itself some of the attributes or actually will actually be defined by the system so the service record handle and our comm channel ID are the two that are currently assigned by the systems that way we only have there's a single main space essentially for the record handles and channel I these so we have to manage that internally we also have this additional local attributes attribute that lets you specify some custom controls for particular service that control the behavior of the system with with regards to that single service the currently we only have two supported attributes persistent attributes as you'd expect at the boolean attribute that if accepted true it it indicates that the service will will exist until you remove it if it's either missing or false then that service will be removed as soon as the application exit there's also a target application that specifies a particular application to launch when an incoming service when an incoming connection to that service is established so that pretty much will only work when there's a logged in user so when that users logged in connection to they've created your new chat service and you said oh here's my chat application to to launch one when somebody connects to it well what happened then it'll go and launch an application as the currently logged in user so it's just like they're running a nap now you don't actually have to have a target application for persistent service but it's more useful in that case you might want to have a running process like you know how many extra or something that that provides notifications on the states of thing so you can set up even a persistent service without launching your application and a running app can get notifications for that service additionally we might add we're likely to add new new local attributes to control additional things about the way that individual services behave now in order to actually add a new service we've got function a Bluetooth bad service day it's pretty simple to use and what we've done is for the service dictionary description we've defined it so that it only uses the native plist data types so it makes it real easy you can define your service actually in a plist file load it in and then call add service with that dictionary so you don't have to create a lot of code to build up a complex dictionary you can just do it in the file makes it real easy this particular function will actually return a newly created bluetooth SDP service record that includes all of the attributes that were signed by the system so one thing to really take note here is that if you're creating a persistent service the client has to remember the record handle returned in this in this particular service record because that record handle actually is then used in the remove service with record handle call so if if it doesn't remember it then you're kind of stuck you need to know that to remove that service so in this particular case the transient services you don't need to worry about they'll be removed automatically for you but again if so you only want to service to exist for not so the entire running the application but just part of it you'll need to remember that as well for columnist function so I've got a number of helpful hints here we've got some sample code that does the number of the things I've talked about we've got the are calm server sample is actually a it's a simple chat server that goes along with there's an archon client sample well the server code shows how to it has its own plist file with the dictionary format set for a sort of a fictional custom chat service it also shows how shows how to load that in how to set up the service shave off the shave off the handle and then remove it one needed now in case you do get into situation where say your code crash and didn't save off the handle or if you got to you forgot to implement implement the code to save it off it is possible to remove it with a little bit of surgery so in this case there's the blue dita plist file in the the roots library preferences directory so you can remove that file it will remove your service it will also remove all of the other cash and information on your system so i definitely recommend only doing this in the last ditch effort because you will lose all the device names to buy services you lose all your pairings so if useful as a developer tool but definitely not for for the end user so now how do you actually get access to these new AP is well we are currently in the last stages of working on an sdk that will be based on our 10 to 5 release keep checking the developer sex it will be up there real soon includes all the api's that i've talked about here it also includes support for package decoder which as some of you have noticed in one of our software updates we disabled it for security reasons the packet decoder itself would allow pretty much anybody access to all of the traffic's going over your Bluetooth link and that includes linky data with the hid stuff hit data they could snoop your keyboards and everything so by default in production builds all of the support for package oder decoder is completely removed the f ck itself includes a bill that has that turn back on so all you need to do to use that application and develop your your new services is just installed sdk and you'll get support for it so now I'd like to turn the presentation over to mike larson iza bluetooth technology manager is going to talk about the kind of new new directions and new what's going on in the Bluetooth industry thanks Eric it's been a long year there's been a lot going on Bluetooth industries really come a long way the few industry events have attended it's gone from how do we create this brand new technology and get people to adopt it too ok it's out there it starting to become successful in lots of devices what do we have to do now the push is largely for simple configuration people are realizing that if it takes more than five minutes to configure device the user is going to drop it on the floor and not touch it again and say this doesn't work along those lines the special interest group has now started a what they call the five minute ready initiative what they're looking for there is a five minute out of box experience and that the industry shows others are pushing for even sooner I've heard as low as 30 seconds so that's the goal what else has happened in terms of Bluetooth devices over the last year the user interfaces have gotten a lot simpler if you've an early adopter this I've been he's been been able to notice that the user interfaces moved from five or six levels deep and a device to reddit the foreground with the new devices like the sony ericsson t610 so that's the direction this is going people are starting to take this seriously and figure out a way to get the user up and running in very little time there are a few changes coming on in the technology side from the bluetooth sig in the industry the first one is late this year they're coming out with version 1.2 they have a few features included there the primary one is improved quality of service which means that you can guarantee that your hit devices will get the time to transfer their hit data when they need to and other quality of service dependent devices will get the time they need when they need it another feature of version 12 is adaptive frequency hopping what afh is going to provide is better coexistence of Bluetooth devices what other 2.4 gigahertz devices in order for AOH to work and be successful it does require a version 1 dot to radio on both sides of the length now that's said this is something you're going to want to consider if you're building a hardware device if you have the choice and are making radio decisions now check with your vendors and make sure that the radio that you're going to use for your device will be 1 dot two capable and will support a page it will help you out and it will help your users out down the road now pass the end of this year and on to the next horizon sometime next year hopefully the bluetooth sig and the technology leaders are looking at medium data rate this will require a new radio today's radios aren't likely to be upgradable through firmware to support this it will require a new hardware what does medium data rate gives you it gives you up to two to three megabit per second through put on a single channel so that's currently scheduled for mid next year we hope everything comes together and that'll allow a few more Bluetooth devices to exist on a single link get some some new things using bluetooth there are a few things that we've noticed in the last year and a half two years that we've been playing with Bluetooth and here a few of our notes that will help you out and and make your Bluetooth devices coexist with the rest of the world inquiry operations and paging operations which are device discovery and creating connections respectively they really disrupt data to dot 11 traffic as well as other Bluetooth traffic on the link for that reason in a couple others we do not plan to offer a direct inquiry API accessing the inquiry API is possible through our user interface another thing to make note of is 720 kilobits per second is the total link budget for bandwidth and throughput if you assume that that is the budget available for your connection you're not going to be very kind to other connections and you will not get that throughput if the user is selected to use a bluetooth keyboard or a mouse because the quality of service constraints will require us to access those devices as well so if you need if you need a full seven hundred kilobits the bandwidth Bluetooth is probably the wrong choice for your wireless connectivity if you need someone less than that and can co-exist and and deal with less throughput then it's a good choice this goes back to the point I mentioned on the last slide where paging operations disrupt both existing Bluetooth traffic and 802 11 traffic in order to find out if devices are within range a loop of paging to find if the device is there and connect to it is not a real good use of resources it's not kind to the other people using the link and it's not kind to the 802 11 connections that are in place now I like 10 reduce Craig Keithley who's going to talk about some opportunities that are out there in the Bluetooth world for our customers thank you very much thanks Mike so there are a number of opportunities in fact before I came up on stage today we're talking with Mike and he just got back from the Bluetooth Congress and he tells me that my price point of $75 for a low-cost serial adapter is too high and that it should be doable at forty dollars based on some new chipsets they're coming out so scratch that and put forty dollars in there would you want to see more hid devices and I'm particularly interested in seeing gaming devices come along there are some game pads for example that are RF based but they work with the USB adapter custom one I'd like to see those go to bluetooth digital still cameras are coming along the i3 a committee which is the organization that deals with specifications for digital still cameras does have a PTP over Bluetooth specification and development for those of you who aren't familiar with PTP its picture transport protocol it's the core which our image capture architecture is based all the command sets that are in image caps are capture all those that architecture is its structure around PGP so there's USB PTP cameras available today built-in support with a profile or a USB class driver there are there's a firewire PTP class specification and works and we want to see that extended to digital still cameras as well I've seen some GPS receivers samples that are just in prototype form now that have a bluetooth interface on them and I think that would be a very cool device to have to be able to get your GPS location over Bluetooth wirelessly application wise this is a somewhat challenging area for us certainly the selling clicker is a nice innovative product the question now is what other things can you do application front so I'd like to hear about them you've got ideas you want to want to have us help you with marketing efforts please contact me and that actually goes for all of the tooth products that you might be working on I'm looking at stuff that we can do it next Macworld San Francisco for a Bluetooth area and I'd like to be able to highlight products if we do contact me if you've got something in the works the blue seas hardware solutions well so cereal and audio are the ones that are presently on our minds our hardware is capable of supporting SEO we haven't released any profile support for that yet we should if all things go well be able to do that in the future what I do want to encourage people to do is to pay attention that the SCO and its current implementation is not adequate for doing speech recognition so the SEO based cell phone style headset so that we may be able to support them and the operating system would not be something that I want you to plan on using with our speech recognition engine if you do an advanced audio product however where you can do say stereo headphones or you can get good sample rates on the microphone that's something I'm very interested in working with you on I want to make sure that we have support and our speech recognition engine for those types of devices so as a general rule if you're working on advanced audio we need 22 kilohertz 16-bit resolutions be able to do good speech recognition so as we've mentioned earlier we haven't put anything in the kernel for developers it's not released to Darwin I'm able to consider some specialized of requests that I didn't then need to go work with marketing and engineering on to make sure that it's the right thing to do but I do want to hear from you if you need to do something in the colonel so the roadmap well this is yesterday's session but as you're aware we do have DVDs that come out usually about three months after developer conference so that's one session you should look at the other thing is that and I should have put it on the slide friday morning at nine o'clock in this room we have a kid and force feedback session and if you're doing hit devices or you want to be able to access a Bluetooth hid device you should come to this session as was mentioned we really are or strongly encouraging people to do everything that's hit related through the hidden manager so that includes Bluetooth and in fact it could include almost any transport protocol we could do hit controls over firewire for that matter the the representation of a hidden device with a kid style report report descriptor and getting hid reports will come in through the hidden manager regardless of the transport layer in the future and that's where we want people to go to get hidden data so contact why there's the standard list I do encourage all of you to take a look at the Bluetooth developer mailing list get along Ural there but look for list a pecan and then click on the list on that website there's a lot of lists run by us Bluetooth is one of them and you should go there to participate in discussions with other Bluetooth developers our standard reference library stuff