[Tinyos-help] (no subject)

2010-11-02 Thread Omar Bouzid
Hi Miklos,

I'm just wondering if you could help me please.

I've tried to implement a similar scenario to the TestFtsp application where 
three TestFtsp motes should send to the base station the local rather than the 
global reception timestamps of messages broadcast by a dedicated beacon mote 
programmed with RadioCountToLeds at periodic intervals (say each 1, 2 and 4 
seconds). I found that the measured intervals (the difference between tni and 
tni+1 where tni and tni+1 represent, for example, local reception timestamps of 
beacon 'i' and beacon 'i+1' according to the local time of mote n) are almost 
the same for the three TestFtsp motes for the same beacons (i.e. raw data of 
the attached table). However, by comparing the measured intervals of the same 
TestFtsp mote (i.e. column data of the attached table) I'll get noticeable 
differences.

In fact, I was expecting the opposite. Could you let me know whether what I got 
is wrong or not? and what is the reason for such results?

BTW, I'm using tinyos 2.x and micaz platform and I'm not going here to test 
whether the TestFtsp motes are synchronized or not.

Thanks in advance for any help.

Omar




Result.docx
Description: Result.docx
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

[Tinyos-help] Timestamping the start and the end of a sampling process

2010-08-27 Thread Omar Bouzid
Dear all,

After posting my problem to TinyOs mailing list and searching a lot in 
TinyOs-help and following some hints, I still cannot find a solution to my 
problem which is described below:
 
I'm using tinyos-2.x and three micaz platforms equipped with MTS310 sensor 
board and once they receive a start sample command from BS, they will start 
sample the mic sensor immediately. Each mote timestamps the start and the end 
of the sampling process in order to compute the sample interval. My question is:

Why I always do receive different lengths of sample intervals (for example, 
with a STDEV of 601.1724757, 325.9728201 and 472.9102405 for the three motes)?

First I was using CounterMicro32C component and  Counter.get() command to 
timestamp the start and the end of the sampling process and then I tried to use 
CounterToLocalTime component as well. But in both cases I still have the same 
problem.

So, please share with me this problem and let me know your suggestions ASAP. 
Any hint might be useful for me and take me a step forward.

Thanks in advance,
Omar

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


[Tinyos-help] receiving different sample intervals

2010-08-21 Thread Omar Bouzid
Hi All,
I'm using tinyos-2.x and micaz platform and I'm having problems with my 
microphone sample application, the thing is simple, three motes are waiting for 
receiving a start sample command from BS and once they receive it they will 
start immediately the sampling process. Each mote timestamps the start and the 
end of this process in order to compute the sample interval. The problem is 
that theoretical the three intervals should be equal because they use the same 
buffer length and sample at 4kHz, but I always got different sample intervals 
(with a STDEV of 601.1724757, 325.9728201 and 472.9102405 for the three motes). 
I'm using CounterMicro32C component and  Counter.get() command to timestamp the 
events.

Could anyone please suggest any idea about how can I improve these results.

Thanks in advance,
Omar


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


[Tinyos-help] Why my received signals incoherent?

2010-08-07 Thread Omar Bouzid
Hi all, 

I'm using three sensor nodes (MICAz + MTS310), positioned at the same distance 
from a sound source, to sample a click signal at 4kHz.The sensor nodes start 
sampling simultaneously once they receive a start command from a base station 
and a buffer is used to hold 1200 samples in each sensor node. When the buffer 
is full, each sensor node will start sending their sampled data to the base 
station which will forward them to a PC. They send their own sampled data 
serially to the base station. When I plot the received signals I expected to 
get coherent signals but this was not the case although the experiments were 
conducted in the same environment and under the same conditions. So, what could 
be the reasons for such incoherent signals?

I appreciate any help in advance,

Omar

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


Re: [Tinyos-help] continuous sampling of mic

2010-07-03 Thread Omar Bouzid
Hi Miklos,

Thanks for your response. Yes, I tried to use Atm128FastAdc library and 
MicReadStreamTest application. However, as you said it works only for IRIS and 
unfortunately not for MICAZ, but the Soundlocalizer works fine for MICAZ. So, 
is it possible to modify the soundlocalizer example so that it can sample the 
mic sensor continuously?

