[Contiki-developers] Help for ContikiMac protocol transplantation

54 views
Skip to first unread message

桦 邓

unread,
Apr 5, 2011, 10:43:10 PM4/5/11
to contiki-d...@lists.sourceforge.net
Hello developers,
 
My tutor asked me to apply ContikiMac protocol on the radio chip AT86RF212. I have already read related codes from Contiki 2.4 codes packet and some papers about Contiki OS. Till now, I have understood the following aspects from codes and papers.
 
1、ContikiMac protocol is applied on Tmote Sky which is mainly consisted by MPS430 and CC2420 and SICSLoWMAC protocol is applied on ATAVRRZRAVEN which is mainly coonsisted by AVR 2561 and AT86RF212/230.
 
2、The relationship between SICSLoWMAC and the driver of AT86RF212/230 is connected by functions sicslowmac_datarequest()、radio_send_data()、mac_task() and radio_trx_end_event() in codes named sicslowmac.c and radio.c. (The reference is http://www.sics.se/~adam/contiki/docs/a01457.html).
 
In order to complete my tutor's assignment, I plan to find out the connection between ContikiMac and CC2420's driver like the connnetion between SICSLoWMAC and the driver of AT86RF212/230 first and then change the connection to apply ContikiMac protocol on AT86RF212/230.
 
The problem now I am facing at is that I can not find the functions in codes named Contikimac.c and CC2420.c which act as connection functions like the four functions I have listed above.
 
I hope I have made my understanding and problem clear.
    
Could you tell me whether my two understandings about Contiki is correct and my plan is feasible? If it is feasible, how can I find the connection and what can I do next?
 
Thank you very much!
    
Best regards,
    
Deng, Hua

Mariano Alvira

unread,
Apr 6, 2011, 6:11:19 AM4/6/11
to Contiki developer mailing list
These connections work differently now after 2.4.

To switch to ContikiMAC, you need to find in your platform config:

/* Network setup for IPv6 */
#define NETSTACK_CONF_NETWORK sicslowpan_driver
#define NETSTACK_CONF_MAC nullmac_driver
/*#define NETSTACK_CONF_RDC contikimac_driver*/
#define NETSTACK_CONF_RDC nullrdc_driver
#define NETSTACK_CONF_RADIO contiki_maca_driver
#define NETSTACK_CONF_FRAMER framer_802154

And set NETSTACK_CONF_RDC contikimac_driver

Then to use the AT86RF212 radio you set NETSTATCK_CONF_RADIO to
whatever it needs to be.

The RDC layer now makes calls to things like

NETSTACK_RADIO.on();
NETSTACK_RADIO.off();
NETSTACK_RADIO.channel_clear()
NETSTACK_RADIO.pending_packet()
NETSTACK_RADIO.transmit(
NETSTACK_RADIO.prepare
NETSTACK_RADIO.read

Hope that helps...

-Mar.

> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Contiki-developers mailing list
> Contiki-d...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/contiki-developers


------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Contiki-developers mailing list
Contiki-d...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/contiki-developers

Reply all
Reply to author
Forward
0 new messages