[Tinyos-help] Uart problem when it is interrupted by other interrupt!
Tinyos-help: Hello! I use uart for transmiting data from PC to node, and the total length of the data part is 99. It worked on micaz, and when receiving the message, it just transmit back to PC to see if it be right through transmiting. When it works separately, all the sending data and receving data on PC is identical. But when I add a Timer using T3(System clock), and it get in T3 interrupt 10ms repeatly, the data sended and received is sometimes not identical(a data will be lose and will add 0 at the end of data part). I think it may be T3 interrupt interrupts the receiving state-maching. Has anybody met this probelem or known how to resolve it, hoping for your answer. Thanks a lot! Fuqiang Wang 2007-07-04 ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] nesC tutorials
Please i want your help to get a free detailed documentation for nesC (specify how to declare variables, different variable types, loops, conditional statments, ...). thank you. - Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us.___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
RE: [Tinyos-help] nesC tutorials
I hope it will be helpful, http://www.tinyos.net/tinyos-1.x/doc/nesc/ref.pdf Firat TARAKTAS ElectricalElectronics Engineer Reseracher GENETLAB INFORMATION TECHNOLOGIES Kayisdagi Caddesi Kar Plaza D Blok Kat:3 34752 Icerenkoy / ISTANBUL / TURKIYE Phone: +90 (216) 573 00 85 (int.354) Fax: +90 (216) 469 85 07 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] www.genetlab.com http://www.genetlab.com/ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of basma mohamed Sent: Wednesday, July 04, 2007 10:20 AM To: tinyos-help@Millennium.Berkeley.EDU Subject: [Tinyos-help] nesC tutorials Please i want your help to get a free detailed documentation for nesC (specify how to declare variables, different variable types, loops, conditional statments, ...). thank you. Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yaho o_panel_invite.asp?a=7 and lay it on us. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] nesC 1.2
Is there a difference between necC 1.1 and nesC 1.2 which is used in TinyOS 2.x ? Can i read the tutorial of nesC 1.1 to learn nesC 1.2 ? If it is not correct, please tell me where i can find tutorials on nesC 1.2. Thank you. - Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] MIB520 Micaz Install problem
I don't know about the failure to enter programming mode, but if the problem that is causing this error is not the same causing the others, they could be due to not seating the motes properly on the board (which caused me many problems in the past). Have you tried with other motes (other micaz's and other types)? 2007/7/3, Mayur Maheshwari [EMAIL PROTECTED]: All, Has anyone tried installing apps on MicaZ using MIB520 in TOS2? I tried installing the Blink app on MicaZ using MIB520 and ran into few problems. I am using TOS2 and since MIB520 is not defined in the makerule I am issuing 'MIB510' in the command. I have the ports COM7 and COM8. Also, the nature of the error keeps on changing. Mayur [EMAIL PROTECTED] /opt/tinyos-2.x/apps/Blink $ make micaz reinstall mib510,COM7 cp build/micaz/main.srec build/micaz/main.srec.out installing micaz binary using mib510 uisp -dprog=mib510 -dserial=COM7 --wr_fuse_h=0xd9 -dpart=ATmega128 --wr_fuse_e=f f --erase --upload if=build/micaz/main.srec.out Please use /dev/ttyS6 rather than COM7 (the latter often doesn't work) Firmware Version: 1.8 An error has occurred during the AVR initialization. * Target status: Vendor Code = 0xff, Part Family = 0xff, Part Number = 0xff Probably the wiring is incorrect or target might be `damaged'. make: *** [program] Error 2 Mayur [EMAIL PROTECTED] /opt/tinyos-2.x/apps/Blink $ make micaz reinstall mib510,COM7 cp build/micaz/main.srec build/micaz/main.srec.out installing micaz binary using mib510 uisp -dprog=mib510 -dserial=COM7 --wr_fuse_h=0xd9 -dpart=ATmega128 --wr_fuse_e=f f --erase --upload if=build/micaz/main.srec.out Please use /dev/ttyS6 rather than COM7 (the latter often doesn't work) Firmware Version: ►.► Failed to enter programming mode. make: *** [program] Error 2 Mayur [EMAIL PROTECTED] /opt/tinyos-2.x/apps/Blink $ make micaz reinstall mib510,/dev/ttyS6 cp build/micaz/main.srec build/micaz/main.srec.out installing micaz binary using mib510 uisp -dprog=mib510 -dserial=/dev/ttyS6 --wr_fuse_h=0xd9 -dpart=ATmega128 --wr_fu se_e=ff --erase --upload if=build/micaz/main.srec.out Firmware Version: ►.► Failed to enter programming mode. make: *** [program] Error 2 Mayur [EMAIL PROTECTED] /opt/tinyos-2.x/apps/Blink $ make micaz reinstall mib510,/dev/ttyS6 cp build/micaz/main.srec build/micaz/main.srec.out installing micaz binary using mib510 uisp -dprog=mib510 -dserial=/dev/ttyS6 --wr_fuse_h=0xd9 -dpart=ATmega128 --wr_fu se_e=ff --erase --upload if=build/micaz/main.srec.out Firmware Version: 1.8 Probably the AVR MCU is not in the RESET state. Check it out and run me again. make: *** [program] Error 2 Mayur [EMAIL PROTECTED] /opt/tinyos-2.x/apps/Blink $ make micaz reinstall mib510,/dev/ttyS6 cp build/micaz/main.srec build/micaz/main.srec.out installing micaz binary using mib510 uisp -dprog=mib510 -dserial=/dev/ttyS6 --wr_fuse_h=0xd9 -dpart=ATmega128 --wr_fu se_e=ff --erase --upload if=build/micaz/main.srec.out Firmware Version: ►.► Failed to enter programming mode. make: *** [program] Error 2 Any suggestions? Thanks for all your help! Regards -- Mayur Maheshwari([EMAIL PROTECTED] ) Karmanye Vadhikaraste Ma Phaleshu Kadachana, Ma Karma Phala Hetur Bhurmatey Sangostva Akarmani ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- The truth shall set you free a href=http://www.nerdtests.com/nq_ref.html; img src=http://www.nerdtests.com/images/badge/dc875a1ab1aff18f.gif; alt=I am nerdier than 99% of all people. Are you a nerd? Click here to find out!/a ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] relationship between RSSI and distance
Hello, I'm trying to use RSSI value to obtain the distance between two sensor nodes mica2. I know that a lot of such experiments are made and that a lot of people use this method. However, when I do the experiment, I obtain unexploitable results: - between 0 and 70 cm, I obtain always the same RSSI. - above 150cm, all values of RSSI are possible. More strange: i do the same with micaz, and the results are exploitable. For information, I am using rcv_packet-strength to obtain RSSI knowing that the transmitted power is always the same. Can anybody tell me if it possible to use mica2 and RSSI to obtain distance and if yes, how to do that and why I didn't manage? Thanks for your help. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
RE: [Tinyos-help] relationship between RSSI and distance
I wondered and googled rssi values vs. distance and reached some papers. http://www.ece.rochester.edu/research/wcng/papers/conference/holland_sec on06.pdf http://zoo.cs.yale.edu/classes/cs490/03-04b/nana.dankwa.ee.pdf Firat TARAKTAS ElectricalElectronics Engineer Reseracher GENETLAB INFORMATION TECHNOLOGIES Kayisdagi Caddesi Kar Plaza D Blok Kat:3 34752 Icerenkoy / ISTANBUL / TURKIYE Phone: +90 (216) 573 00 85 (int.354) Fax: +90 (216) 469 85 07 [EMAIL PROTECTED] www.genetlab.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of CASTEL Myriam Sent: Wednesday, July 04, 2007 4:35 PM To: tinyos-help@Millennium.Berkeley.EDU Subject: [Tinyos-help] relationship between RSSI and distance Hello, I'm trying to use RSSI value to obtain the distance between two sensor nodes mica2. I know that a lot of such experiments are made and that a lot of people use this method. However, when I do the experiment, I obtain unexploitable results: - between 0 and 70 cm, I obtain always the same RSSI. - above 150cm, all values of RSSI are possible. More strange: i do the same with micaz, and the results are exploitable. For information, I am using rcv_packet-strength to obtain RSSI knowing that the transmitted power is always the same. Can anybody tell me if it possible to use mica2 and RSSI to obtain distance and if yes, how to do that and why I didn't manage? Thanks for your help. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-hel p ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] SecureTOSBase
Hi Does the SecureTOSBase application work in TinyOS 1.1.10 ? Does the TOSSIM support it ? I have gone through all the previous mails on the list on the topic but to no avail..So, please. can anybody help ? Regards HariOm ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Problems with UartDebugger.nc ?
Hello There , I need to know some things about the UartDebugger module : 1) I don't understand what is the old style programming board that I must use in order to put the mote on. 2) Unfortunately , I bought a topway LCD instead of the Scott Edwards LCD . So I need to know how could my LCD substitute the Scott Edwards LCD . I need to know how can I deal with this LCD . All I know is that I'm going to create some sort of connection between the LCD and a hyperterminal in order to have things being displayed on the LCD thats all . I'm in a severe need for help. so please help me ASAP . Kindest Regards, Hossam ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Consultation for bug reports.
Dear all, Is anybody aware of the existence of bug reports for some real wireless sensor network applications that are public accessible? I am going to perform fault analysis for these applications. I'd appreciate if you can share your experience, encountering bugs through development. Thank you! Best regards, Yours, Zhifeng Lai ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Some confusion on the classic nesC paper.
Dear all, I have some confusion on David and Philip's PLDI paper, The nesC Language: A Holistic Approach to Networked Embedded Systems: (1) What is the exact meaning of whole program analysis? Does it mean the compiler can take all the interleavings into account? (2) Could some data race situations escape the race-free invariant (any update to shared state is either not a data race condition (SC only), or occurs within an atomic section)? If so, could you give me an example? Thank you very much for your attention. Best regards, Yours, Zhifeng Lai ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] (no subject)
Dear all, I have some confusion on David and Philip's PLDI paper, The nesC Language: A Holistic Approach to Networked Embedded Systems: (1) What is the exact meaning of whole program analysis? Does it mean the compiler can take all the interleavings into account? (2) Could some data race situations escape the race-free invariant (any update to shared state is either not a data race condition (SC only), or occurs within an atomic section)? If so, could you give me an example? Thank you very much for your attention. Best regards, Yours, Zhifeng Lai ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] TinyOS Java SDK System.exit() calls
Hi All, I am building the MoteIF interface into a larger application, and noticed that there are about 50 calls to System.exit() throughout the TinyOS Java API. While its understandable to restrict operation when a mote is not connected to the gateway host machine, calls to System.exit halt the entire java application. So far, I have found the only way to get around this is to define a new SecurityManager to manage all calls to System.exit, although this is less than ideal. Is there any plans to implement exception management in place of these calls, so mote interface-related failures can be degraded gracefully? If not, would this be a worthwhile goal to extend the flexibility of the API? Regards, Pete Baker University of Strathclyde, Glasgow, Scotland ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] (no subject)
Hi there, According to the TinyOS tutorial 1.x, group id of motes can be specified in the makerule file and accessed via variable (uint8_t TOS_AM_GROUP). Currently, I'm experimenting the dynamic group id assignment rather than at the compile time. However, the system didn't allow me to assign new value to TOS_AM_GROUP. Is there any solution I can change the group id of motes in the programming rather than manually do it at the compile time? Many thanks Cheers, mengjie ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] how to make mica mote receiver + transmitter ?
Thanx Bernardo for your reply , But my doubts are as follows I tried to combining between CntToLedsAndRfm and RfmToLeds but got lots of errors , these were the 2 components i used in order to establish communication between 2 motes . But in this case one mote will act as a transmitter( one with CntToLedsAndRfm) the other will act as a receiver( one with RfmToLeds) . I need for both to act as transceivers in order to have data exchange between them . I need to know how could I reach that code-wise and what components should I use to reach my goal. On 7/4/07, Bernardo Avila Pires [EMAIL PROTECTED] wrote: Usually CntToLedsAndRfm does the job to help creating the component. You should first be able to establish radio communication from one mote to another, the fuse the configurations and implementations and something good should come out of it. The tutorials aid a lot as well; if you post specific doubts, I could try to give more specific help. 2007/7/4, Hossam El-Din Hassanein [EMAIL PROTECTED]: Hello there , I am using a mica2 mote and facing a problem at some points . One of these points can be described as follows: I need for the mote to act as a receiver and a transmitter of data at the same time . I tried to refer to some modules that are ready like CntToLedsAndRfm and RfmToLeds and tried to create a module that links the functionalities of both modules but failed . Could anyone please help me with this problem as soon as possible . Kindest Regards, Hossam ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- The truth shall set you free a href=http://www.nerdtests.com/nq_ref.html; img src=http://www.nerdtests.com/images/badge/dc875a1ab1aff18f.gif; alt=I am nerdier than 99% of all people. Are you a nerd? Click here to find out!/a -- Kindest Regards, Hossam Hossam El-Din Hassanein Student - Networking Dept. Faculty of Information Engineering and Technology The German University in Cairo - GUC [EMAIL PROTECTED] [EMAIL PROTECTED] ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Some confusion on the classic nesC paper.
On Jul 4, 2007, at 8:18 AM, Zhifeng Lai wrote: Dear all, I have some confusion on David and Philip’s PLDI paper, “The nesC Language: A Holistic Approach to Networked Embedded Systems”: (1) What is the exact meaning of “whole program analysis”? Does it mean the compiler can take all the interleavings into account? It means you're not compiling individual object files and linking them later (as you typically do in C, Java, etc.). Instead, you're compiling them all at once. This basically means that you can resolve all of the symbols. When you compile individual object files, the compiler cannot optimize across object file boundaries, because it does not know what is on the other side. (2) Could some data race situations escape the race-free invariant (any update to shared state is either not a data race condition (SC only), or occurs within an atomic section)? If so, could you give me an example? If you did something in an atomic block which broke its atomicity. For example, if you enabled interrupts within an atomic block by writing to the interrupt control register. Phil ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
RE: [Tinyos-help] (no subject)
Well i think if i got it correct, then you will find in the apps folder the Makerules file. You can open it and you will find inside the DEFAULT_LOCAL_GROUP part, then you can change its value. Tito -Original Message- From: Yu, Mengji [mailto:[EMAIL PROTECTED] Sent: Wed 7/4/2007 06:39 PM To: tinyos-help@millennium.berkeley.edu Subject: [Tinyos-help] (no subject) Hi there, According to the TinyOS tutorial 1.x, group id of motes can be specified in the makerule file and accessed via variable (uint8_t TOS_AM_GROUP). Currently, I'm experimenting the dynamic group id assignment rather than at the compile time. However, the system didn't allow me to assign new value to TOS_AM_GROUP. Is there any solution I can change the group id of motes in the programming rather than manually do it at the compile time? Many thanks Cheers, mengjie ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] nesC 1.2
If you have a copy of nesC 1.2 installed, you should have a updated copy at /usr/share/ncc/doc/ref.pdf which covers language changes in 1.2. The various text files in /usr/share/ncc/doc/user are also quite helpful. However, if you are looking for an introduction to nesC, I would recommend first looking at the TinyOS tutorials online and then looking at Phil's TinyOS programming manual available at http://www.tinyos.net/tinyos-2.x/doc/pdf/tinyos-programming.pdf. - Ryan basma mohamed wrote: Is there a difference between necC 1.1 and nesC 1.2 which is used in TinyOS 2.x ? Can i read the tutorial of nesC 1.1 to learn nesC 1.2 ? If it is not correct, please tell me where i can find tutorials on nesC 1.2. Thank you. Looking for a deal? Find great prices on flights and hotels http://us.rd.yahoo.com/evt=47094/*http://farechase.yahoo.com/;_ylc=X3oDMTFicDJoNDllBF9TAzk3NDA3NTg5BHBvcwMxMwRzZWMDZ3JvdXBzBHNsawNlbWFpbC1uY20- with Yahoo! FareChase. ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
RE: [Tinyos-help] Some confusion on the classic nesC paper.
Dear Philip, (1) Yes, I see. Another question relates to this: you said that the call graph of nesC code is fully known at compile-time. I conjecture that the component diagrams can be treated as call graphs in programming literature, and since the wiring relationships among components are totally determined, the call graph is also determined at compile-time. Could you confirm my understanding? (2) I understand what you mean. However, I think in the application level, there is no primitives that can alternate interrupt enable bits. So, does it mean application developers will not raise data races if they obey the race-free invariant? Best regards, Yours, Zhifeng Lai -Original Message- From: Philip Levis [mailto:[EMAIL PROTECTED] Sent: Thursday, July 05, 2007 12:11 AM To: Zhifeng Lai Cc: 'tinyos help'; 'Zhifeng Lai' Subject: Re: [Tinyos-help] Some confusion on the classic nesC paper. On Jul 4, 2007, at 8:18 AM, Zhifeng Lai wrote: Dear all, I have some confusion on David and Philip's PLDI paper, The nesC Language: A Holistic Approach to Networked Embedded Systems: (1) What is the exact meaning of whole program analysis? Does it mean the compiler can take all the interleavings into account? It means you're not compiling individual object files and linking them later (as you typically do in C, Java, etc.). Instead, you're compiling them all at once. This basically means that you can resolve all of the symbols. When you compile individual object files, the compiler cannot optimize across object file boundaries, because it does not know what is on the other side. (2) Could some data race situations escape the race-free invariant (any update to shared state is either not a data race condition (SC only), or occurs within an atomic section)? If so, could you give me an example? If you did something in an atomic block which broke its atomicity. For example, if you enabled interrupts within an atomic block by writing to the interrupt control register. Phil ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] how to make mica mote receiver + transmitter ?
See the SimpleCmd and OscilloscopeRF demo apps for examples of wiring up GenericComm's SendMsg and ReceiveMsg. MS Bernardo Avila Pires wrote: I don't remember about tinyos-1, but the basic idea is that you use an interface for sending data (SendMsg) and another for receiving (ReceiveMsg), and using the same instances of them in both configurations (if you're going to create different components). Then you create a module to implement the events of reception and to send data as you need. 2007/7/4, Hossam El-Din Hassanein [EMAIL PROTECTED]: Thanx Bernardo for your reply , But my doubts are as follows I tried to combining between CntToLedsAndRfm and RfmToLeds but got lots of errors , these were the 2 components i used in order to establish communication between 2 motes . But in this case one mote will act as a transmitter( one with CntToLedsAndRfm) the other will act as a receiver( one with RfmToLeds) . I need for both to act as transceivers in order to have data exchange between them . I need to know how could I reach that code-wise and what components should I use to reach my goal. On 7/4/07, Bernardo Avila Pires [EMAIL PROTECTED] wrote: Usually CntToLedsAndRfm does the job to help creating the component. You should first be able to establish radio communication from one mote to another, the fuse the configurations and implementations and something good should come out of it. The tutorials aid a lot as well; if you post specific doubts, I could try to give more specific help. 2007/7/4, Hossam El-Din Hassanein [EMAIL PROTECTED]: Hello there , I am using a mica2 mote and facing a problem at some points . One of these points can be described as follows: I need for the mote to act as a receiver and a transmitter of data at the same time . I tried to refer to some modules that are ready like CntToLedsAndRfm and RfmToLeds and tried to create a module that links the functionalities of both modules but failed . Could anyone please help me with this problem as soon as possible . Kindest Regards, Hossam ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- The truth shall set you free a href=http://www.nerdtests.com/nq_ref.html img src=http://www.nerdtests.com/images/badge/dc875a1ab1aff18f.gif; alt=I am nerdier than 99% of all people. Are you a nerd? Click here to find out!/a -- Kindest Regards, Hossam Hossam El-Din Hassanein Student - Networking Dept. Faculty of Information Engineering and Technology The German University in Cairo - GUC [EMAIL PROTECTED] [EMAIL PROTECTED] ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Security on Tmote Sky
Hi Mr. Polastre, we are working with Tmote SKY and we would like to make an application to implement security stand alone we are not sure we are writing in the RAM and we are looking to check whether we are writing or not, also we would like to know how can we run any kind of security on these devises and if you have some examples we could run. We would certainly appreciate any help you can provide us in this matter. Here is the code that we used; we verified the writing in the RAM with the leds, and don't work. // configuration Encrypt { } implementation { components Main, EncryptM, GenericComm as Comm, LedsC, HPLCC2420C, TimerC; Main.StdControl - EncryptM.StdControl; Main.StdControl - Comm.Control; Main.StdControl - TimerC.StdControl; Main.StdControl - HPLCC2420C.StdControl; EncryptM.SendMsg - Comm.SendMsg[1]; EncryptM.Leds - LedsC; EncryptM.Timer1 - TimerC.Timer[unique(Timer)]; EncryptM.HPLChipcon - HPLCC2420C.HPLCC2420; EncryptM.HPLChipconRAM - HPLCC2420C.HPLCC2420RAM; } module EncryptM { provides { interface StdControl; } uses { interface SendMsg; interface Leds; interface Timer as Timer1; interface HPLCC2420 as HPLChipcon; interface HPLCC2420RAM as HPLChipconRAM; } } implementation { TOS_Msg msg1; uint8_t mydata[16]; uint8_t read_data[16]; bool busy = FALSE; uint8_t choice = 0; bool keyWritten = FALSE; uint8_t mykey[16]; uint8_t var; command result_t StdControl.init() { uint8_t i; call Leds.init(); // Set the security control register // Use Key 0 as stand-alone key, TX key and RX key; 8 bytes MIC in //CBC-MAC mode; length byte is authenticated if (call HPLChipcon.write( RESOURCE_NONE, CC2420_SECCTRL0, 0x030d)== 0xff) { call Leds.redToggle(); } else { call Leds.greenToggle(); } //call HPLChipcon.write(RESOURCE_NONE, CC2420_SECCTRL1, 0x); /* Set Key 0*/ mykey[0] = (uint8_t) 0x55; mykey[1] = (uint8_t) 0x15; mykey[2] = (uint8_t) 0x71; mykey[3] = (uint8_t) 0xc9; mykey[4] = (uint8_t) 0x47; mykey[5] = (uint8_t) 0xd9; mykey[6] = (uint8_t) 0xe8; mykey[7] = (uint8_t) 0x59; mykey[8] = (uint8_t) 0x0c; mykey[9] = (uint8_t) 0xb7; mykey[10] = (uint8_t) 0xad; mykey[11] = (uint8_t) 0xd6; mykey[12] = (uint8_t) 0xaf; mykey[13] = (uint8_t) 0x7f; mykey[14] = (uint8_t) 0x67; mykey[15] = (uint8_t) 0x98; // Set data for(i=0; i16; i++) { mydata[i] = 0x01; } return SUCCESS; } command result_t StdControl.start() { call Timer1.start(TIMER_REPEAT, 5120); return SUCCESS; } command result_t StdControl.stop() { return SUCCESS; } event result_t SendMsg.sendDone(TOS_MsgPtr m, result_t status) { //call Leds.greenToggle();// Inidicate success. busy = FALSE; return status; } async event result_t HPLChipconRAM.writeDone(uint16_t ram_addr, uint8_t ram_len, uint8_t* ram_buf){ //call Leds.redToggle(); return SUCCESS; } async event result_t HPLChipconRAM.readDone(uint16_t ram_addr, uint8_t ram_len, uint8_t* ram_buf){ //call Leds.yellowToggle(); return SUCCESS; } task void encrypt_and_send(){ uint8_t status; if(keyWritten){ if(choice==0){ // send plaintext to SABUF buffer if (call HPLChipconRAM.write(RESOURCE_NONE, CC2420_RAM_SABUF, 16, (uint8_t *)mydata)== SUCCESS) { call Leds.redToggle(); choice = 1; } else { call Leds.greenToggle(); } } else if(choice==1){ // Encrypt call HPLChipcon.cmd(RESOURCE_NONE, CC2420_SAES); do { status = call HPLChipcon.cmd(RESOURCE_NONE, CC2420_SNOP); } while((status CC2420_ENC_BUSY) 0x01);// wait until encryption finishes choice = 2; } else if(!busy choice==2){ // Read out the ciphertext: call HPLChipconRAM.read(RESOURCE_NONE, CC2420_RAM_KEY0, 16, (uint8_t *)mydata ); if(!busy){ if((call SendMsg.send(TOS_BCAST_ADDR, 16, msg1)) == SUCCESS) busy = TRUE; } choice = 0; } } else { if (call HPLChipconRAM.write(RESOURCE_NONE, CC2420_RAM_KEY0, 16, (uint8_t*)mykey)== SUCCESS) { keyWritten = TRUE; call Leds.redToggle(); } else { call Leds.greenToggle(); } } } event result_t Timer1.fired() { post encrypt_and_send(); return SUCCESS; } } Thank you, Néstor ___ Tinyos-help mailing list
[Tinyos-help] problems when using 2 motes with oscilloscopeRF?
hey there , I installed 2 mica2 motes with OscilloscopeRF to have to be displayed on the java applet( oscilloscope ) . but it gives me weird output .. the graph of one of the mote cancels the other instead of being displayed as a seperate line with different colour. I suspected that because both motes are sending the data using thge same frequency or using the same channels . ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] RSSI
so, if I just need to know whenever the RSSI CCA I can get it in the two following ways (provided that the radio is in RxMode) event result_t Timer.fired() { /* First method */ uint8_t status; uint16_t rssi_reg; status = call HPLChipcon.cmd(CC2420_SNOP); while( (status RSSI_VALID) 0x01 ) { status = call HPLChipcon.cmd(CC2420_SNOP); } rssi_reg = call HPLChipcon.read(CC2420_RSSI); /* Second method */ if( TOSH_READ_RADIO_CCA_PIN() ) // do something is that correct? ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] RSSI
sorry, I meant something like this: event result_t Timer.fired() { /* First method */ uint8_t status; uint16_t rssi_reg; status = call HPLChipcon.cmd(CC2420_SNOP); while( !((status CC2420_RSSI_VALID) 0x01) ) { status = call HPLChipcon.cmd(CC2420_SNOP); } rssi_reg = call HPLChipcon.read(CC2420_RSSI); /* Second method */ if( TOSH_READ_RADIO_CCA_PIN() ) // do something ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] problems when using 2 motes with oscilloscopeRF?
I'm not up on how the Oscope program works, but you may be getting overlays because both re-Motes use the same ID. Try installing them with different IDs ala: make mica2 install.N where N is a unique integer. MS Hossam El-Din Hassanein wrote: hey there , I installed 2 mica2 motes with OscilloscopeRF to have to be displayed on the java applet( oscilloscope ) . but it gives me weird output .. the graph of one of the mote cancels the other instead of being displayed as a seperate line with different colour. I suspected that because both motes are sending the data using thge same frequency or using the same channels . ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
[Tinyos-help] Decoding the contents of a Serial frame returned by TestNetwork App (again)
Please help me shed some light in this! Thank you!! -- Forwarded message -- From: Pedro Almeida [EMAIL PROTECTED] Date: Jul 2, 2007 2:43 PM Subject: Decoding the contents of a Serial frame returned by TestNetwork App (again) To: tinyos-help@millennium.berkeley.edu (this is a repost from a last month's mail that I didnt want to see go forgotten) Hello all; Some weeks ago I asked about the exact contents of a frame I was receiving through the serial port, of which I couldn't decode whatsoever (first mail here: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/2007-June/025739.html ). With the help of some people (Alexander Becher, Steve McKown, David Moss and Benjamin Madore), we managed to make some sense out of it. However, I am reaching that time period where it would be really handy to have the rest cleared. So summing it all up, I receive this in the serial port (example frame): 7E 45 00 FF FF 00 00 13 00 EE 00 01 00 00 00 07 80 EE 00 07 00 80 00 00 00 00 20 00 00 53 63 7E and the sent structure is like this: typedef nx_struct TestNetworkMsg { nx_am_addr_t source; nx_uint16_t seqno; nx_am_addr_t parent; nx_uint16_t metric; nx_uint8_t datah; nx_uint8_t datal; nx_uint8_t hopcount; nx_uint16_t sendCount; nx_uint16_t sendSuccessCount; } TestNetworkMsg; the platform is the MicaZ and the app is the TestNetwork. we've went this far on the decoding process (* marks confirmed field): *7E : Framing byte, denoting start of packet *45 : Protocol Byte (NO_ACK) *00 : Packet Format Dispatch Byte *FF FF : destination address (from UART) *00 00 : source address (root node) 13 : length 00 EE : Collection ID (from CTP) ?? / Type ?? / Destination PAN Identifier (from MAC Header) 00 : 01 : hopcount (seems out of place, but sure looks like it!!!) 00 00 : Destination Address (root ID=0) (from MAC Header) ??? 00 07 : Source Address (from the MAC Header) 80 : sendCount ??? (this field increments like the seqno below) EE : Collection ID (from CTP) ?? / Type ?? *00 07 : source *00 80 : seqno *00 00 : parent *00 00 : metric *20 00 : data 00 : ??? *53 63:two byte CRC *7E : Framing byte, denoting end of packet Can you help me? Thank you for the (once again) inconvenience; Pedro ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help