Hi All,
Based on ./tinyos-2.x/support/sdk/c directory, I've developed an
application to write data in the serial port.
So, I connect the mote in the serial port, but the mote dont receive data.
I guess I have the protocol the data.
See My code:
// open serial port
src = open_serial_source(DEVICE, 57600, 1, stderr_msg);
if (!src) {
fprintf(stderr, "Couldn't open serial port at %s:%d\n", DEVICE,
57600);
exit(1);
}
char idx = 1;
char packet[4];
while (1) {
memset(packet, idx++, 4);
int ok = write_serial_packet(src, packet, 4);
printf("Packet: %d\n", packet[0]);
if (ok < 0)
exit(2);
if (ok > 0)
fprintf(stderr, "Note: write failed\n");
sleep(2);
}
Should I protocol the data (packet[4])?
Thanks all
Daniel Patrick
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help