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.

MSP-SA430-SUB1GHZ: Demo software

Part Number: MSP-SA430-SUB1GHZ

Dear reader,
Is  any one familiar with 

MSP-SA430-SUB1GHZ spectrum analyzer?

It does come with a Graphical User Interface, software source and other documentation.
The software, which come with the software, is a graphical user interface which allow the user to see the spectrum on the screen PC or laptop.
I would like to develop a small application (using C# or C++)  which uses the analyser API to acquire data from the USB handle and store them to a  txt file for later processing.
It does come with the source code but it is not straight forward or clear and it is difficult form me to use it.
Is there any simple demo project showing how  to use the analyser   APIs (Application Programming Interface) or a documented dll file?
Your help will be really appreciated.
All the best
  • The documentation etc we have for this is on the web page. You have to read through the code + documentation and see if you find what you are looking for.
  • I have being through the code and it will take a bit of time before I know if it will give me what I need for my application or no.
    I was just thinking of a clear documentation such a the one below:
    www.triarchytech.com/DownloadsAPI.html

    The item above is not supplied in the UK and it will take a long time before I can get hold of one. In the other hand, the Ti spectrum analyser will be supplied by one of our registered supplier which mean next day delivery.
  • rab boud,

    Hold on for a day, we have been working on a new solution for implementing a spectrum analyzer. This new solution is going to release in Q1-2018 and will be based on the standard CC1310 and CC1350 LaunchPAD's. This will also give you a development system in addition to just a spectrum analyzer demo.

    Regards,
    /TA

  • HI,

    Thanks for the reply.

    It seems the Launch PAD is suitable for 868MHz.  I want to record any signal between 860Mhz and 900Mhz and this is to see if there is any interference round 865.6Hmz and 867.6Mhz which are RFID tags frequencies used in Europe. So that data also is geo-location so after analyzing the data we can say that the RFID will not work because there are these signals which will interfere with the RFID own frequencies.

  • I assume that you don't have access to a spectrum analyzer to do this.

    For what you want to do you don't need a gui. I assume that you can get a lot of information by sweeping the frequency in, as a example, 50 kHz steps and measure RSSI for each frequency. This code should be fairly easy to write based on the rfPacketRX example in the SDK.
  • I couldn't try the source code as the open source is based on the QT-based Graphical which cost round $235 per month and the MSP-SA430-SUB1GHZ itself cost £235.
    I don't want to use the graphical interface but just want to know how to create/open the USB handle, setup analyzer parameters, how to receive and how to close the USB handle.
  • Ah yes, you are right. The final system has to be small and compact to be enclosed in small box.
    I looked at the Launch PAD page (www.ti.com/.../launchxl-cc1350 LaunchPAD&tisearch=Search-EN-Everything#3).
    If the RF receiver included or has to be added separately? Also can you sweep for example between 860Mhz and 900Mhz in step of 200Khz?
  • Although we don't have a simpler host application example for interfacing with the SA430, I can share some notes on the data format between the host and SA430 that may help you in this effort.

    Here is the basic command format between the host and SA430:

    A valid UART host command is a variable byte-length message with the following format:

    Valid SA430 Host Command Format

    * (byte 0)       : 0x2A Valid command prefix

    * (byte 1)       : N Payload length in bytes

    * (byte 2)       : 0xXX Command number

    * (byte 3 - N+2) : Payload

    * (byte N + 3)   : CRC High byte

    * (byte N + 4)   : CRC Low byte

    When a valid host command is received by the SA430 the UART task responds with a mandatory acknowledgment message of the same format with a 0 length payload. The resulting 5 byte message has the following format:

    Valid SA430 Host Command Acknowledgment Format

    * (byte 0)       : 0x2A Valid command prefix

    * (byte 1)       : 0 Payload length

    * (byte 2)       : Command number (echo of command being acknowledged)

    * (byte 3)       : CRC High byte

    * (byte 4)       : CRC Low byte

    In addition to the five byte ACK message, the SA430 must send subsequent response message(s) to some host commands that require additional information. For example, when the host application needs to update its spectrum display, it sends a command to SA430 requesting new measurement results, and the SA430 must respond with one or more messages containing the updated measurement values. The response from the SA430 uses the same host command format, with the command number set to the same value as the command it responds to.  

    Here are specific examples of two commands:

    * Commands cheat sheet

    * -------------------------------------------------------------------------

    * - General Commands

    *  + #CMD_CONNECT       =  1, Request connection with the SA430. No

    *                             additional response required after ACK.

    *                             Bytes from host: [0x2A, 0x0, 0x1, 0x95, 0x09]

    *  + #CMD_DISCONNECT    =  2, Disconnect from the SA430. No additional

    *                             response required after ACK.

    *                             Bytes from host: [0x2A, 0x00, 0x02, 0xA5, 0x6A]

    Also, In the past we have experimented with a Windows PC program called "DockLight" to mimic the host application in sending and receiving commands from SA430. I am attaching a screen capture from this showing all the commands from host connection, through RF samples being read out of SA430. This may also be helpful to you in this effort.

    Regards

  • Hi ,

    Thanks for the useful information. 

    The information, you provided,  seems what I am looking for.

    Some other modules I worked with you need to send a special string such $$$ or *** to put the device in a command mode. Does this device require such a things.

    How to calculate the CRC High byte and CRC low byte?

    Do you have the list of all commands and the responses and their description?

    Do you have to connect/disconnect to the device using a Command? I though the connection/disconnection procedure is established by the serial port through for example Hercules in my case.

    I will be using Hercules as hyper-terminal. 

    I think we are going into the right direction:)

  • Hi rab,

    Connect/Disconnect

    You can think of the SA430 always in command mode waiting for the 'connect' procedure outlined in the above UART capture. This will allow the host, Hercules in your case, to connect to the SA430 and begin capturing data and configuring spectrum values such as start frequency and stop frequency.

    Without first doing the 'connect' sequence, the SA430 will not respond with RF values even if a command is sent to request RF values be provided to the host.

    Command List

    I would recommend finding a UART monitoring program similar to the one rperezti mentioned above in order to 'sniff' the connection between the SA430 and the SA430 GUI to generate a command list table. The full list of commands, and more importantly how to interpret their payloads, is not available in the format provided above.

    CRC

    You can use the following two functions for calculating the CRC (HDR_PREFIX = 0x2AU).

    static uint16_t calcCrc16(void *data, uint8_t dataLength)
    {
    	uint8_t crcIndex;
    	uint16_t crc = HDR_PREFIX;
    	uint8_t *bytes = data;
    
    	for (crcIndex = 1U; crcIndex < dataLength; crcIndex++)
    	{
    		crc16AddByte(&crc, bytes[crcIndex]);
    	}
    
    	return crc;
    }
    
    static void crc16AddByte(uint16_t *addb, uint8_t u8)
    {
    	*addb  = (*addb>>8U)|(*addb<<8U);
    	*addb ^=  u8;
    	*addb ^= (*addb & 0xff)>>4U;
    	*addb ^= (*addb<<8U)<<4U;
    	*addb ^= ((*addb & 0xff) << 4U)<<1U;
    }

    Best Regards

  • Hi Mark,
    Thank you for the reply.
    I tough MSP-SA430-SUB1GHZ is Texas Instrument product and therefore commands for the device are documented somewhere.
  • The typical use for the MSP-SA430-SUB1GHZ product is to utilize the GUI and device 'out of the box' as documented in the User's Guide for the product. Typically software is provided more as a reference than a self-contained product to help others such as yourself utilize the device in unforeseen ways!

    For the commands themselves, the best documentation I would say is the source code itself. The GUI software (slac505.zip) contains a few key files which should help to get a better idea for what the "host" (PC typically, Hercules device in your case) needs to do to communicate with the SA430.

    * SA430.Dll\V2.0\Src\sa430Cmd.h - outlines all the commands supported by the SA430; please note previous values for CMD_CONNECT and CMD_DISCONNECT were incorrect
    * SA430.Gui\V2.0\Src\drvSA430(.cpp & .h) - implement the majority of the command handling from the host application to the SA430
    * SA430.Dll\V2.0\Src\sa430(.cpp & .h) - interpret the requests from the host (drvSA430) and translate them to messages to the SA430

    Best Regards
  • Good morning Mark,

    Thank you for the reply.

    I got the files you mentioned in your reply. I tried piece back a ' demo project' by adding correspondent files but I was stopped in my track as the software use graphical API which cost round $230 per month for licence.

    I think the easy and quick way if someone can tell me the commands and their descriptions.

    "values for CMD_CONNECT and CMD_DISCONNECT were incorrect" : do you know the correct value?

     

  • I am sorry I pressed the "This is resolved my issue" by mistake and the issue still NOT RESOLVED.
  • Does anyone know what is the sweeping time for example if I want to set :
    Start frequency: 800MHz.
    Stop frequency :900MHz.
    Frequency step: 50KHz.
    or what is the Min/Max sweeping time?
  • rab, 

    We do not have more information than what we have already shared. This device was designed as a demo and not a "product" from TI and the employee that designed it is no longer with us.

    Regards,
    /TA

  • It takes about 1ms to change channel and get enough energy thru LNA's to provide an RSSI, so with programming overhead figure 2ms per 50kHz step.

    Regards,
    /TA
  • Hi rab,

    Commands
    All command values are outlined in the sa430Cmd.h file as mentioned in my post. enum SA30Cmd contains the commands and their associated values.

    To clarify my comment regarding CMD_CONNECT and CMD_DISCONNECT, these are not actual commands (as you can see in enum SA30Cmd) and should be disregarded.

    Even if you choose not to rebuild/develop with the original GUI software and the library/API it is based upon, and I encourage you to read their FAQ for options, you can still recreate the overall folder structure and code navigation with a multitude of free text editor programs, such as Notepad++. These programs will allow you to navigate the original GUI source code and see what is being sent/received by the GUI.

    Example - GUI Connects to SA430

    • drvSA430.cpp maintains the state between the SA430 hardware and the GUI, with drvSA430::run() being the state driver.
    • drvSA430::stateSetup() initiates the first connection/communication with the SA430 hardware, using a series of commands starting with :
      • drvSA430::cmdGetCoreVersion(), which calls:
        • drvSA430::cmdGetU16(), which calls:
          • sa430SendCmd (found in sa430.cpp).
          • then drvSA430::cmdWaitForConfirmation()
          • then drvSA430::cmdWaitForData()
          • stores the data received in U16 result, returns true
        • stores U16 result in &Status.activeDeviceInfo.CoreVersion, returns true
      • checks result is true from cmdGetCoreVersion() and continues to:
      • drvSA430::cmdGetHwID...
    • if connection/communication is successful, places the driver in STATE_RUN and returns true

    This is just an example of the process I recommend taking to figure out how to interface a host application (Hercules) with the SA430 hardware. I did the above by reading the files listed in my previous post and following the series of calls with Notepad++ and the TagsJump plugin.

    This will certainly be a fair bit of effort, but I can think of no other references or resources currently available which we have that could help expedite the process.


    Sweep Time
    Sweep time will be determined by the span and FSW settings, in this case 100MHz and 50kHz, with the number of samples taken equal to (span/FSW) + 1.

    I would recommend trying out your desired frequency ranges and FSWs and seeing the sweep time for each, as an empirical result will seem to be much more helpful than a theoretical one in this case (writing a host application) due to the delays introduced from sending data over UART etc. versus the theoretical best-case RSSI-to-RSSI reading time.

    I unfortunately do not currently have an SA430 on hand to perform this testing.

    Best Regards

  • Hi Ta

    Thanks for the reply and the useful information.

    I assume the figure 2ms per 50Khz is the same as 2ms for each frequency step. I.e 50Khz or 250Khz, it still 2ms per step or per frequency step.

  • Thanks again for all the helps from everyone. What I like about Texas Instruments is this kind of help and input from you guys. Again many thanks and I hope I will get to the bottom of this issue.
  • Yes, most of the delay is PLL overhead and settling time and it does not vary with RF settings.

    Regards,
    /TA
  • I bought the MPS spectrum analyser and I did have some play with it.
    Using a serial terminal, I notice, it does work at different Baud rate such as 4800, 9600...56000. Does it detect baud rate automatically?
    The only command which gave me a meaningful response was

    Command in hex: 2A00019509
    The response: *•*•*>Texas Instruments,MSP-SA430-SUB1GHZ: RF Dev Support Tool,HW2.0aä
    Any other command from the list above, gave a meaningless reply such as *Ŭ, .
    I am sorry that I couldn't find a way to attach a screenshot.
    What is the serial port setup, ie baud rate, parity and so on ?
  • Hi guys,
    I think, I am getting there!
    I used a serial port analyser ( where I can see IN/OUT data)  to listen to the communication between the SA430 Spectrum Analyser GUI and the SA430 hardware.
    For example, I pressed the "Connect" button on the GUI and captured the different command sent by the application to the hardware and the response of the hardware to the application. I manage to identify most the command such " Get Core Version", " Get Hardware ID", " Set Start Frequency", " Set Stop Frequency"... ( which have been mentioned in previous post) but the parameters set or read doesn't look like anything in the application. For example all the info displayed by the GUI such "Core Version" don't look anything close to the one read when I sent the get command. I set the start, stop frequencies in the GUI and then I pressed the "Sweep/Measure" but and I noticed that the commands send completely different hex values. 
    My question, how the parameter are coded in hexadecimal in the command? For example, if I want to set the start frequency to 868Mhz, I know which command to use but I don't know how to convert the 868Mhz to hex value that the hardware will understand. Also the other way around, when the hardware send for example, the dBm values, how do I interpret this hexadecimal values sent by the SA430.
    Please can rperezti or someone advice me on this matter.

    Exmaple

    SA430 GUI parameters Get/Set commands parameters values Comment
    Core Version 2.1 2A 00 05 D5 8D 2A 02 05 02 0A 80 B7 how can 0x80B7 correspond to 2.1?
    Start frequency: 868Mhz 2A 03 15 21 62 93 79 B1 how 0x9379B1 represents 868Mhz?
  • Hi rab,

    Back to the source code we go!

    Nearly all of the commands sent/received are (pre-)processed by drvSA430.cpp. Likewise, nearly all command data is processed for display to the user in mainwindow.cpp.

    Core Version

    For example, the CoreVersion is retrieved by drvSA430::cmdGetCoreVersion in drvSA430.cpp, but no processing appears to happen there (just reading out a U16 value) so we check mainwindow.cpp for how it gets displayed.

    Searching for CoreVersion puts us inside MainWindow::guiDisplayHwDevInfo where CoreVersion gets put into the strHwDevInfoList with a QString() call with two arguments separated by a '.' - (CoreVersion >> 8) and (CoreVersion &0xff). Checking your payload example, I see CoreVersion is 0x020A which will end up as 2.10 when converted!

    Start/Stop Frequency

    Similar analysis can be performed for Start/End frequency commands with drvSA430::cmdSetFrq as a starting point. FrqData holds all of the values which actually get sent to the SA430 hardware so make sure to check out the various _calcFrq* helpers.

    Best Regards,

    Mark-

  • Hi guys,
    I am like a boomrang. I am back on this topic again
    I tried very hard to figure out how the 8-bit data received from the specture when sending the following command 2A 00 1F 66 F6 is converted to signal power dBm. I tried to follow the code thus a function call another function then this function call another function(s) and so on until i forgot what I was looking for. So I gave up and also because it seem the GUI application also use callibration data to set the hadware and this calibration data is no where to be seen in the source code folders.
    So I am trying to open the project in Qt creator. Does anyone know which version and is it for visual studio or MinGW?
    My idea is if I can open it then I can use the debugger to follow the excecution of the program.
    Many thanks in advance.
  • Hi Rab,

    According to the LICENSE.txt file within the SA430 installation folder, the SA430 was developed with Qt 4.7.4.

    Qt also offers quite a few resources for migrating between versions which a quick search should reveal.

    Best Regards,

    Mark-

  • Hi Mark,

    Thank you for the quick reply.

    There is a Qt version for Visual Studio and another one for Mingw.

    Do you know which one has been used?

  • Hi rab,

    No official documentation that I can find, but a path reference to mingw530_32 - so it looks like Mingw to me.

    Best Regards,

    Mark-
  • HI Mark,

    Thank you for the info.

    I can open the project in QtCreator 2.5.0. However when I compile it,  there were  errors. I think, because it is so old (2011), it uses header (*.h) files that are not supported such

    #include "QtGui/qprinter.h"

    #include "QtGui/qprintengine.h"
    #include "QtGui/qpaintengine.h"
    #include "QtCore/qt_windows.h"
    #include "private/qpaintengine_alpha_p.h"

    which, I believe that, are not supported or not built in QtCreator 2.5.0. I started searching for the files then copy and past but it seemed it was an endless task so I stopped.
    I was thinking if I use the same QtCreator version that was use to create the project then these error may disappear.
    Do you have an idea which version was used?
    Many thanks


  • Hi TA12012,

    I tried to find this "new solution for implementing a spectrum analyzer", but without succes. Is it released or not?
    Thanks for message.

    Regards,
    Mira