'R' won't connect to app

I'm trying to connect my R sensor to the app and via the C++ interface, the app just shows 'Connecting' all the time and the default project just crashes.  Is this an indication of a dodgy sensor?

Comments

  • Which app are you referring to?  Assuming you are using one of the UWP sample projects, try the Android or iOS MetaWear apps to see if the same behavior occurs.
  • It's the android app that I'm using, comes up with the connecting screen but then does nothing.  I've also tried one of the sample projects which don't work either...
  • edited June 2016
    Is this just a dodgy sensor, I've spent a lot of time on this already and my experience of using these types of sensors in the past is not encouraging...
  • Try connecting to the board with the nRF Master Control Panel app.  Given what you have described, it looks like the service discovery portion of the API is timing out.

    Also, what phone and OS are you using?
  • I am using using an Android phone but have also tried using a c# project with similar results.  

    Ran nRF master control which t connected to but I don't have any idea of how to interpret what it's telling me...  
  • What Android phone and Android OS are you using?

    Using the Master Control Panel app is just to see if the board can be connected to.  Since it can, everything points to the service discovery timing out which is why we need to look at your phone model and OS.
  • Hi,
    I experience the exact same behaviour as described by polymrph.
    I have tried both android apps to connect with my device (Model: MetaWear R1) and I manage to pair the device but when I want to connect with the app the connection dialog vanishes after some time and I'm asked to choose the device again.
    As suggested I have tried to connect with the nordic nRF master and the app manages to connect immediately. Some information that I managed to retrive using the nRF master is the following:

    Device Information (UUID: 0x180A PRIMARY SERVICE)
    (Manufacturer Name String) 
    UUID: 0x2A29 Value: MbientLab Inc
    (Serial Number String)
    UUID: 0x2A25 Value: 5D6000
    (Hardware Revision String)
    UUID: 0x2A27 Value: 0.2
    (Firmware Revision String)
    UUID: 0x2A26 Value: 0.4.1

    Battery Service (UUID: 0x180F PRIMARY SERVICE)
    (Battery Level)
    UUID: 0x2A19 Value: 99%

    Generic Access (UUID: 0x1800 PRIMARY SERVICE)
    (Device Name)
    UUID: 0x2A00 Value: MetaWear
    (Appearance)
    UUID: 0x2A01 Value: [384] Generic Remote Control (Generic category)
    (Peripheral Preferred Connection Parameters)
    UUID: 0x2A04 Value: Connection Interval: 7.50ms - 1000.00ms, Slave Latency: 0, Supervision Timeout Multiplier: 600

    I hope this information can be useful in some kind and I would like to know what I can do to connect to my device.

    PS: Further
    I tried to use the UWP app template (https://github.com/mbientlab/MetaWear-UwpStarter/archive/master.zip)
    on my widows 10 pc which launches and lets me select the device but then fails
    to connect at the following line 115 of the MetaWearBoard.cs: 

    btleDevice.GetGattService(charGuid.serviceGuid).GetCharacteristics(charGuid.guid).FirstOrDefault().ReadValueAsync();

    There I get a null
    reference exception as it seems that “btleDevice.GetGattService(charGuid.serviceGuid).GetCharacteristics(charGuid.guid)” returns an empty
    list of characteristics.
    (If I understood this correctly)

  • @Eric I missed your comment. But for me the device is an Motorola G (3 Generation) with android 6.0. My pc instead is running windows 10. 
  • I have not had good experiences with the Bluetooth radio on Moto G phones.  The 2nd generation Moto G phone (also Android M) in the office can connect to the MetaWear boards but sometimes the connections simply fail and the there is a noticeable delay in characteristic changes.  What I notice is that the phone does connect to the board but the API times out when attempting to query the board for available sensors.

    You can test button notifications by expanding the Unknown Service item (326A9000-85CB-9195-D9DD-464CFBBAE75A) and:
    1. Enable notifications on characteristic 9006
      • Press the icon with the 3 down arrows
    2. write "010101" to characteristic 9001
    3. Press the button on the MetaWear
  • I've done this and I can see the 'Unknown characteristic' value changing when I press the button.  But...  how does this help me and (GKanitz)?  Is the sensor faulty or will it just not interact properly (for me if it doesn't work with the app or the example project then it's faulty).

    thanks.
  • @eric I have tried your suggestion and I can see that the information of the button state is transmitted. But considering that the nRF master manages to capture this information it makes it seem to me that is is merely a software issue. 
    I have tried to connect to the device with with several smartphones around here and your software fails with all I have tried but the test using the nRF master succeeds with all. For this it starts to seem to me that the troubles are somewhat within your software rather than my phone.
  • edited June 2016
    If you don't mind doing a bit of debugging, can you insert a few log calls in the MetaWearBleService.java file and let me know what the output is when you try to connect:

    Line 474: Log.i("MetaWear", Arrays.toString(command));

    Line 991: Log.i("MetaWear", "Response: " + Arrays.toString(response));
This discussion has been closed.