Re: [Tinyos-help] Sending multiple messages in one shot

2009-12-29 Thread Paul Johnson

Vikram,

In general, each instance of the AMSenderC component only supports a 
queue of 1 message.  So just calling send() twice will likely result in 
some failure.  I haven't actually tried this myself (nor have easy 
access to the code right now), so i don't know if the 2nd send will 
return an error or what the exact end result would be.


One way to send two messages is to queue up the first message in the 
sendDone() event that is called after the first send() call.  You must 
be careful to make sure that the sendDone event is for the first message 
you sent.


There are queue data structures available in tinyos 2.x so if you wanted 
to create your own component, you may want to start from there.  It is 
also likely that someone else has implemented this feature (for certain 
protocols I'm sure it's been implemented, but I don't know of any 
generic component that has been built.  You may want to check out the 
contrib directories in the cvs checkout.  Another option is to look at 
your platform-specific implementation of AMSenderC and see how it 
manages its queue.  With some minor modifications, you could create your 
own component that supports an arbitrary queue size.


-Paul

On 12/29/2009 12:57 AM, Vikram vik76 wrote:

Hello,

How do I send multiple messages ( say two messages) one after the other?
The send statements in my code are one after the other.
Is there any queuing in tinyos which will take care of this automatically?
Because, when the second message is sent, the first message may still 
be using the radio.


Thanks
Regards
Vikram


___
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

[Tinyos-help] CTP Network/Group Separation

2009-12-29 Thread Bulut ERSAVAS
Hi all,

When using CTP, we would like to separate two adjacent networks from each
other (i.e. make sure that nodes of one network do not send data to the root
of the other network). Particularly because networks have different data
packet formats and we don't want them to get dropped/mixed up.

I know we can operate the networks on different RF channels, but this is not
a preferred method for us. Can group and/or collection id be used for this
purpose? If not, does CTP require modification for network separation? Which
files/libraries should we be modifying? Any ideas would greatly be
appreciated.

Thanks in advance.
Bulut
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Sending multiple messages in one shot

2009-12-29 Thread Arik Sapojnik
Vikram,

Perhaps you can consider creating two different AM types for these messages.
Thus you can send both of them - since each AMSender has a different queue.
I'm bot sure though, that the messages will be sent in the same order you
have sent them (although it is very likely)

Arik



On Tue, Dec 29, 2009 at 10:16, Paul Johnson oewyn...@gmail.com wrote:

  Vikram,

 In general, each instance of the AMSenderC component only supports a queue
 of 1 message.  So just calling send() twice will likely result in some
 failure.  I haven't actually tried this myself (nor have easy access to the
 code right now), so i don't know if the 2nd send will return an error or
 what the exact end result would be.

 One way to send two messages is to queue up the first message in the
 sendDone() event that is called after the first send() call.  You must be
 careful to make sure that the sendDone event is for the first message you
 sent.

 There are queue data structures available in tinyos 2.x so if you wanted to
 create your own component, you may want to start from there.  It is also
 likely that someone else has implemented this feature (for certain protocols
 I'm sure it's been implemented, but I don't know of any generic component
 that has been built.  You may want to check out the contrib directories in
 the cvs checkout.  Another option is to look at your platform-specific
 implementation of AMSenderC and see how it manages its queue.  With some
 minor modifications, you could create your own component that supports an
 arbitrary queue size.

 -Paul


 On 12/29/2009 12:57 AM, Vikram vik76 wrote:

 Hello,

 How do I send multiple messages ( say two messages) one after the other?
 The send statements in my code are one after the other.
 Is there any queuing in tinyos which will take care of this automatically?
 Because, when the second message is sent, the first message may still be
 using the radio.

 Thanks
 Regards
 Vikram


 ___
 Tinyos-help mailing 
 listtinyos-h...@millennium.berkeley.eduhttps://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




-- 
Best Regards,
Arik Sapojnik
sapoj...@gmail.com
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Sending multiple messages in one shot

2009-12-29 Thread Vikram vik76
Hello,
Thanks for your response..
Paul and Faisal - I have implemented it in sendDone for calling subsequent
messages. It works fine.
Arik - I tried your way of having two different AM types. This also works
fine for successive messages.

Regards
Vikram

On Tue, Dec 29, 2009 at 9:01 PM, Faisal Aslam 
as...@informatik.uni-freiburg.de wrote:

 Dear Vikram,
 You wait for sendDone. You should not send a new message until sendDone is
 called for the first message.
 Usually people send more message from within sendDone.

 best regards,

 --
 Faisal Aslam

 University of Freiburg
 http://cone.informatik.uni-freiburg.de/people/aslam/


 Vikram vik76 wrote:

 Hello,

 How do I send multiple messages ( say two messages) one after the other?
 The send statements in my code are one after the other.
 Is there any queuing in tinyos which will take care of this automatically?
 Because, when the second message is sent, the first message may still be
 using the radio.

 Thanks
 Regards
 Vikram
 


 ___
 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

[Tinyos-help] Help required: conversion of AT commands to nesC

2009-12-29 Thread Sandhya Sourirajan
Dear Sir/ Madam,

I am Sandhya Sourirajan doing my final year, B.E- EEE in Coimbatore
Institute of Technology. I am currently doing a project involving Wireless
Sensor Networks using the Crossbow's micaz motes for building  an intrusion
detection system.
I checked out the Wireless Sensor Networks REsearch group website and learnt
about the developments in this field by sending messages through GSM
modules. However no infomation on furnished on interfacing the GSm modules
with motes and the conversion of the AT command set to nesC.

We would be using GSM modules in our project and the gateway is connected to
the GSM module using a suitable connector. The AT commands for the GSM
modules have to be written in nesC.As we are naïve to TinyOS and nesC, we
have very little idea about the conversion of the AT commands to nesC. Could
you please tell us about the feasibility of converting the AT command set to
nesC, to send the sensor data from one remote location through GSM modules.

Looking forward for your reply.


Thanks in advance.

-- 
Regards,
Sandhya
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Help required: conversion of AT commands to nesC

2009-12-29 Thread Paul Johnson

Sandhya,

I've done some similar work with embedded systems interfacing with GSM 
modems using RS-232(serial) connections.  Basically what I had to do was 
create my own interface to the GSM modem using AT commands.  The micaz 
platform has an RS-232 connection (the connection is usually obtained by 
using a mib510/mib520 gateway) which you can use to send AT commands to 
the GSM modem.


One of the first things you will need to do is create your own component 
for TX/RX plain text (ASCII) over the serial port.  The issue is that by 
default, tinyos sends/receives ActiveMessage Packets over the serial 
port, just as if it had sent/received that message over the wireless 
link.  You will need to change this so that you use ASCII over the serial.


Once you do this, it's simply a matter of creating the required 
interface that will properly initialize the GSM modem, open TCP/UDP 
sockets, and sending information over the serial port using at 
commands(ie: ATD, AT+REBOOT, etc.)


Whatever GSM modem you decide to use, it should have a user manual 
defining all of the AT commands it supports.  Several important commands 
to look for that will make your life easier: Echo -- when this is 
disabled, the serial port will no longer echo AT commands sent by the 
mote(enabling this when using hyperterminal/gtxterm makes your life 
easier, but when programatically sending commands, you don't need this 
as it makes parsing the mote's RX serial information that much harder), 
verbose -- This command may/may not be available, it will simplify the 
result of the AT command.  Normally when you execute an AT command you 
might get a response back like OK or OK\r\nip address: 
xxx.xxx.xxx.xx with verbose set to the lowest setting, most results are 
shortened to an integer value, which makes parsing command/responses easier.


Certain commands have timing constraints.  For example if you have 
opened a TCP socket, any serial output is redirected over the TCP 
socket.  If you need to temporarily pause the connection and run another 
AT command.  For my GSM modem, the key command was +++.  A good GSM 
modem user guide should have this information documented, however.


Good luck with your endeavor,
-Paul

On 12/29/2009 4:21 AM, Sandhya Sourirajan wrote:

Dear Sir/ Madam,

I am Sandhya Sourirajan doing my final year, B.E- EEE in Coimbatore 
Institute of Technology. I am currently doing a project involving 
Wireless Sensor Networks using the Crossbow's micaz motes for 
building  an intrusion detection system.
I checked out the Wireless Sensor Networks REsearch group website and 
learnt about the developments in this field by sending messages 
through GSM modules. However no infomation on furnished on interfacing 
the GSm modules with motes and the conversion of the AT command set to 
nesC.


We would be using GSM modules in our project and the gateway is 
connected to the GSM module using a suitable connector. The AT 
commands for the GSM modules have to be written in nesC.As we are 
naïve to TinyOS and nesC, we have very little idea about the 
conversion of the AT commands to nesC. Could you please tell us about 
the feasibility of converting the AT command set to nesC, to send the 
sensor data from one remote location through GSM modules.


Looking forward for your reply.


Thanks in advance.

--
Regards,
Sandhya


___
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

[Tinyos-help] Distribution of nodes

2009-12-29 Thread Mehwish Nasim
Hi,
Is there anyway (in Tossim) to generate the topology according to some
distribution e.g. poisson distribution?

My other question still remains unanswered about the error in
LossyLayerModel :
http://www.mail-archive.com/tinyos-help@millennium.berkeley.edu/msg30986.html

Awaiting your help.

Regards,
Mehwish.

-- 
Verily, His Command, when He intends a thing, is only that He says to it,
Be! and it is! (36:82)
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help