Skip to main content
This topic has been closed for replies.

6 replies

Winfred LU
ST Employee
Mar 25, 2019 1:45 AM UTC

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
BMoha.19Author
Associate II
Mar 25, 2019 8:23 PM UTC

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
Mar 26, 2019 3:52 AM UTC

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
BMoha.19Author
Associate II
Mar 26, 2019 6:22 AM UTC

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
BMoha.19Author
Associate II
Apr 5, 2019 7:48 PM UTC

Hi Winfred,

Any news please?

Best Regard,

Amine

Winfred LU
ST Employee
Apr 8, 2019 1:16 AM UTC

Hi Amine,

You've got the entry.

Please try to replicate Contiki mesh example.

Best Regards,

Winfred