Implementation of PMAC program under Contiki (i.)

Source: Internet
Author: User
Tags ack

I use a very simple transceiver program, that is, node 2 to the node 1 Loop hair Packet

First, Cooja simulation, two nodes can not be normal interaction, input function can not be triggered, cc2420 is not triggered; Print node information, suddenly found that node 2 is not a beacon. Tried several times and found that there was a problem with the interval of node 2. Test the rand () function. It is found that the Contiki has a well-encapsulated random.c, which can be used directly.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/77/9C/wKiom1ZqRVaRauMCAACsDY9lA-8122.png "title=" 1.png " alt= "Wkiom1zqrvaraumcaacsdy9la-8122.png"/>

Second, Node 2 hair 100 Packet, Node 1 unexpectedly received 322. View print information, Node 2 is sent every time, node 1 receives 2-3 times.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/77/A6/wKiom1ZqiErBPjdQAAD151f3Nx0201.png "title=" 2.png " alt= "Wkiom1zqierbpjdqaad151f3nx0201.png"/> Printing information again, the upper packet to 48 unexpectedly stopped, the underlying repeated tune Send_data, suspect is the ACK detection problem, resulting in the avoidance of re-sending, Check the program, found that no ACK was detected and forgot to return ....

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/77/A6/wKioL1ZqkAuD5WpBAAFv9m6K12Y543.png "title=" 3.png " alt= "Wkiol1zqkaud5wpbaafv9m6k12y543.png"/>

Node to receive the package or there is a problem, will each packet number, printing information found each packet received three or so, after the discovery is CSMA retransmission caused, check the program, found that the PMAC back to the upper layer of the state word when the logic error .... After modification, send and receive normal. 650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/77/CB/wKiom1ZudOaB8Mb-AABcW1zbKVU521.png "title=" 4.png " alt= "Wkiom1zudoab8mb-aabcw1zbkvu521.png"/>

This article from "False lifelong" blog, reproduced please contact the author!

Implementation of PMAC program under Contiki (i.)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.