I would really appreciate your help.

Thanks again,
Omar

>-Original Message-
>From: mmar...@gmail.com [mailto:mmar...@gmail.com] On Behalf Of Miklos
>Maroti
>Sent: 30 June 2010 14:33
>To: Omar Bouzid
>Cc: Tinyos-help@millennium.berkeley.edu
>Subject: Re: [Tinyos-help] continuous sampling of mic
>
>Hi Omar,
>
>Use this library (works only for IRIS so far)
>
>http://szte-wsn.cvs.sourceforge.net/viewvc/szte-
>wsn/tinyos/tos/lib/Atm128FastAdc/
>
>and this sample application to sample the mic at 9 KHz.
>
>http://szte-wsn.cvs.sourceforge.net/viewvc/szte-
>wsn/tinyos/apps/MicReadStreamTest/
>
>Miklos
>
>On Tue, Jun 29, 2010 at 2:08 PM, Omar Bouzid
> wrote:
>> Hi all,
>>
>> I would really appreciate if someone can reply and guide me with this
>problem.
>>
>> Is it possible to modify the soundlocalizer example explained in
>Tinyos programming book, chapter 13 so that it can sample the mic sensor
>continuously?
>>
>> In fact, I tried to do it by putting the "Atm128AdcSingle.getData"
>command inside a for loop and each time the event
>"Atm128AdcSingle.dataReady" is signalled, the data will be added to a
>buffer as shown in the code below. However, it does not work as I
>expected. It seems to be that, although I can see that the
>"Atm128AdcSingle.getData" command is executed several times depends on
>the buffer size, the event "Atm128AdcSingle.dataReady" is signalled only
>once (I don't know why?).
>>
>> Pleas correct me if what I did is wrong.
>>
>> void Cont_Sample() {
>>        for(i = 0; i < BUFFER_SIZE; ++i)
>>                call Atm128AdcSingle.getData(call
>MicAdcChannel.getChannel(),
>>                                 ATM128_ADC_VREF_OFF, FALSE,
>>                                 ATM128_ADC_PRESCALE_32);
>>                printf("Here is a ith value: %d\n", i);
>>                printfflush();
>> }
>> /
>>
>> async event void Atm128AdcSingle.dataReady(uint16_t data, bool
>precise) {
>>   Add_DataToBuffer(data);
>>  }
>> 
>>
>> void Add_DataToBuffer(uint16_t Mic_data){
>>        MicRead[i] = Mic_data;
>>        if (i == BUFFER_SIZE)
>>        {
>>                printf("last iteration value: %x\n", i);
>>                printfflush();
>>                post stopMicrophone();
>>        }
>> }
>>
>> BTW: I am using Tinyos-2.x, Micaz and mts300.
>>
>> I would be very grateful if someone can help.
>>
>> Thanks in advance,
>> Omar
>>
>> ___
>> 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] continuous sampling of mic

2010-06-29 Thread Omar Bouzid
Hi all, 

I would really appreciate if someone can reply and guide me with this problem.

Is it possible to modify the soundlocalizer example explained in Tinyos 
programming book, chapter 13 so that it can sample the mic sensor continuously?

