Hi all.
I would like create a packet to send to a micaz by a serial port.
The creation ot the packet must be done in a pc using an application written
in C.
I use TinyOs-2.x
I create the packet with the following statements:
----------
char output_buffer[TOS_PACKET_LENGTH]; //TOS_PACKET_LENGTH=41
//output_buffer is initialized to zero
void create_packet() {
/* Setup packet header information */
output_buffer[0] = 0x7e; //Frame
output_buffer[1] = 69; //SERIAL_PROTO_PACKET_NOACK
output_buffer[2] = 0x00; //Sequence number byte: SerialP
output_buffer[3] = 0xff; //Destination Address
output_buffer[4] = 0xff; //Destination Address
output_buffer[5] = 0x00; //Source Address
output_buffer[6] = 0x00; //Source Address
output_buffer[7] = 28; //Payload length
output_buffer[8] = 0; //Group ID
output_buffer[9] = 6; //AMType
/* Payload */
output_buffer[10]='c';
output_buffer[11]='i';
output_buffer[12]='a';
output_buffer[13]='o';
/* CRC bytes and end frame */
output_buffer[TOS_PACKET_LENGTH-3] = 200;
output_buffer[TOS_PACKET_LENGTH-2] = 197;
output_buffer[TOS_PACKET_LENGTH-1] = 0x7e;
--------------
When I send this packet to the micaz mote no leds fire!
Is the packet format correct? I read more times the guidelines to create a
packet and I read the Serial.h file too.
Thanks for your answer
Roberto
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help