Hello to all,
I ahve a problem with the component PlatformSerialC.I would like to use 
UartStream to send data on serial to send data more speed possible with serial 
:from mote to PC with serial port.
I have tried to use Msp430Uart1C(sorry I have tinyOS 2.1 with telosb and I 
program with nesc)but I'am not able to send data from mote to PC.I must send 
with serial port 19200 byte in few second  so I don't use 
SerialActiveMessageC.
Now I have discover PlatformSerialC but I obtain the reverse result my mote 
continue to send data also I want to send only 1 number :Why ?


configuration GestioneC { }

implementation
{
  components MainC, LedsC,
    GestioneP,PlatformSerialC,new TimerMilliC() as Timer1;

  GestioneP.Boot -> MainC.Boot;
  GestioneP.Leds -> LedsC;
  
  

 GestioneP.PlatStdControl->PlatformSerialC;
 GestioneP.PlatUartStream->PlatformSerialC;

 
}





#include "printf.h"
module GestioneP
{
  uses {
    interface Boot;
    interface Leds;
    interface StdControl as PlatStdControl;
    interface UartStream as PlatUartStream;
  }
}

implementation
{
 
   uint8_t numero=15;
   error_t er;
   event void Boot.booted(){
          //call PlatStdControl.start();
          
          call PlatUartStream.send(&numero,1);
   }
   
 
   async event void PlatUartStream.receivedByte(uint8_t byte){
        
   }
   
  async event void PlatUartStream.receiveDone(uint8_t *buf, uint16_t len, 
error_t error){
        
  }
  
  task void stampa(){
        
        if(er == SUCCESS)
                printf("mandato ok\n");
        else
                printf("mandato errore\n");
                
                printfflush();
        
        }
  
  async event void PlatUartStream.sendDone(uint8_t *buf, uint16_t len, error_t 
error){
        er=error;
        
        post stampa();
  }
  
  
   
 
 
 
  }


  
It has a  very strange behaviour :I 'd like to do one send while I do on to 
send many times.
Every suggestion is very important :thanks in advance.

Giorgio

 
  



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

Reply via email to