• Hi,

    I setup a simple GATT TimeService 0x2A2B : 0x2902 with nRF Connect on Android (Nexus 5X).

    Trying gatt.connect() with the following simple script from puck results in Connection Timeout:

    NRF.findDevices(function(devices) {
        console.log(devices[0]);
        devices[0].gatt.connect().then(function(g) { 
            g.disconnect();
        });
    }, 3000);
    

    Any hint?

  • Are you sure that your Nexus actually supports peripheral mode?
    http://stackoverflow.com/questions/26482611/chipsets-devices-supporting-android-5-ble-peripheral-mode

    Can you see/connect the Nexus with other BLE devices?

  • Just checking - are you using up to date firmware on the Puck? (1v91?)

    If you have a second phone, it might be worth trying to use nRF Connect on that to try and connect to the first one, just to make sure it is actually working ok.

  • Yes - firmware is updated to 1v91.

    Two phones/tablets (Nexus 5X and Nexus 9) with nRF Connect are working in both directions.

  • Anyone who successful connect a puck to a gatt service?

  • I haven't on Android.

    However EspruinoHub creates an HTTP Proxy service on a Raspberry Pi, and that works just fine with Puck.js

  • EspruinoHub doesn't work for me. My outdoor scenario requires data transfer between regular cell phones and pucks - a lot of pucks ;) I try to use your puck as a timestamp-unit for orienteering. Every time a puck get in range of a cell phone running my app it should synchronize its collected timestamps-data to my central portal. So it's absolutely necessary to transfer data between puck and android.

    Are there any options for debugging?

  • For debugging you can connect the Puck via UART so you can communicate with it without having to have an active Bluetooth connection: http://www.espruino.com/Puck.js#serial-console

    For lower level stuff you can also use this tool - but it needs an nRF51DK board: https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Sniffer

    Adafruit also have a sniffer: https://www.adafruit.com/product/2269

    Is the idea that the people doing orienteering have the pucks, and the phones are static - or vice-versa?

    Another option might be to make the Android app on the phone detect the advertising of Pucks it is interested in, and then to initiate a connection to the Puck itself - rather than going the other way?

    I'll have a go here and will see if I can connect to a phone from a Puck though.

  • Ok, I just tried and my phone (Moto G3) doesn't appear to be capable of being a GATT Server - at least I can't get anything out of nRF Connect that's visible on any other device.

    Unless you're supplying the phones for your Orienteering, you might find that some of them are like mine. It might be that trying to work the other way (with the app on the phone initiating the connection to the Puck) is compatible with far more phones.

  • FYI: The ASUS ZenPad Z380M works as a GATT Server. The best app to test BLE server capability is the Nordics "nRF Connect" app on Google Play. You need devices with Android 5 or higher and hardware support included.

    Worth mentioning that DroidScript has a BLE Beacon/Server plugin in beta (if you ask on the forum then you can probably get hold of it)

    https://groups.google.com/forum/#!forum/androidscript

    These devices supposedly also support BLE advertising:-

    Phones and tablets
    Google Pixel [XL], Pixel C, Nexus 6P, 6, 5X, 9, patched Nexus 5
    Alcatel One Touch Idol 3 [Dual SIM], Fierce XL
    Asus Zenfone 2 [Laser], Zenpad 8
    Blackberry Priv
    HTC 10, One M9, Desire (530/626s/820)
    Huawei Ascend Y550, Honor 5X, Union
    Lenovo K3 Note, Vibe P1m, Vibe K4 Note
    LG:
    G5, G4 [Stylus], G3, G Flex2, G Vista 2
    V10, K10, L Bello, Lancet, Leon, Magna, Optimus Zone 3, Spirit, Tribute 5
    Moto X Play, X Style, X2, G2, G3, G4, Z Droid, Droid Turbo 2
    Nextbit Robin
    OnePlus 2, 3
    OPPO A33f
    Samsung Galaxy:
    S7 [Edge] - up to 8 concurrent running BLE advertisers
    S6 [Active/Edge/Edge Plus], S5 [Active/Neo]
    Note 5, Note Edge, Note 4
    Tab S2 (8.0/9.7), Tab S (8.4/10.5), Note Pro, Tab A 9.7, Tab E
    A5 2016 [Duos]
    J5, J3 Duos
    Alpha, Core Prime, Grand Prime, On7
    Sony Xperia E5, X, Z5 [Compact/Premium], C5 Ultra, C3, M4 Aqua [Dual]
    Xiaomi Redmi 3, Note 2, Note 3, Mi 4, Mi 4i, Mi 5, Mi Max
    ZTE Maven, ZMAX 2, Zmax Pro, Warp Elite
    Android TVs
    Sony Bravia 2015

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Connection Timeout while connecting to GATT Service on Android Device

Posted by Avatar for chrisJ @chrisJ

Actions