cancel
Showing results for 
Search instead for 
Did you mean: 

Working MESH network without a smartphone

apronin47
Associate II

I am trying to implement a working MESH network without the participation of a smartphone. The idea is to send messages from all test nodes to one specific node through the MESH, which has the same hardware structure as the rest. This node should process the incoming message and perform some actions with its peripherals. Is it possible? Please advise how best to implement it.

Which profile is better to choose for the model on-off? Please, advise what I should pay attention to.

18 REPLIES 18
Winfred LU
ST Employee

Hi apronin47,

Yes, it is possible.

Something similar has been implemented in Mesh DK that you may reference:

when the user click (short press) button 1 or 2 (in Appli_Process()),

the firmware will publish a message to other nodes in the mesh network (in Appli_ShortButtonPress() and BluenrgMesh_ModelsCommand()).

For model choices, Generic On-Off is a good one, vendor specific model is also OK.

Best Regards,

Winfred

Anitha
Associate III

Sir but for publish those messages in the other nodes we have to provision those nodes with app right

apronin47
Associate II

Hi Winfred,

Thank you for your reply.

Sorry for I am not so friendly with MESH. Please help me with some other issues.

  • How can I set specific node as addressie for messages from other nodes without configuration by a smartphone application?
  • I have PCB's with BNRG-232 inside. BNRG has different pin configuration as it set in evaluation board. So I must change pin configuration gave in example project. Where have I make changes for this task? I guess best way is to create header file as "USER_Platform_Configuration_***.h" and add it to my project, excluded from project "USER_Platform_Configuration_STEVAL_IDB007V1.h".
  • Where should I set model choise?
  • I use PCB's with battery supply as nodes for MESH. I'v planed that every twenty seconds all nodes should wake up for publishing message for main node. And after this activity period MESH will sleep for next twenty seconds, and so on. Please share your opinion for my approach.

Best Regards,

Andrey

Hi Andrey,

The parameter "peer" is to set destination address for BluenrgMesh APIs, such as BluenrgMesh_SetRemoteData(), BluenrgMesh_ReadRemoteData(), etc.

It shall be good to just use publish address, please call BluenrgMesh_GetPublishAddress() to get the publish address of a node.

Yes for USER_Platform_Configuration.h

please refer to the procedures in SDK_EVAL_Config.h:

  1. Create a file "USER_Platform_Configuration.h" with specific user  platform configuration (USER_Platform_Configuration_STEVAL_IDB007V1.h can be used as reference).
  2. Place the "USER_Platform_Configuration.h" on the SDK_Eval_BlueNRG1\inc folder. 
  3. In your IDE preprocessor options, add this define:  USER_DEFINED_PLATFORM=USER_EVAL_PLATFORM

Please pre-define your own model choice and use corresponding APIs.

Please implement your application in Appli_Process(). For your ease of usage, please leverage the general purpose timer library (gp_timer.c) to calculate the expiration of 20 seconds.

Note that even if the application acts at each 20 seconds, it is necessary for the device to wake during the 20 seconds (when application sleeps), in order to keep BLE stack and Mesh stack working. The processing APIs BluenrgMesh_Process() and BluenrgMesh_ModelsProcess() have to be kept in the main loop.

Best Regards,

Winfred

Yes. Those are all based on the assumption that the nodes are provisioned in the mesh network.

apronin47
Associate II

Hi, Winfred!

Thank you for your explanations.

I shall use "generic on/off" model so I have associated question for this.

I guess "mesh_cfg_usr.h" is the place where I can make model choice for "#define ENABLE_GENERIC_MODEL_SERVER_ONOFF ". And as I think all other models should be commented. Am I right?

Best regards,

Andrey

Right !

apronin47
Associate II

Hi Winfred!

In my project I use the "i2C1" interface. When I compile, I get the following error:

".. \ .. \ .. \ .. \ .. \ .. \ Drivers \ BSP \ SDK_Eval_BlueNRG1 \ src \ SDK_EVAL_I2C.c (575): error: # 20: identifier" SDK_EVAL_I2C_IRQ "is undefined"

How do I need to modify the "USER_Platform_Configuration.h" file to resolve this error?

Best regards,

Andrey

Please try to define SDK_EVAL_I2C_IRQ I2C1_IRQn