Hi,

I am using an IRIS mote to send data to UART every time the timer fires. I am 
using UartStream interface to send the data. I have connected the UART to my PC 
hyperterminal to display the data sent. But is not getting displayed on the 
hyperterminal.
The LED in the Uart.sendDone() is blinking which means data is being sent but 
not getting displayed on the hyperterminal. I am using Atm128Uart0C for the 
wiring. Can anyone please help me with this problem? Here is my code.

--------------------GSMmodemC.nc------------------

module GSMmodemC
{
  uses interface Boot;
  uses interface StdControl as UartControl;
  uses interface UartStream;
  uses interface Leds;
  uses interface Timer<TMilli>;

}
implementation
{

char* uartsendBuf1 = "AT\n";
char* uartsendBuf2 = "AT+CMGF=1\n";
char* uartsendBuf3 = "AT+CMGS=";
char* uartsendBuf4 = "+6590140252";
char* output = "Hello";

  event void Boot.booted() {
    call UartControl.start();
    call Timer.startPeriodic(2000);
  }

    event void Timer.fired(uartsendBuf1,3) {
    call UartStream.send();
    }


  async event void UartStream.sendDone( uint8_t* buf, uint16_t len, error_t 
error )
  {
    call Leds.led2Toggle();
  }

  async event void UartStream.receivedByte( uint8_t byte )
  {
  }

  async event void UartStream.receiveDone( uint8_t* buf, uint16_t len, error_t 
error )
  {
  }

}


--------------------------------GSMTestAppC-------------------------------------------

configuration GSMTestAppC{}
implementation {
  components MainC, GSMmodemC, LedsC, Atm128Uart0C, new TimerMilliC();

  MainC.Boot <- GSMmodemC;
  Atm128Uart0C.StdControl <- GSMmodemC.UartControl;
  Atm128Uart0C.UartStream <- GSMmodemC;
  GSMmodemC.Leds -> LedsC;
  GSMmodemC.Timer -> TimerMilliC;

}

Thanks in advance

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

Reply via email to