Hi,

I have been trying to get the Serial Communication working in tosthreads,
but it's not working. Below are the details:

----------------------------------------------------------------------------------------------------------------------

Module in the <FileName>C.nc for Serial Communication:

    uses interface Thread as <FileName>Thread2;
    uses interface BlockingStdControl as BlockingSerialControl;
    uses interface BlockingAMSend as BlockingSerialAMSend;
    uses interface BlockingReceive as BlockingSerialReceive;
    uses interface Packet as PacketSerial;

 

----------------------------------------------------------------------------------------------------------------------

Configuration in the <FileName>AppC.nc for setting up connections:

    components BlockingSerialActiveMessageC;
    .

    .

    components new BlockingSerialAMSenderC(228) as BlockingSerialAMSender;
    components new BlockingSerialAMReceiverC(228) as
BlockingSerialAMReceiver;
    <FileName>C.BlockingSerialAMSend -> BlockingSerialAMSender;
    <FileName>C.BlockingSerialReceive -> BlockingSerialAMReceiver;
    <FileName>C.PacketSerial -> BlockingSerialAMSender;


----------------------------------------------------------------------------------------------------------------------

 Trying to receive a Packet sent from the Serial Interface:

  if(call BlockingSerialReceive.receive(&m1, 5000) == SUCCESS){

   .

   .

  }

 
---------------------------------------------------------------------------------------------------------------------

It looks like there is some problem in the configuration, because the call
to BlockingSerialReceive is pretty straight-forward. Am I missing something
here? Please help.

 

Thanks and Regards

Anupam Ashish


-- 
View this message in context: 
http://old.nabble.com/-Help--tosthreads-%2B-Serial-Communication-tp31753631p31753631.html
Sent from the TinyOS - Help mailing list archive at Nabble.com.

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

Reply via email to