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

Which Example should we use for BLE mesh using nRF52832?

Hello Sir,

I have nRF52832 DK, and several other custom board which nRF52832. I have working on BLE mesh sdk version using is "nrf5_SDK_for_Mesh_v1.0.1_src" and SD132. I want to make BLE mesh in that node, relay node, Border node for communicate with server. I have successful build mesh sdk and also able to flash sample example which is light switch demo. But i want to flow like this:

Node_1(Analog sensor_reading)--------> relay_Node---->Border_Node(Own_Server_Config. Internet Connectivity)-----> send data to Server(Cloud).

Sir, for achieve this above flow which one example is correct for me in Nordic mesh sdk. Please tell me correct approach is it use "light switch demo" but in my application not have on/Off light. only send analog value reading to one node to other node then server. So please sir how i can configure relay node, sensor node and border node. 

Please give me tutorial and what would be the flow for this using nRF52832 BLE mesh. It will use for industrial IoT Monitoring. 

Thanks in Advanced...

Vishal

Parents
  • FormerMember
    0 FormerMember

    This question is more or less the same question, and it has a very good answer. I would recommend you to take a look at it.

  • I have refer this question Send and receive string  for send simple message to node but having some issue for configuring with my existing code. where i need to write this code in my main.c file. can you please tell me and also how i can write same for server. 

    Thanks..

  • Hello Vishal,

    In the link that you refer to Send and receive string, Bjorn has provided the required simple_message model code that needs to be dropped into the models folder of the Mesh SDK. With that in place, you would need to use the light_switch demo as your base and then amend it accordingly.

    Currently the light_switch example demo uses the simple_on_off model so by reviewing that code, you should then be able to replace references (structs/headers/etc.) to the simple_on_off model to simple_message model.

    I would recommend that you simply take a copy of the light_switch example (renaming it to light_switch_02 or light_switch_msg or whatever your preference would be) so that you still have the base working example to fall back on if you run into any problems.

    Finally, as an aside, I notice that both yourself and Pooja appear to ask strikingly similar questions within a fairly close timeframe of each other. If you do work together, I would suggest that you 'pool' your resources and streamline your requests. If you don't currently work together, I would then suggest that you reach out (Nordic provide Request friendship and Follow features) since you both seem to be working towards a similar solution.

    Regards,

Reply
  • Hello Vishal,

    In the link that you refer to Send and receive string, Bjorn has provided the required simple_message model code that needs to be dropped into the models folder of the Mesh SDK. With that in place, you would need to use the light_switch demo as your base and then amend it accordingly.

    Currently the light_switch example demo uses the simple_on_off model so by reviewing that code, you should then be able to replace references (structs/headers/etc.) to the simple_on_off model to simple_message model.

    I would recommend that you simply take a copy of the light_switch example (renaming it to light_switch_02 or light_switch_msg or whatever your preference would be) so that you still have the base working example to fall back on if you run into any problems.

    Finally, as an aside, I notice that both yourself and Pooja appear to ask strikingly similar questions within a fairly close timeframe of each other. If you do work together, I would suggest that you 'pool' your resources and streamline your requests. If you don't currently work together, I would then suggest that you reach out (Nordic provide Request friendship and Follow features) since you both seem to be working towards a similar solution.

    Regards,

Children
  • Thanks for your quick response,

    I have replace on_off model to simple_message_model but i am confusion on the following code:

    where i need to write in client main.c file 

    if (length)
                {
                  msg.opcode.opcode =simple_message_OPCODE_SEND;
                  msg.opcode.company_id = 0x0059; // Nordic's company ID
          
                  msg.p_buffer = (const uint8_t *) &buffer[0];
                  msg.length =length;
                  address = 0xCAFE;
                  address_set(address);
                  SEGGER_RTT_printf(0,"Sending to group address 0x%04x\n", address);
                  status= access_model_publish(m_clients[0].model_handle, &msg);
    
                  if (status == NRF_ERROR_INVALID_STATE ||
                  status == NRF_ERROR_BUSY||status == NRF_ERROR_NO_MEM)
                   {
                     __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Cannot send. Device is busy.\n");
                      hal_led_blink_ms(LEDS_MASK, 50, 4);
                   }
                   else
                   {
                         ERROR_CHECK(status);
                   }
                }

    I have write the above code in own created function and call this in main. but now
    unable to send simple message to server.

    Please tell me where should i need to declare the above code.

    Thanks,
  • Hello Vishal,

    Again, in line with my final suggestion in my previous answer, here is a request submitted today by Pooja which is exactly the same as your question above...



    Forgive me for taking you to task over this but sending in multiple requests for forum help covering the same question (whether you are the same person with 2 different profiles or work on the same team) doesn't increase your chances of getting an answer. In essence, it really means that you lessen your chances of a valid response/resolution to your later query since Nordic employees and/or other forum experts spend additional and precious time reviewing the same question in different posts!!

    Given the above, I would therefore suggest that you subscribe to the question posted by Pooja and follow any possible solution that may be given on that particular thread.

    Regards,

  • Ya right Pooja question and my question is really same sorry for that or any inconvenience from me. i will communicate and find solutions for the same.

    Thanks.........

Related