Howdy.

On Thu, Nov 29, 2012 at 3:06 AM, András Bíró <andras.b...@unicomp.hu> wrote:

>
>
>
> On Thu, Nov 29, 2012 at 12:56 AM, Doug Carlson <carl...@cs.jhu.edu> wrote:
>
>> Andras,
>> Thanks! I made some fixes and it seems good to go now. I've attached the
>> fixed version to the issue in the google code repo:
>> http://code.google.com/p/tinyos-main/issues/detail?id=152
>>
>
> Great!
>
>>
>> It was mostly there, but some constants were incorrect and it didn't
>> handle ACK's properly. The code's not beautiful-- it wasn't clear to me how
>> to cleanly incorporate the multi-threading requirements of ACKs with the
>> existing structure. But this keeps the behavior identical between
>> PacketSources, and works fine in my application.
>>
>
> That's why I didn't do the same. I've seen some ugly hacks, and I'm not an
> expert in python so I decided to check it later.
>
> By the way, do you know how to get the sender's nodeid of a package? With
> java, I used
> message.getSerialPacket().get_header_src(), but there's no getSerialPacket
> method in the class generated by mig.
>
>
The mig-generated classes inherit from tinyos.message.Message.Message,
which exposes the src field of the header as the 'addr' attribute and via
the getAddr() method.

On a side note, SerialActiveMessageP.AMSend.send intentionally DOES NOT set
the src and group fields of the serial AM packet. This is fine (and
desirable) if you're using BaseStation (which copies the header info from
received radio packets into the serial AM header). But if for some reason
your application needs to know the AM addr of a node which is sending data
via serial active messages, then you either need to handle this at a higher
layer at the mote or modify SerialActiveMessageP (which would break the
"transparent bridging" offered by BaseStation).

Thanks,
Doug


> Andris
>
>
>>
>> Thanks for the pointer!
>> -Doug
>>
>>
>> On Wed, Nov 28, 2012 at 3:30 AM, András Bíró <andras.b...@unicomp.hu>wrote:
>>
>>> Hi Doug,
>>>
>>> I had the same issue recently:
>>> http://code.google.com/p/tinyos-main/issues/detail?id=152
>>> Yann Le Corre was kind enough to send me his working version of the
>>> pyton sdk, what he found somewhere on the internet:
>>> http://dl.dropbox.com/u/363226/munka/tos-python.tar.gz
>>> But I never really worked with it, we had to do the project fast and
>>> stable, and we don't really trust the python sdk.
>>>
>>> Andris
>>>
>>>
>>> On Tue, Nov 27, 2012 at 5:31 PM, Doug Carlson <carl...@cs.jhu.edu>wrote:
>>>
>>>> Howdy.
>>>> Looking at the code for tinyos.message.MoteIF, it looks like if you use
>>>> a serial@dev:baud source when calling addSource, it will check for the
>>>> existence of a tinyos.packet.SerialSource module (which is set to None if
>>>> the import of such a module fails).
>>>>
>>>> I don't see a SerialSource.py anywhere, so direct serial connections
>>>> fail. Is this intentional (i.e. blocked off for future work), or is it
>>>> missing from the repo and actually exists somewhere?
>>>>
>>>> Everything works great if I run the java SerialForwarder and use an
>>>> sf@host:port source in my python script (which uses the
>>>> tinyos.packet.SFSource class), but I'd prefer to cut out the middle man if
>>>> possible. If it's not available, then I'm assuming the correct way to
>>>> proceed would be to adapt the code in tos.py in something that inherits
>>>> tinyos.packet.PacketSource?
>>>>
>>>> Thanks,
>>>> Doug
>>>>
>>>> _______________________________________________
>>>> Tinyos-help mailing list
>>>> Tinyos-help@millennium.berkeley.edu
>>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>>
>>>
>>>
>>
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to