cancel
Showing results for 
Search instead for 
Did you mean: 

How to use S2-LP with contiki?

Gz
Senior

Hi All;

I would like to know how to use S2-LP with contiki. I saw border-router, serial sniffer, udp client and udp server are example code. I don't saw sensor node to example code. Could you please advice me about how to build sensor node project with STM32CubeIDE?

Best regards.

21 REPLIES 21
MGREL
ST Employee

Hello,

X-CUBE-SUBG2 integrates contiki-NG stack ("os" folder, currently only CSMA MAC is validated, not TSCH).

It provides 3 applications coming with Contiki-NG: UDP Client and Server (from "rpl-udp" example) and Border Router (from "rpl-border-router" example).

It also deliver Serial Sniffer application in order to be able to capture RF packets.

Which specific example are you referring to?

In general, if you start from a given example, say UDP Client, you can modify it by replacing the application code (udp-client.c) with the new one(s) from the Contiki-NG examples folders.

Hello @MGREL​ ;

Thank you for your reply.

I would like an example code for sensor node send the data( MESH ) to Border Router. Could you please advice me this issue?

Thank you,

Best regards.

This is probably getting beyond a functionality demo and into an actual final application. Perhaps work with the FAE responsible for your account, they might be able to assist directly, or suggest local contractors with suitable experience in developing end-to-end solution.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MGREL
ST Employee

Hello,

if you want to send data through the Border Router from 6LowPAN network to a IPv6 host you can do as described in the documentation:

https://www.st.com/resource/en/user_manual/dm00674239-getting-started-with-xcubesubg2-sub1-ghz-rf-software-expansion-for-stm32cube-stmicroelectronics.pdf

page 28, i.e. you need to recompile the UDP Client to send data to a specific address (the one that you pass to the Border Router via tunslip6 or wpcapslip6 application) and use a UDP Server that runs on the host (PC) in order to receive the data.

This scenario is conceptually similar to UDP Client and Server, since the UDP Server sets itself as root of the RLP tree, just like the Border Router, and the UDP Client in the default configuration sends data to the RPL tree root.

Mesh (multi-hop) is enabled by default with rpl lite protocol.

Hello @MGREL​ ;

Thank you for your reply.

I am try this your solution. My network is not mesh tropology. show photo below

0693W000007CyFrQAK.jpgThis photo. Client 2 should send the data to Client 1 then Client1 send the data from Client 2 to Border router.

0693W000007CyG6QAK.jpgThis photo to show message client 1.

0693W000007CyGfQAK.jpg 

Could you please advice me to make mesh tropology with S2-LP ( Client mesh example )?

Thank you,

Best regards.

MGREL
ST Employee

Hello,

if you configured both the UDP Clients to send data to "aaaa::1" address it is normal that you see the UDP messages on the UDP Server running on the host, this regardless the fact that the network topology is star or mesh.

To try to setup a mesh (multi-hop) you can try to setup a linear topology with the second node in the radio range of only the first node:

BR ------- NODE1 -]------ NODE2

Where ']' is the end of BR's radio range.

Not sure if I replied to your question...

Hello @MGREL​ ;

Thank you for your reply.

I try your solution. It's successful. I have a question below.

  1. I would like to know why Client1 and Client2 use a long time ( Some time ) to connect to Border Router.
  2. I would like to know how I get message from Border Router( Could you please tell me parameter in Border Router example code ?).

Thank you,

Best regards.

MGREL
ST Employee

Hello,

can you specify the hardware that you are using (NUCLEO and X-NUCLEO) for all the devices?

The Clients are running UDP Client, taken from X-CUBE-SUBG2 3.0.1, and just recompiled to let them send to "aaaa::1" address? IDE is STM32CubeIDE?

The Border Router is original one?

Host is Windows 10?

The same issue (sometime long time to get the rpl parent) happens also if you use only one client node?

By any chance there might be heavy noise on that RF band?

One thing that you can do is to recompile clients FW without L2 security and use the Serial Sniffer to capture RF packets.

Other test: if you use two UDP Clients and one UDP Server, do you experience the same issue?

With regards to your question number 2, what do you mean by "message from Border Router"?

BR

Hello, @MGREL​ ;

Thank you for your reply.

can you specify the hardware that you are using (NUCLEO and X-NUCLEO) for all the devices?

  • Yes, I use NUCLEO-F401RE and X-NUCLEO-S2868A2 amout 5 boards.

The Clients are running UDP Client, taken from X-CUBE-SUBG2 3.0.1, and just recompiled to let them send to "aaaa::1" address? IDE is STM32CubeIDE?

  • Yes, I use example code UDP client and define send the data to "aaaa::1".

The Border Router is original one?

  • Yes. It's original from example code. I don't modify.

Host is Windows 10?

  • Yes. I use on Windows 10.

The same issue (sometime long time to get the rpl parent) happens also if you use only one client node?

  • Yes.

By any chance there might be heavy noise on that RF band?

  • I test with frequency 868MHz. The frequency is 868MHz not allow in my country. I think it shouldn't be a problem when I test with this frequency.

One thing that you can do is to recompile clients FW without L2 security and use the Serial Sniffer to capture RF packets.

  • Yes. I don't use Sniffer to capture RF packets.

  Other test: if you use two UDP Clients and one UDP Server, do you experience the same issue?

  • I use 2 Clients and 1 Border router. I found a problem as I inform.

  With regards to your question number 2, what do you mean by "message from Border Router"?

  • I would like to know when Client1 send the data is "Hello" to Border router. What is the variable in Border router example code keep message from Client1?

Thank you,

Best regards.