Hi

I am trying to use python sdk to communicate with Serial Forwarder. I
receive messages using "receive(self, src, msg)" as in Chad's example
and it works ok. However I found some troubles when trying to send
messages to Serial Forwarder.

I used MoteIF's "sendMsg(self, dest, addr, amType,
group, msg)" method. I have tried the following call in my class:

 self.mif.sendMsg(self.source, 0, t.get_amType(), 0, t)

Where,
  self.source = self.mif.addSource("s...@localhost:9001")
and
 t=TestSerialMsg()
 t.set_counter(13)

But I get the following errors:

Error 32, 'Broken pipe')
  File "/opt/tinyos-2.x/support/sdk/python/tinyos/message/MoteIF.py",
line 124, in sendMsg
    dest.writePacket(data)
  File "/opt/tinyos-2.x/support/sdk/python/tinyos/packet/SFSource.py",
line 69, in writePacket
    self.prot.writePacket(packet)
  File "/opt/tinyos-2.x/support/sdk/python/tinyos/packet/SFProtocol.py",
line 74, in writePacket
    self.outs.write(chr(len(packet)))
  File "/opt/tinyos-2.x/support/sdk/python/tinyos/packet/SocketIO.py",
line 77, in write
    return self.socket.send(data)
None

Can anyone send some solution
-- 
TONY CHARLEY
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to