W3C home > Mailing lists > Public > public-web-bluetooth-log@w3.org > April 2016

[web-bluetooth] After gatt.connect() server coming back undefined.

From: Dan Klein via GitHub <sysbot+gh@w3.org>
Date: Tue, 26 Apr 2016 22:32:55 +0000
To: public-web-bluetooth-log@w3.org
Message-ID: <issues.opened-151255061-1461709974-sysbot+gh@w3.org>
danhklein has just created a new issue for 
https://github.com/WebBluetoothCG/web-bluetooth:

== After gatt.connect() server coming back undefined. ==
After .requestDevice, I'm unable to get server out of next promise. 
Would love advice about what is happening. Thanks in advance!

navigator.bluetooth.requestDevice({
              filters: [{
                namePrefix: ['BB']
              }]
            })
            .then(device => {
           //I am getting device object here
     
             return  device.gatt.connect();
        })
        .then(server => {
        //server coming back undefined.
           
server.getPrimaryService("22bb746f-2bb0-7554-2d6f-726568705327");
        })

Please view or discuss this issue at 
https://github.com/WebBluetoothCG/web-bluetooth/issues/232 using your 
GitHub account
Received on Tuesday, 26 April 2016 22:32:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 26 April 2016 22:32:57 UTC