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

beacons in conjunction with a server in a MESH

Hey is it possible to use advertising beacons together with an server or there will be some collisions in message reception  ?

what i want to do is: setup a mesh which consist of several servers with advertising beacons activated and a client (client is on pc via serial port and interactive.py ). Each such server can send and receive advertising Beacons to see who is in the neighborhood. Each server creates a list of hes neighbors and if a client send a get_list message it responses with a list of hes neighbors.

is it in principle possible to implement such a structure or there will be some collisions? I already joined mesh beacon example and mesh light switch server example and it seems to work but maybe there could be some problems later because of packet reception in two different function or something like that. And second problem is:  I try now to implement a new model based on simple_on_off which can response with a unit16_t array and I am not sure whether I can use such complex structure as message parameter. 

Parents
  • I want send this structure

    /** Message format for the neighbours list message. */
    typedef struct __attribute((packed))
    {
        uint16_t*  present_neighbours; /**< Current neigbour list. */
    } neighbours_msg_status_t;

    via reply_status(...)

    static void reply_status(const neighbours_server_t * p_server,
                             const access_message_rx_t * p_message,
                             uint16_t* present_neighbours)
    {
        neighbours_msg_status_t status;
        status.present_neighbours = present_neighbours;
        access_message_tx_t reply;
        reply.opcode.opcode = NEIGHBOURS_OPCODE_STATUS;
        reply.opcode.company_id = NEIGHBOURS_COMPANY_ID;
        reply.p_buffer = (const uint8_t *) &status;
        reply.length = sizeof(status);
        reply.force_segmented = false;
        reply.transmic_size = NRF_MESH_TRANSMIC_SIZE_DEFAULT;
        reply.access_token = nrf_mesh_unique_token_get();
     
        (void) access_model_reply(p_server->model_handle, p_message, &reply);
    }

    but it doesn't work correct

  • Sorry for the delayed response. Have you tried to provision the beaconing example via Interactive PyACI directly?

    It should work to combine the light switch server with the beaconing example as you have done. There has been a devzone case related to this previously here. Regarding wireless interference between the mesh packets & the advertising beacon packets, this should not be an issue. The beaconing documentation explains a bit better how the beacon packets are scheduled (see Section Beacon transmission). 

     Are you using mesh sdk v2.1.1? Regarding your comment, do you receive any error messages from the reply_status() function when you send the neighbours_msg_status_t structure? Have you looked at the documentation provided for creating new models?

Reply Children
No Data
Related