In fact, I tried to do it by putting the "Atm128AdcSingle.getData" command 
inside a for loop and each time the event "Atm128AdcSingle.dataReady" is 
signalled, the data will be added to a buffer as shown in the code below. 
However, it does not work as I expected. It seems to be that, although I can 
see that the "Atm128AdcSingle.getData" command is executed several times 
depends on the buffer size, the event "Atm128AdcSingle.dataReady" is signalled 
only once (I don't know why?).

Pleas correct me if what I did is wrong.

void Cont_Sample() {
for(i = 0; i < BUFFER_SIZE; ++i)
call Atm128AdcSingle.getData(call MicAdcChannel.getChannel(),
 ATM128_ADC_VREF_OFF, FALSE,
 ATM128_ADC_PRESCALE_32);
printf("Here is a ith value: %d\n", i);
printfflush();
}
/ 

async event void Atm128AdcSingle.dataReady(uint16_t data, bool precise) {
   Add_DataToBuffer(data);
  }


void Add_DataToBuffer(uint16_t Mic_data){
MicRead[i] = Mic_data;
if (i == BUFFER_SIZE)
{
printf("last iteration value: %x\n", i);
printfflush();
post stopMicrophone();
}
}

BTW: I am using Tinyos-2.x, Micaz and mts300.

I would be very grateful if someone can help.

Thanks in advance,
Omar

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


[Tinyos-help] MicReadStreamTest application

2010-06-22 Thread Omar Bouzid
Dear All,

Did anyone attempt to run MicReadStreamTest application on micaz? I have tried 
but it seems to be that it does not work.

http://szte-wsn.cvs.sourceforge.net/viewvc/szte-wsn/tinyos/apps/MicReadStreamTest/

Please response ASAP.

Thanks in advance,
Omar


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


Re: [Tinyos-help] ADC free run mode

2010-05-29 Thread Omar Bouzid
Hi Miklos,

Is there any README file that explains how to use these applications?, cause I 
have downloaded them on the MICAZ with mts300 sensor board and I haven't got 
any error while executing make command, but I got no response even the leds 
didn't blink. I am not sure if I should change any setting in the Makefile.

I appreciate any help I advance.

Thanks,
Omar

>-Original Message-
>From: mmar...@gmail.com [mailto:mmar...@gmail.com] On Behalf Of Miklos
>Maroti
>Sent: 27 May 2010 10:04
>To: Omar Bouzid
>Cc: tinyos-help@millennium.berkeley.edu
>Subject: Re: [Tinyos-help] ADC free run mode
>
>Hi Omar!
>
>Here:
>
>http://szte-wsn.cvs.sourceforge.net/viewvc/szte-
>wsn/tinyos/apps/MicReadStreamTest/
>
>Miklos
>
>On Thu, May 27, 2010 at 10:48 AM, Omar Bouzid
> wrote:
>> Hi Miklos,
>>
>> Thanks a lot for your reply. I'll have a deep look on this library but
>I cannot find the MicReadStreamTest
>> Application that you have mentioned in this email. So, please let me
>know where I can find it.
>>
>> Best regards,
>> Omar
>>
>>>-Original Message-
>>>From: mmar...@gmail.com [mailto:mmar...@gmail.com] On Behalf Of Miklos
>>>Maroti
>>>Sent: 26 May 2010 21:58
>>>To: Omar Bouzid
>>>Cc: tinyos-help@millennium.berkeley.edu
>>>Subject: Re: [Tinyos-help] ADC free run mode
>>>
>>>Hi Omar,
>>>
>>>This library modifies the default ReadStream implementation on the
>>>atmega128 MCU to use in free running mode.
>>>
>>>http://szte-wsn.cvs.sourceforge.net/viewvc/szte-
>>>wsn/tinyos/tos/lib/Atm128FastAdc/
>>>
>>>In the same repository you will see a sound recorder MicReadStreamTest
>>>application that uses this module to record sound at 17 khz and stream
>>>it to the base station (you will need a fast basestation).
>>>
>>>Best,
>>>Miklos
>>>
>>>
>>>
>>>On Wed, May 19, 2010 at 4:24 PM, Omar Bouzid
>>> wrote:
>>>> Hi all,
>>>> I want to know how can I use the ADC free run mode in tinyos-2.x
>using
>>>Micaz to sample continuously the mts310 microphone sensor? Or how can
>I
>>>modify DetectorC code in the soundlocalizer application so that it
>saves
>>>the data sampled in a buffer rather doing threshold test?
>>>>
>>>> Your help is highly appreciated.
>>>>
>>>> Thanks,
>>>> Omar
>>>>
>>>> ___
>>>> 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


Re: [Tinyos-help] ADC free run mode

2010-05-29 Thread Omar Bouzid
Hi Miklos,

Thanks a lot for your reply. I'll have a deep look on this library but I cannot 
find the MicReadStreamTest
Application that you have mentioned in this email. So, please let me know where 
I can find it.

Best regards,
Omar

>-Original Message-
>From: mmar...@gmail.com [mailto:mmar...@gmail.com] On Behalf Of Miklos
>Maroti
>Sent: 26 May 2010 21:58
>To: Omar Bouzid
>Cc: tinyos-help@millennium.berkeley.edu
>Subject: Re: [Tinyos-help] ADC free run mode
>
>Hi Omar,
>
>This library modifies the default ReadStream implementation on the
>atmega128 MCU to use in free running mode.
>
>http://szte-wsn.cvs.sourceforge.net/viewvc/szte-
>wsn/tinyos/tos/lib/Atm128FastAdc/
>
>In the same repository you will see a sound recorder MicReadStreamTest
>application that uses this module to record sound at 17 khz and stream
>it to the base station (you will need a fast basestation).
>
>Best,
>Miklos
>
>
>
>On Wed, May 19, 2010 at 4:24 PM, Omar Bouzid
> wrote:
>> Hi all,
>> I want to know how can I use the ADC free run mode in tinyos-2.x using
>Micaz to sample continuously the mts310 microphone sensor? Or how can I
>modify DetectorC code in the soundlocalizer application so that it saves
>the data sampled in a buffer rather doing threshold test?
>>
>> Your help is highly appreciated.
>>
>> Thanks,
>> Omar
>>
>> ___
>> 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] ADC free run mode

