This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Measuring RSSI value over time

Other Parts Discussed in Thread: CC2530

Hi Guys,

 

Is there a way to measure RSSI value? for example over time???

Please I really need to know how to measure RSSI value into a graph.

Thanks :)

 

Regards,

Terence

  • Terence:

    There is a similar request at the tail end of the thread (https://community.ti.com/forums/t/1447.aspx).

    Although I haven't completely understood how the individual wants to capture time, ie. whether locally to the microcontroller actually reading the RSSI value from the CCxxxx device, or a remote device which is getting messages that contain RSSI values.
    I have indicated an application note and example code for a Real Time Clock on the MSP430 that can be used to create a time base.  Then if you read the RSSI value from the CCxxxx device, you can then place that value along with a copy of the current time into a data structure to get your measuring RSSI over time functionality.

    For convenience, the application note information is replicated below.
    There is example code for a Real Time Clock running on the MSP430 at (http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=slaa290).
    I believe this is implemented assuming a 32.768KHz crystal connected to the MSP430, so it would need to be modified to use the integrated DCO.

  • Okay, thanks a lot Brandon but i still don't understand what it means.

    What i want is to modify part of  the program of the eZ430-RF2500 Sensor Monitor Demo v1.02. 

    To make it display a graph of the RSSI value in % or dB in respect to time (s), other than displaying the temperature, voltage in the given GUI.

    If what you are trying to tell me is what i wanted, mind explain it in a simplier way???

    Cause i am really new to this device.

     

    Thanks a lot,

    Terence

  • the MCU part of this project is basically done for you.  the current eZ430-RF2500 sensor monitor demo already transmits the RSSI values back to the AP which are sent back the PC.  if you look at the data being transmitted to the PC in the text console view, you'll see the raw data.  the only thing left for you to do is to write a PC program to parse the data, and display it as necessary - the existing demo GUI won't help you.  Labview is probably the easiest way to create the new program.

  • can I use CoDeSys to create the new program? How do i parse the data into the program??

    I am super confuse and don't really know how to do. I am bad at programming too.

     

    Regards,

    Terence

  • I am not aware of any CoDeSys SP port to the MSP430 or CCxxxx devices using the 8051.
    The development environments used for these types of systems have generally been provided by IAR Systems, or TI's CCE Integrated Development Environments.

    The example projects that are provided are based on the IAR Systems IDE.  In order to change the behavior of the software running on the MSP430, or CCxxxx devices, modifying the source examples and recomplining in IAR is needed.

  • No, right now my professor told me that i could get the raw data from the demo version and then transfer that data to maybe MatLab.

    He told me to try to find a way to "play around" with Matlab. Right now my current step is to know how to get the raw data and then transfer to the Matlab program that I needed to write.

    Is this possible?

     

  • Just connect, using a terminal program like hyperteminal, to the AUX COM port that the EZ430-RF2500 creates and just log and save the output. You will then have a text file you can manipulate.

  • Hi radicalz,

     

    I am having the same problem as you ie To plot the RSSI values with respect to time. Did you get the solution for this problem??

    Can anyone suggest any method in which I can Interface the RSSI values with respect to time in MAtlab or any other software??

     

    @Falingtrea

     

    Can you please explain in more detail the procedure you mentioned above.

     

    Thank You

    Regards

    Kuntal Ray

  • Hi Kuntal,

    Ya, we had the same problem to solve, let's solve it together. Right now not yet, I been trying a way to find the solution.

    My professor said to try Matlab, will get the installer by tomorrow. By the way do you have a deadline for this?

    Cause mine is about 6 weeks and i need to solve it as soon as possible.

     

    Right now the steps that I received is like what Fallingtrea said, cause the demo version we had right now, had the raw data.

    We need to connect using "hyperterminal" and then get the text file in which you runs in the program that you create using Matlab or some other user interface.

     

    Regards,

    Terence

  • Hyperterminal has the ability to capture text to a file under the Transfer/Capure text to file menu. What you need to do is to connect to the EZ430-RF2500 with hyperterminal set to 9600 baud. Then start the text capture and capture the output from the EZ430. Then you need to filter out the RSSI data from the captured text and put it into a program, like MatLab, where you can manipulate the data.

  • Hi Falingtrea,

    ur idea has worked , so now I can capture easily the RSSI values and save it in text file. Thanks a lot.

     

    Now i was wondering , whether the storing of RSSI in a text file can be done through the IAR embedded workbench's C program which is written for the Demo kit?

     

    Thank you

    Regards

    Kutnal Ray

  • kuntalroy86 said:

    Now i was wondering , whether the storing of RSSI in a text file can be done through the IAR embedded workbench's C program which is written for the Demo kit?

    This is possible, by using the printf() functionality.  This will interact with the IAR Embedded Workbench IDE via the Terminal I/O window.
    You will need to include the stdio.h header file.

    However, it is much slower and you will not be maintaining realtime functionality.  In my opinion, the already established COM port mechanism is a good path to use.  You don't need any additional connections when using the eZ430-RF2500 platform, as it has a virtual COM port enabled over the USB interface.  You can IAR running along with HyperTerminal on the same PC.

  • Hi adrain,

    in response to

    the MCU part of this project is basically done for you.  the current eZ430-RF2500 sensor monitor demo already transmits the RSSI values back to the AP which are sent back the PC.  if you look at the data being transmitted to the PC in the text console view, you'll see the raw data.  the only thing left for you to do is to write a PC program to parse the data, and display it as necessary - the existing demo GUI won't help you.  Labview is probably the easiest way to create the new program.

     

     

    Can you please expain in detail how Labview can be helpful for the problem discussed ...

     

    Thank You

    Regards

    Kuntal Ray

     

     

     

     

  • Labview or Matlab/Simulink have the ability to import data from a COM port, and can easily display your data in just about any way you want at run time. 

  • Hi Adrain,

     

         Hey I am just not able to find COM port in Labview. Can you please  help me out with Labview.

     

    Thanks

    Regards

    KuntalRay

  • you might want to start at www.ni.com for help with labview.

  • Hi adrian,

     

    how about using MatLab?? Where can i find help for it?

  • Hey Brandon,

    i hope you can help me. I got the ez430-RF25000 development kit with IAR kickstart. I'm using your RTC function as a time base, so that every time the access point sends a data packet (temp,voltage etc.) to the PC i can append the actual time to the datastring.It works fine so far....

    Now I tried to extend the code so that i can measure Milliseconds. I've perpend an incrementMilliseconds function + I'm using  timer B for the interrupt (with ACLK). The main difference is that TI_MIlliseconds must be  an int  because i need 2 bytes. It all kindaf works fine as long as only the AP is powered.
    Once I turn on an ED the whole thing dies......

    Do you have any idea how to solve the problem....The problem is that i need a millisecond timebase...

    Thanks in advance

    Chris

    The new RTC.s43 file:


                ;Variables
                MODULE    RTC
                PUBLIC    TI_millisecond
                PUBLIC    TI_second
                PUBLIC    TI_minute
                PUBLIC    TI_hour
                PUBLIC    TI_PM
                ;Functions
                PUBLIC    incrementMilliseconds
                PUBLIC    incrementSeconds
                PUBLIC    incrementMinutes
                PUBLIC    incrementHours
                PUBLIC    get24Hour

                RSEG      DATA16_I
    TI_millisecond        DS 2
    TI_second                DS 1
    TI_minute                 DS 1
    TI_hour                      DS 1
    TI_PM                         DS 1


                RSEG      DATA16_ID
                DC8       0x00
                DC8       0x00
                DC8       0x00
                DC8       0x12
                DC8       0x00

                RSEG    CODE                    ; Code is relocatable
    ;============================================================================
    ; incrementMilliseconds
    ;============================================================================
    incrementMilliseconds
                clrc
                add    #0x01,            &TI_millisecond      ; tick one second
                cmp     #0x3E8,        &TI_millisecond     ; see if we've hit 1000 milliseconds
                jne    return                                                ; if not, return
                clr  &TI_millisecond                             ; if so, go back to 00
                                                      ; fall down to increment seconds
    ;============================================================================
    ; incrementSeconds
    ;============================================================================
    incrementSeconds
                clrc
                dadd.b  #0x01,   &TI_second     ; tick one second
                cmp.b   #0x60,   &TI_second     ; see if we've hit 60 seconds
                jne     return                  ; if not, return
                clr.b   &TI_second              ; if so, go back to 00
                                                ; fall down to increment minutes
    ;============================================================================
    ; incrementMinutes
    ;============================================================================
    incrementMinutes
                clrc
                dadd.b  #0x01,   &TI_minute     ; tick one minute
                cmp.b   #0x60,   &TI_minute     ; see if we've hit 60 minutes
                jne     return                  ; if not, return
                clr.b   &TI_minute              ; if so, go back to 00
                                                ; fall down to increment hours
    ;============================================================================
    ; incrementHours
    ;============================================================================
    incrementHours
                clrc
                dadd.b  #0x01,   &TI_hour
                cmp.b   #0x12,   &TI_hour       ; test for 12:00 o'clock
                jne     notSwitchPM             ; if not, don't switch the PM variable
                tst.b   &TI_PM                  ; see if it is PM and we should roll
                jnz     rollAM                  ; PM and roll bit set, change to AM and roll day
                xor.b   #0x01,   &TI_PM         ; change PM value
    notSwitchPM
                cmp.b   #0x13,   &TI_hour       ; see if we've hit 13
                jne     return                  ; if not, return
                mov.b   #0x01,   &TI_hour       ; if so, 13 o'clock == 1 o'clock
    return      ret                             ; return
    rollAM
                clr.b   &TI_PM                  ; clear PM, now it is AM
                ret                             ; return

    ;============================================================================
    ; Returns hour in 24 hour format
    ;============================================================================
    get24Hour
                tst.b  &TI_PM
                jnz    afternoon
                cmp.b  #0x12,    &TI_hour
                jeq    zero_hour
                mov.b  &TI_hour, r12
                ret
    zero_hour   clr    r12
                ret
    afternoon   mov.b  &TI_hour, r12
                cmp    #0x12,    r12
                jeq    return
                clrc
                dadd.b #0x12,    r12
                ret
                END

  • When you say the RTC code running in the AP "dies", do you mean that the TI_millisecond stops counting and all subsequent messages from the AP to the PC have the same TI_millisecond value?

    This would seem to indicate that the incrementMilliseconds is not getting called once the ED is powered on.  I assume the incrementMilliseconds is called from an ISR that is triggered on the Timer B interrupt?

  • Hi  Brandon,

    thanks for the quick answer."Dies" means everything stops. The AP stops sending messages to the COM port. It's doing nothing, all LEDs arre off.

    And yes the incrementMilliseconds is called from an interrupt on Timer B fed by the VLO, so it is called 1000times every seconds. This is working as long as only the AP is present in the network

    Chris

  • CP,

    I know this is an old thread and I apologize for the delay in responding.  Have you made any progress in the integration of the RTC code into the eZ430-RF2500 application?

  • Hi Brandon,

    I'm not working on this project at  the moment. The Millisecond timebase is not mandatory.

    last thing i did was porting the project to CCE.

    Then i didn't know how to do a second interrupt routine with timer B for the incrementMilliseconds function. As timer A is used for the __delay_cycles() function

    and timer B for the temperature measurement already

     

     

     

     

    #pragma

     

    vector=TIMERB0_VECTOR

    __interrupt

    void Timer_B (void)

    {

    sSelfMeasureSem = 1;

    }

    it would be cool if you have a solution, but at the moment to have the temperature data with the time in seconds is enough for the little thing we are doing.

    Greets

    Chris

     

     

     

  • Does anyboy know what are the neccasry commands for retrieving RSSI from CC430 in labview, apprently setting up regular serial port and just redding is causing a time out. According to NI I have setup the Serial communication perfectly,:my only concen is that there might be some commands which need to be written prior to reading. If anybody could point me in the right direction it would be greatly appericiated.

    Thank you

     

  • Hello adrian,

    I am trying to use Sensor demo to collect RSSI values from sensor nodes and pass them to the gateway node for processing. I am using CC2530 ZDK and  I managed to run the sensor demo successfully, but I got some rubbish data when viewing the received messages in Hyper Terminal. 

    The plan is to develop a simple application that can capture rssi values from sensor nodes and then estimate their location based on the received rssi values.

    Any advice?

    Thanks

    sam

**Attention** This is a public forum