Hi, * Please send the e-mails to the entire list.
TinyOS provides only down to the second layer (MAC) services. Where the FEC is the 1st layer (Physical) functionality. Let's say you want to send a message M = 0xABCD (2 bytes). The MAC layer will add some header and footer: --------------------------------------- | Header | Data | Footer | | (Addr.) | (0xABCD) | (CRC) | --------------------------------------- Lets say it adds 24 bytes. And *then *the physical layer will add all the FEC So, if you use a FEC code with rate 1/2, instead of 24 + 2 = 26 bytes, your will actually transmit 52 bytes. On the receiver side you do exactly the opposite: decode, see if the CRC is OK, remove MAC header and footer and then you get your data. In case you will encode the initial data - 0xABCD, to 0xAABBCCDD, MAC and the physical layer will still think this is regular payload and will NOT use the properties of LDPC to correct the flipped bits. This means you will be able to detect\correct only those packets, where the bits were flipped but the CRC check was OK. Since in TinyOS CRC is 16 bits, this will happen with probability of 1/2^16 = 1/65536. *BUT* You should check the ability to disable the CRC feature (depends on your RF HW) in CC2420 register MODEMCTRL0.AUTOCRC is responsible for that. If you do disable it, I think it will be possible. Best, Arik On Tue, Mar 16, 2010 at 16:22, Umay Kulsoom <[email protected]> wrote: > Hello, > Thanks a lot for your reply on tinyos-help mailing list regarding my query > for porting C code into NesC. > Actually i have to encode the packets at the source code using LDPC coding. > As per your reply it seems that its not possible!! Can you please guide me > how it is not possible. I am very new to tinyos so dont have much idea about > it. I have to simulate it using TOSSIM. > > Thanks in advance. > > Looking forward > > -- > Umay Kulsoom > MS Thesis Student > School of Electrical Engineering and Computer Science > National University of Sciences and Technology > Islamabad, Pakistan > -- Best Regards, Arik Sapojnik On Tue, Mar 16, 2010 at 13:41, Faisal Aslam < [email protected]> wrote: > Hi, > > Why to convert it in NesC? You can call C code from NesC. Hence write > new code in NesC that calls the specific C function(s). > > regards, > > -- > Faisal Aslam > > > Umay Kulsoom wrote: > > Hello, > > I have C code for Low Density Parity Check codes and i have to port it > > on nesC. Can anybody give me idea how to do it?? > > > > Thanks a lot in advance > > > > -- > > Umay Kulsoom > > NUST > > Islamabad, Pakistan > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Tinyos-help mailing list > > [email protected] > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Best Regards, Arik Sapojnik
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
