contiki-os / contiki

The official git repository for Contiki, the open source OS for the Internet of Things
http://www.contiki-os.org/
Other
3.71k stars 2.58k forks source link

Unable to print debug messages in sicslowmac.c #2135

Closed Shridharfly closed 7 years ago

Shridharfly commented 7 years ago

I have set #define DEBUG 1 in sicslowmac.c but the debug messages are not being printed in packet capture display of cooja simulator. I have tried using printf in every function of sicslowmac.c. Also tried #define DEBUG DEBUG_PRINT but no success.

I have used sky motes for udp-server.c and udp-client.c in rpl-udp. I am using latest build of contiki. What might I be doing wrong?

I am able to print debug messages from cc2420.c and sicslowpan.c but not from sicslowmac.c.

I have not made any changes to other files.

Shridharfly commented 7 years ago

I got help from contiki mailing list.

We need to tell contiki which RDC driver to use. By default it is nullrdc_driver. I changed it to sicslowmac_driver.

But then I got undefined reference to sicslowmac_driver in contiki-sky-main.c of sky platform. I could solve it by adding core/net/mac/sicslowmac in Modules of Makefile.sky.