Contiki UDP packet transmission duration with CC2538

0 votes

Could someone explain me what is going on within the Contiki-OS when it transmits an UDP packet?

Here is the current consumption of my device in details running with the CC2538 chip:

CC2538 Current consumption

My question is: why it takes so long to transmit an UDP broadcast packet (about 250ms) knowing that theoretically at 250kbps the packet of 408 bits length should be transmitted in approximately 2ms? I'd understand if the transmission last lets say ten milliseconds but here the difference is huge.

I use the example in contiki/examples/ipv6/simple-udp-rpl/broadcast-example.c

Does anyone have an idea?

Jul 19, 2018 in IoT (Internet of Things) by Matt
• 2,270 points
699 views

1 answer to this question.

0 votes

By default, Contiki uses ContikiMAC radio duty cycling (RDC) protocol. The protocol has to deal with two conflicting requirements: allow receiver nodes to sleep almost all of the time when there are no packets to receive, but at the same time allow to deliver data as reliably as possible. The solution adopted in ContikiMAC is to place the burden on the transmitter. Given that receiver checks the radio channel 8 times per second (the default configuration on cc2538dk platform), the transmitter has to transmit for at least 125 ms duration to be sure that the receiver has waken up and seen the packet. In practice, this means that a packet is retransmitted for multiple times in row. See the ContikiMAC paper and Contiki documentation for more detailed description.

That being said, you won't always see transmissions with the maximum duration. If its an unicast, the receiver normally sends an ACK after successful reception. The transmitter checks for this ACK, and stops transmitting if received. This way, the expected average number of transmissions required is reduced two times. And then there's also Phase Optimization - it allows the sender to synchronize the start of transmission with the expected wakeup time of the receiver. But for broadcasts, no ACKs are generated and the phase optimization wont work.

Another possible reason for unexpectedly long transmissions is a failing CCA check. Before transmitting a packet, the radio stack first checks if the medium is free; if it's not, it will back up for some time and retry.

answered Jul 19, 2018 by anonymous2
• 4,240 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

Display time in a Windows Core IoT app with a clock!

It is possible, but you should understand ...READ MORE

answered Jul 10, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,554 views
0 votes
1 answer

What is the size of CoAP packet?

It Depends: Core CoAP messages must be small enough ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
2,578 views
0 votes
1 answer

Android Ble GATT_ERROR 133 getting often with samsung devices

I tried the following code #!/usr/bin/python import ibmiotf.device from time ...READ MORE

answered Jul 18, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
2,456 views
0 votes
1 answer

AWS IoT - Access shadow through .Net, REST, with certificate

If you want to publish and/or subscribe ...READ MORE

answered Jul 25, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
2,029 views
0 votes
1 answer

Downloading source code of Android Things

No because AndroidThings is still in preview ...READ MORE

answered Jul 5, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,880 views
0 votes
1 answer

Setting-up a RFID RC522 chip in Raspberry Pi?

First, let me congratulate you on buying ...READ MORE

answered Jul 10, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,686 views
0 votes
1 answer

Creating Android Things' bundle and pushing it over OTA

Here are all the steps necessary to ...READ MORE

answered Jul 6, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
763 views
0 votes
1 answer
0 votes
1 answer

Issues with Intel Edison MRAA module

You can work on this choice:- In the ...READ MORE

answered Jul 11, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,097 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP