Dinesh,

       you can communicate to base station (the mote connected to PC) over a 
serial cable if you were using MIB510 programming board.
       There is a Java class to do that, but I have never used it.
       I have developped a C++ program to communicate to the base station. 
Then I can receive and send messges to the WSN. I can even send commands to 
specific nodes into the network.
       MIB520 uses USB as a serial port, then the program will probably work 
on this program board as well. You can see information about MIB510 and MIB520 
in the "MPR/MIB Users Manual" from Crossbow. 

       You have to send a command to the base station over a message. Then You 
have to send  7E flag, destination address, . . . . , CRC and  final  7E flag.
       If your sent message is not correct, the base station will do nothing.
       You must to know the format of the raw message.
 
       Here is the code to calculate CRC:

WORD crcByte(WORD crc, const BYTE& b)
{
  BYTE i;
  
  crc = crc ^ b << 8;
  i = 8;
  do
    if (crc & 0x8000)
      crc = crc << 1 ^ 0x1021;
    else
      crc = crc << 1;
  while (--i);

  return crc;
}





*****************
  João Giacomin
  Prof-DCC-UFLA
*****************

---------- Original Message -----------
From: João Paulo Amaro da Costa Luz Carneiro <[EMAIL PROTECTED]>
To: "Eric Keller" <[EMAIL PROTECTED]>
Cc: TinyOS - Help <[email protected]>
Sent: Wed, 5 Nov 2008 16:20:50 +0000
Subject: Re: [Tinyos-help] Controlling Tmotes from PC

> You could send serial messages from pc to mote. I don't remember but I 
>  think the oscilloscope example has something like this to update the  
> sensing rate.
> 
> Regards,
> Joao
> 
> On 2008/11/05, at 15:41, Eric Keller wrote:
> 
> > If I was going to do that, I'd look at the printf library.  Of  
> > course, it
> > sends data the other way, but it's a good start.
> > On the other hand, it makes much more sense to control the motes
> > over the radio.
> > Eric
> >
> >
> > On Wed, Nov 5, 2008 at 8:36 AM, Dinesh Koya  
> > <[EMAIL PROTECTED]> wrote:
> >> Hi all
> >>
> >> I am doing a project in which I have a requirement to control tmotes
> >> (connected to the USB ports of the PC) from the PC like switching
> >> ON/OFF their radios, changing the timer's firing periods,etc. I would
> >> like to know if there is some sample program in Tinyos to control the
> >> sensor nodes from the PC, if not then could someone tell me how to do
> >> it. I am using TINYOS 2.0.2
> >>
> >> Thanks for any help
> >>
> >> Regards
> >> Dinesh
> >> ________________________________
> >> Add more friends to your messenger and enjoy! Invite them now.
> >> _______________________________________________
> >> 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
> 
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
------- End of Original Message -------

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to