2010-05-19 Thread Omar Bouzid
Hi all,
I want to know how can I use the ADC free run mode in tinyos-2.x using Micaz to 
sample continuously the mts310 microphone sensor? Or how can I modify DetectorC 
code in the soundlocalizer application so that it saves the data sampled in a 
buffer rather doing threshold test?

Your help is highly appreciated.

Thanks,
Omar 

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


[Tinyos-help] TinyOS-2.x and Sampling rate

2010-04-09 Thread Omar Bouzid
Hi all,

Currently I am trying to implement a simple code using nesC language and 
TinyOS-2.x so that a sensor node will be able to capture an acoustic signal 
generated by a PC speaker, for instance a sine wave or a gunshot signal, in 
order to know what is the maximum sampling frequency that MICAz mote can 
achieve. This code is installed on a sensor node which sends the signal 
captured to the base station. However, I only can achieve maximum sampling 
frequencies in the range of 200Hz and 750Hz using Read interface and ReadStream 
interface respectively. But...

In the literature, it was reported that, in tinyos-1.x, the MICA components can 
normally sample at a frequency up to 200 Hz (in real time transfer mode i.e. 
sampling and sending), while in the  ADC's free running mode (i.e. turning off 
the wireless radio of the MICA components while sampling) the highest sampling 
rate using these components can reach 17.723 KHz.

After I read the TinyOS Programming book, I decided to use TinyOS-2.x instead 
of TinyOS-1.x in my project because of two reasons:
1- it is expected that the sampling frequency can be easily increased 
since TinyOS-2.x supports in addition to a millisecond timer a microsecond 
timer which could be used to improve the sampling rate.

2- It supports the ReadStream Interface which is equivalent to the 
ADC's free running mode.

But, as I tried to use the microsecond timer in my code, I surprised that this 
type of timer is actually unknown for the compiler. Also, in ReadStream mode I 
only can reach 750 Hz as a maximum sampling rate by setting 
timer.startperiodic(1300) (below this value the senor node does not send any 
data). So, my questions are: 

1- Is it right that the microsecond timer still not fully supported by 
the MICA components?
2- Which commands that can be used to set the sampling rate in the 
ReadStream interface? Or is there an technique that can be used to 
achieve high sampling rates?

I am looking forward to hear from you and I appreciate in advance any help.

Best regards,
Omar

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


[Tinyos-help] Changing NREADING in OscilloscopeC

2010-04-01 Thread Omar Bouzid
Hi all,
I tried to modify the OscilloscaopC application in tinyos-2.x to sample the 
microphone sensor of mts310 (attached to micaz) and I have succeed to do that. 
However, when I tried to change the number of readings per message in the 
Oscilloscope.h (less or greater than 10), no data will be displayed in the GUI. 
So, any suggestion to solve this issue?

Thanks in advance,
Omar


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


[Tinyos-help] (Sample and save) instead of (sample and send)

2009-10-13 Thread Omar Bouzid
Dear All,

I would be appreciated, in advance, if anyone could help?

I'm trying to sample acoustic signals using MICAz, MTS310 sensor board and 
TinyOs 2. under MoteWorks environment. I have succeed in some how to sample 
these signals in a way that the code, after each individual sampling process, 
sends the sampled data to the PC where the data will be saved and processed 
offline. In other words, it samples and sends immediately the sampled data.
What I'm looking for is to know: is it possible first to sample and save then 
to send all sampled data after finishing the sampling process to the base 
station? If yes, how?

