Re: [Tinyos-help] Sending a message to the Base Station from the PC

2006-04-27 Thread Liliane Fegard

Hi

Thanks for your reply.  So the final packet after escaping 0x7E and 0x7D is:

7e 42 7d5e 00 7d5d 0b 010100 69b0 7e and what I should send 
to the mote is the binary:


11100111001001001101011001011101010101011011000100011001011010100111

I am sending the packet using a C program I wrote that reads from and writes 
to the serial port (The code is running on windows XP and using Dev-C++) and 
I am using the function:
WriteFile(hCom, final, 1, nReadPort,NULL); where final is the array that 
contains the binaries.


char final[177] = 
{11100111001001001101011001011101010101011011000100011001011010100111};


hCom = CreateFile( pcCommPort,
GENERIC_READ | GENERIC_WRITE,
0,
NULL, // no security attributes
OPEN_EXISTING, // comm devices must use OPEN_EXISTING
0,// not overlapped I/O
NULL  // hTemplate must be NULL for comm devices
);

It is not working (The Led is not turning on)….Any idea why???

Thanks in advance,

Liliane.

_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Sending a message to the Base Station from the PC

2006-04-24 Thread Liliane Fegard

I found some previous postings having the same question but with no answer.
How can I change the TOSBase code so when I send a packet from my PC to the 
MIB510 of the following format:

7E 42 FF FF 00 7d 0b 01 01 00 00 00 00 00 00 00 00 00  69 b0 7E

42packet without achknowledgments
---Broadcast Address
00: AM Handler
7d: Group ID
0b: payload length (11 bytescoz when I run the BcastInject code I got 
sending payload 110)


01 01 00 00 00 00 00 00 00 00 00: the payload...in order to turn the LED ON 
(based on the SimpleCmd apps)


69 b0: the crc calculated using the code found in BcastInject

When I send this packet the led should turn onbut I got nothing???
I think because the UART understand characters so It is converting the 
hexadecimal to characters when receiving the packet. My question is how to 
change the TinyOS applications to convert the characters again to 
hexadecimal.


N.B: I am trying to send the packet without the use of BcastInject.

Thanks in advance,

Liliane.

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


___
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help