This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to connect the "proxy server" of example "light_switch" in nrf5_SDK_for_Mesh_v2.0.0 with mobile phone ?

I have downloaded "nrf5_SDK_for_Mesh_v2.0.0" yestoday, and try to setup the "light_switch" demo with 3 pic nRF52 DK.

According to the document description, “proxy_server” can provide GATT services after the configuration is completed.

After I start the demo and complete the configuration, I can find the Bluetooth broadcast signal, but when I use the phone to connect to the device, the program will assert.

I want to know how to use mesh's "proxy node" feature in light_switch example.

Parents
  • Hi,

    Thank you very much for reporting this issue. It is highly appreciated! I am sorry for the delay from our side.

    I have reproduced similar behavior using nRF Connect for desktop.

    I found that the light switch proxy server example asserts with a SoftDevice assert on pc 0x12a42 whenever I expand the services for the device listed in nRF Connect after successfully connecting.

    I have reported the issue to the Mesh team, and they will look into the issue.

    Regards,
    Terje

  • Hi,

    The problem is that the mesh stack does not release the timeslot in time.

    For now, a workaround is to increase the following define on line 65 of timeslot.h:

    /** Allocated time between end timer timeout and actual timeslot end. Should be
     * longer than the longest global IRQ lock in the system. */
    #define TIMESLOT_END_SAFETY_MARGIN_US (100UL)

    Edit: The workaround proposed here did not solve the issue and can be disregarded. See the workaround in my other answer instead. TIMESLOT_END_SAFETY_MARGIN_US of 100 should be sufficient.

    Regards,
    Terje

Reply
  • Hi,

    The problem is that the mesh stack does not release the timeslot in time.

    For now, a workaround is to increase the following define on line 65 of timeslot.h:

    /** Allocated time between end timer timeout and actual timeslot end. Should be
     * longer than the longest global IRQ lock in the system. */
    #define TIMESLOT_END_SAFETY_MARGIN_US (100UL)

    Edit: The workaround proposed here did not solve the issue and can be disregarded. See the workaround in my other answer instead. TIMESLOT_END_SAFETY_MARGIN_US of 100 should be sufficient.

    Regards,
    Terje

Children
  • Hi,

    I have to investigate some more, as with the nRF Connect setup the proxy server now gets an NRF_MESH_ASSERT in the BLE_GATTS_EVT_SYS_ATTR_MISSING case in mesh_gatt_on_ble_evt() in mesh_gatt.c.

    Can you do a debug session in your end as well, and see where it crashes and with what error?

    Regards,
    Terje

  • Hi,

    Today, I try to do the same operation with "nrf5_SDK_for_Mesh_v2.0.1" as last time again. I found that assertion did not appear when using the "nRF Connect" (Andorid) to connect Proxy_server.

    When I try to send byte data to Proxy_Server using "Mesh Proxy Data In" of Mesh Proxy Service, the connection is immediately disconnected without assertion and debugging information(LOG).

    Can you tell me how to use GATT service to send data to Proxy_server, such as sending 0/1 (byte) control LED status.

  • Hi,

    At the moment, you will need a BLE device with the Proxy Client role. We do not provide that in the nRF5 SDK for Mesh, but we are working on libraries for iOS and Android with example apps.

    Currently we have a preview version (pre-alpha work in progress version) for iOS: https://github.com/NordicPlayground/IOS-nRF-Mesh-Library Unfortunately this is all we got at the moment.

    We will release an iOS app soon, based on the library, which lets you test the GATT service from a smartphone. With that, you can provision and configure from the phone, as well as on/off client. Similar library and application for Android will come further down the road.

    Please be warned that in the light switch examples of nRF5 SDK for Mesh v2.0.1, there are two projects named proxy_client and proxy_server. The naming is a bit misleading, as "proxy_client" is actually "light switch client with proxy server", and "proxy_server" is actually "light switch server with proxy server". I.e. both have the Proxy Server role, they are nodes that are part of the normal ADV bearer part of the network. Both of these offers the BLE GATT service to which a device with the Proxy Client role can connect.

    Regards,
    Terje

  • The BLE GATT services which "Proxy_client" offered have any features? Why does the device disconnect immediately when I write data in GATT services?

Related