Thanks in advance
OMB

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


[Tinyos-help] Handshake routine

2009-09-03 Thread Omar Bouzid
Dear Michael,

I am currently using MTS310 sensor board and MICAz Motes in order to implement 
a single hop wireless network. I have used one of the tutorial examples which 
samples for example only the light sensor on a sensor board, packetizes, and 
sends the data back to the base station directly through first the serial port 
(UART) and second over Mote radio. 

The experimental scenario was as follows:

One of motes was used as a sensor node to sense the light and the second one 
was programmed with TOSbase code and was plugged into MIB520 gateway to monitor 
the RF packet contents by displaying them using XSniffer on PC.


I would be appreciated if you could help me to understand the handshake routine 
between the sensor node and the other Mote.
Cheers,
OMB


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


[Tinyos-help] Units conversion of acoustic data

2009-08-13 Thread Omar Bouzid
Hi All,

By looking to the displayed data in MoteView most of them are displayed in 
engineering units which are unlikely to give any sense, in particularly the 
acoustic data that are captured by mts310's microphone. Thus, I would like to 
know if someone have any experience to convert them to voltage units.

Cheers,
OMB


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


Re: [Tinyos-help] Capturing acoustic signals

2009-08-11 Thread Omar Bouzid
Hi Michael,

Thanks a lot, I have solved the problem. However, do you know how can I 
generate an executable file using nesC in order to program the Mote under 
MoteView GUI using this file which I need for displaying my captured acoustic 
signals in the MoteView's chart diagram.

Cheers,
OMB

>-Original Message-
>From: Michael Schippling [mailto:]
>Sent: 11 August 2009 17:57
>To: Omar Bouzid
>Cc: 'tinyos-help@millennium.berkeley.edu'
>Subject: Re: [Tinyos-help] Capturing acoustic signals
>
>Somehow you seem to be crossing up versions of files.
>The two *Calibrate interfaces are a feature of
> MoteWorks\tos\platform\atm1281\ADCControl.nc
>but not the "standard" ADCControl in the interfaces directory.
>
>For the micaz I think you should be getting the atm128l version
>but whatever file you have that implements the ADC seems to be
>from someplace else. Try to find other examples of your platform
>using ADCs and copy the config entrys EXACTLY. Also try adding
>PFLAGS += -v  to your makefile to cause nescc to dump a list
>of files it is using. Failing that post your source and the
>commands you are using to compile.
>
>MS
>
>
>
>Omar Bouzid wrote:
>> Dear All,
>>
>> Recently, I downloaded the MoteView and MoteWorks software and I
>succeed to implement most examples explained in the MoteWorks tutorial,
>However, as I tried to implement my own example using MICAz and MTS310
>sensor board to sample just acoustic signals using sensor board's
>microphone, I faced certain number of errors such:
>> "ADCM.nc:39: `ADCControl.autoCalibrate' not implemented
>> ADCM.nc:39: `ADCControl.manualCalibrate' not implemented" which I
>cannot find the main cause for them due to the lack of experience.
>Therefore, my concern is to find someone who can give me some guidelines
>that can help to program these equipments in a right way. Also, is it
>enough to use only the MoteWorks environment to program the motes?
>>
>> Cheers,
>> OMB
>>
>> ___
>> 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] Capturing acoustic signals

2009-08-10 Thread Omar Bouzid
Dear All,

Recently, I downloaded the MoteView and MoteWorks software and I succeed to 
implement most examples explained in the MoteWorks tutorial, However, as I 
tried to implement my own example using MICAz and MTS310 sensor board to sample 
just acoustic signals using sensor board's microphone, I faced certain number 
of errors such:
"ADCM.nc:39: `ADCControl.autoCalibrate' not implemented
ADCM.nc:39: `ADCControl.manualCalibrate' not implemented" which I cannot find 
the main cause for them due to the lack of experience. Therefore, my concern is 
to find someone who can give me some guidelines that can help to program these 
equipments in a right way. Also, is it enough to use only the MoteWorks 
environment to program the motes?

Cheers,
OMB

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