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 > [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
