[Tinyos-help] Re : pc to mote communication
Faisal Aslam
aslam at informatik.uni-freiburg.de
Wed Jun 17 10:34:46 PDT 2009
You can easily modify TestSerial.java file and it can take input from
console.
Instead of counter you can send byte array and can send anything. It is
supported by the code of TinyOS Java Tools and you just need to change
the example.
This example code is best help and if you understand it properly then
almost everything is possible.
best regards,
----
Faisal Aslam
Ph.D. candidate
University of Freiburg
http://cone.informatik.uni-freiburg.de/people/aslam/
chikh omar wrote:
> 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 <aslam at informatik.uni-freiburg.de>
> *À :* chikh omar <enis01amor at yahoo.fr>
> *Cc :* tinyos help <tinyos-help at 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 at millennium.berkeley.edu
> <mailto:Tinyos-help at millennium.berkeley.edu>
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>
More information about the Tinyos-help
mailing list