• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: pairing to a device using iobluetoothdevicepair. how to avoid pass dialog?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pairing to a device using iobluetoothdevicepair. how to avoid pass dialog?


  • Subject: Re: pairing to a device using iobluetoothdevicepair. how to avoid pass dialog?
  • From: Camille Troillard <email@hidden>
  • Date: Wed, 01 Feb 2012 12:59:18 +0100

Hi Anton,

You must set a delegate IOBluetoothDevicePair and implement the methods.
After the pairing object is started, your delegate methods will be called.
The one you more specifically want to implement is devicePairingPINCodeRequest, as described in:

http://developer.apple.com/library/mac/#documentation/DeviceDrivers/Reference/IOBluetooth/IOBluetoothDevicePair_h/index.html#//apple_ref/c/func/devicePairingPINCodeRequest:.

This is where you call -[replyPINCode:PINCode:].


Best Regards,
Cam



On Feb 1, 2012, at 12:35 PM, Anton Albajes-Eizagirre wrote:

Hi,

I'm trying to code a class able to pair to a bluetooth device using a known password. I'm trying the following code:

uint8 pass[4] = {1,2,3,4};
IOBluetoothDevicePair *btPair = [[IOBluetoothDevicePair alloc]init];
[btPair setDevice:dev];
[btPair replyPINCode:4 PINCode:(BluetoothPINCode*)pass];
if([btPair start]!=kIOReturnSuccess)
return -1;

after a while start message is send, a graphical dialog asking for the password is shown. if the password is correctly typed, the device is successfully paired. My main questions is: how do I avoid the need of such dialog? Isn't replyPINCode message supposed to avoid the need of the dialog? Am I specifying the password wrong ('1234' is what i would type on the dialog to make it work).

Also, secondary questions:
- once the device is paired, it is also automatically connected. is that the expected behaviour? also, after a while, it automatically disconnects.
- is there a callback function for when the pairing process is completed? or is there  way where i can know if the pairing was successful and/or completed, besides re-checking the list of paired devices?

many thanks,

Anton
-- 
Anton Albajes-Eizagirre
Researcher and Project Manager
Starlab Consulting Division

Starlab
C/Teodor Roviralta, 45
08022 – Barcelona - Spain
tel. +34 93 254 03 70, ext 42
mob. +34 670 02 14 19
fax. +34 93 212 64 45
skype. antonae
e-mail. email@hidden
PGP public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x676FFE1C363C2AF0
___________________________________________________________
STARLAB, Living Science http://starlab.es

This e-mail and the attached files contain confidential information and
are of exclusive use for the addressee. The disclosure, copy and
distribution of the present message and its attachments are prohibited.
If you are not the intended recipient and you receive this
communication, we inform you that it is forbidden by law to read copy or
use it. Please notify us at email@hidden and proceed immediately to
delete it.
We inform you that your personal data are stored under the responsibility 
of Starlab Barcelona, S.L. solely for the purposes of maintaining a business 
relationship with you or your company.According to the provisions of the 
LOPD15/1999, you may exercise your rights of access,opposition,modification 
or cancellation at email@hidden or at Teodor Roviralta nº45, 08022 Barcelona.

Este correo electrónico y los archivos adjuntos al mismo [en su caso]
contienen información confidencial y de uso exclusivo para su
destinatario o destinatarios. Queda prohibida la divulgación, copia o
distribución de la información contenida en el mismo y, en su caso, de
la información contenida en los archivos que pueda llevar adjuntos. Si
usted recibe este correo por error, no siendo el destinatario del mismo,
le indicamos que por ley no le está permitido la lectura, copia y uso
del mismo. Se ruega lo notifique lo antes posible a la dirección
email@hidden y proceda a borrar el mensaje inmediatamente después.
Le informamos que sus datos forman parte de un fichero responsabilidad 
de Starlab Barcelona, S.L., y serán tratados con la finalidad de mantener 
la relación negocial con usted o su empresa. Conforme a lo establecido 
en la L.O. 15/1999 podrá ejercer sus derechos de acceso, rectificación, 
cancelación y oposición a email@hidden o a Teodor Roviralta nº 45, 08022 
Barcelona.





Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: pairing to a device using iobluetoothdevicepair. how to avoid pass dialog?
      • From: Matthias Ringwald <email@hidden>
  • Next by Date: Re: pairing to a device using iobluetoothdevicepair. how to avoid pass dialog?
  • Next by thread: Re: pairing to a device using iobluetoothdevicepair. how to avoid pass dialog?
  • Index(es):
    • Date
    • Thread