yes I test the application (TestSerial). but I don't find how to send a scaned paramed (scanf(&k) and then send k).
In the TestSerial application the value counter is inside program ********************************************** Omar Cheikhrouhou Engineer & Researcher @SENS Lab (Software Engineering and Network Security) Higher Institute of Technological Studies - Address : Mahdia's road Km 2.5 Sfax. BP 88 A - 3099 El Bustan Sfax Telephone : (+216)74 237425 Poste : 437 Fax: : (+216)74 431 386 Ph.D @ CES Lab (Computer and Embedded System)-University of Sfax, National School of Engineers BP W, Sfax, 3038, Tunisia , Fax:(+216)74665369 Coordinator C2i @ ISET Sfax (Certified C2i since 2008) ________________________________ De : Faisal Aslam <as...@informatik.uni-freiburg.de> À : chikh omar <enis01a...@yahoo.fr> Cc : tinyos help <tinyos-help@millennium.berkeley.edu> Envoyé le : Mercredi, 17 Juin 2009, 17h25mn 01s Objet : Re: [Tinyos-help] pc to mote communication Dear Omar, See tinyos exmaple at apps/test/TestSerial for details. You can use a Java program to send data from PC to the mote. best regards, ---- Faisal Aslam Ph.D. candidate University of Freiburg http://cone.informatik.uni-freiburg.de/people/aslam/ chikh omar wrote: > Hello, > did any body know how to send parameter entered by user on pc to telosb mote. > I use the following function but it doesn't work. > /***************/ > void read_and_send() > { > while (TRUE) > { > printf("saisir key nombre\n"); > scanf("%d",&k); > if (locked) { > return; > } > else { > test_serial_msg_t* rcm = (test_serial_msg_t*)call >Packet.getPayload(&packet, NULL); > if (call Packet.maxPayloadLength() < sizeof(test_serial_msg_t)) { > return; > } > rcm->counter = k; > if (call AMSend.send(AM_BROADCAST_ADDR, &packet, >sizeof(test_serial_msg_t)) == SUCCESS) { > locked = TRUE; > } > } > } > } > /**************/ > > *********************************************** > Omar Cheikhrouhou > **Engineer & Researcher @SENS Lab (Software Engineering and Network Security) > Higher Institute of Technological Studies - Address : Mahdia's road Km 2.5 > Sfax. BP 88 A - 3099 El Bustan Sfax Telephone : (+216)74 237425 Poste : > 437** **Fax: : (+216)74 431 386* > > *Ph.D @ CES Lab (Computer and Embedded System)-University of Sfax, National > School of Engineers BP W, Sfax, 3038, Tunisia , Fax:(+216)74665369 ** * > > *Coordinator C2i @ ISET Sfax (Certified C2i since 2008)* > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tinyos-help mailing list > Tinyos-help@millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help