cancel
Showing results for 
Search instead for 
Did you mean: 

S2-LP and mesh stack

BMoha.19
Associate II

Hello,

Is s2-lp RF module supports mesh? If yes, where can'i found mesh stack and how it can be used?

Is below application note describe how can'i configure s2-lp module to work on mesh network? https://my.st.com/resource/en/design_tip/dm00567382.pdf

Thanks in advance.

6 REPLIES 6
Winfred LU
ST Employee

Hi Nasramine,

Please take a look at X-Cube-Sub1,

which includes diddleware library with Contiki OS and Contiki 6LoWPAN protocol stack

with ability of mesh networking.

https://my.st.com/content/my_st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-subg1.license=1553344373402.product=X-CUBE-SUBG1.version=3.1.0.html

Thank you.

Best Regards,

Winfred

BMoha.19
Associate II

Thanks a lot for your Answer.

In X-Cube-Sub1 i didn't found a complete example with mesh networking. Examples under "X-CUBE-SUBG1\en.x-cube-subg1_firmware\STM32CubeExpansion_SUBG1_V3.1.0\Projects\Multi\Applications\Contiki" didn't describe how to create mesh network

I saw that we have mesh api such as mesh_open, mesh_send..., should these APIs be called just after Stack_6LoWPAN_Init in each node?

Thanks a lot in advance.

Winfred LU
ST Employee

Hi Nasramine,

For Contiki's mesh samples, please refer to Contiki's document

http://contiki.sourceforge.net/docs/2.6/a00011.html

Best Regards,

Winfred

BMoha.19
Associate II

Hi Winfred,

Thanks for Contiki's mesh samples.

All mesh APIs (mesh_open, mesh_send...) should be called after calling API Stack_6LoWPAN_Init (otherwise S2_LP transceiver will not be started and mesh cannot be established)?

Mesh code deployed in each node will be something like this:

int main()

{

HAL_Init();

/* Configure the system clock */

SystemClock_Config();

HAL_EnableDBGStopMode();

MX_GPIO_Init();

USARTConfig();

#if MCU_LOW_POWER

if (USER_CLOCK_FREQUENCY != DEFAULT_CLOCK_FREQUENCY) {

   HAL_RCC_DeInit();

   LP_sysclk_config(USER_CLOCK_FREQUENCY);

   MX_GPIO_Init();

   HAL_UART_DeInit(&UartHandle);

   USARTConfig();

}

#endif /*MCU_LOW_POWER*/

/* Initialize LEDs */

BSP_LED_Init(LED2);

RadioShieldLedInit(RADIO_SHIELD_LED);

BSP_PB_Init(BUTTON_USER, BUTTON_MODE_EXTI);

/* Initialize RTC */

RTC_Config();

RTC_TimeStampConfig();

_print_fw_info();

Stack_6LoWPAN_Init();

mesh_open(&mesh, 132, &callbacks);

....

Thanks to correct me if i'm wrong

Best Regard,

Amine

BMoha.19
Associate II

Hi Winfred,

Any news please?

Best Regard,

Amine

Winfred LU
ST Employee

Hi Amine,

You've got the entry.

Please try to replicate Contiki mesh example.

Best Regards,

Winfred