[Tinyos-help] C and nesC problems
Daniel Widyanto
danielw at wireless-people.com
Sun Sep 23 18:38:18 PDT 2007
Hi,
Under TinyOS-2.x tree, there's a directory called : support/sdk/c.
Compile the source using : make, the result is libmote.a to be
linked to your C-program.
To send the command to serial forwarder : see the example in
sfsend.c.
Basically, what you need to do is :
1) Open sf channel using : sf_descr = open_sf_source(inet_addr, port_addr)
2) To write to sf channel, use : write_sf_packet(sf_descr, &data, dataLength)
Hope that helps.
Regards,
-daniel
-------- Original Message --------
> From: "Chan kenniel" <kennielchan at gmail.com>
> Sent: Friday, September 21, 2007 5:14 PM
> To: "tinyos forum" <tinyos-help at Millennium.Berkeley.EDU>
> Subject: [Tinyos-help] C and nesC problems
>
> Dear all,
>
> I have modified the oscillcope application to send message to PC by
> connecting to the serial forwarder, however, this is nesC to nesC
> communication.
> I am wondering whether there's any way to write a C file to send message to
> serial forwarder ? If there is, could you please give me an example?
>
> Thanks a lot.
>
>
> --
> Best wishes,
> Kenneth Chan
More information about the Tinyos-help
mailing list