I want to send msg from a java program to a mote. I have done a program that 
send a msg directly to de serial port and it works fine.
But when I try to send the same msg by the serial forwarder the serial 
forwarder doesn't increase the writen packets and doesn't do anything.
The part of the code where I send the message is this:
 
byte b[]=new byte[26];

b[0]=0x7E; //bit inicio

b[1]=0x42; //tipo msg(ack/no ack)

b[2]=0x01; //direccion

b[3]=0x00; //direccion

b[4]=0x00; //tipo msg

b[5]=0x22; //identificador grupo

b[6]=0x10; //tamaƱo msg

b[7]=0x70; //sensorboard id

b[8]=0x05; //packet id

b[9]=0x00; //id del emisor

b[10]=0x00; //RSVD byte reservado

b[11]=0x4D; //data 0

b[12]=0x01; //data 1

b[13]=0x00;

b[14]=0x06;

b[15]=0x00;

b[16]=0x00;

b[17]=0x00;

b[18]=0x00;

b[19]=0x00;

b[20]=0x00;

b[21]=0x00;

b[22]=0x00;

b[23]=0x00; //crc

b[24]=0x00; //crc

b[25]=0x7E; //bit fin

try {

this.printStream.write(b);

System.out.write(b);

} catch (IOException e) {

e.printStackTrace();

}

System.out.println("enviado");

 

when I send it to the serial port it works fine but ,when I send it to the 
socket connected to the serial forwarder, it doesn't do anything.

Thanks  

_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to