LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

rfsa error

Hi Robert,

my goal here is to capture GSM signals and see the nature of data that is transmitted through the air interface(from MS to BTS).as they say part is in ASCII like IMSI but the voice data is in (1's & 0's),i want to see this.

what i have shown as my data is actually what i have been capturing and saving with a function SaveToFile() that uses fwrite().

if the file cannot be read on a text editor what code can you advise me to use so that i can view the data.

Incase you still need to see my code i will attach it in my next posting.

 

Thank,

Moses

0 Kudos
Message 21 of 56
(2,582 Views)

Moses,

 

The code would be helpful. That will help me see the bigger picture. Thanks.

Robert B
RF Product Support Engineer
National Instruments
0 Kudos
Message 22 of 56
(2,573 Views)

Hi Robert,

Find attached is my code that gives me the binary result i posted earlier.i will appreciate if it could save result that are human readable.

 

Thanks,

Moses.

0 Kudos
Message 23 of 56
(2,566 Views)

Moses,

 

You mentioned that you began with an example. Did that seem to work as you expected to begin with? Which example exactly did you begin with? Was it niGSMMeasureModAcc? My guess is that you may need to figure out what the format is for the binary data and convert it.

Robert B
RF Product Support Engineer
National Instruments
0 Kudos
Message 24 of 56
(2,552 Views)

Hi Robert,

niGSMMeasureModAcc is the example and it dispayed the plottings well. This part on the conversion of binary is where am stuck and am asking on the direction to take to decode . code snippets are welcomed.

 

Thanks,

Moses

0 Kudos
Message 25 of 56
(2,541 Views)

Hi Robert,

I think the binary is auto generated by the equipment and i dont know if the processor of 5663E has the capability to uncompress signals?Am assuming the signals could be compressed.

0 Kudos
Message 26 of 56
(2,554 Views)

Moses,

 

Using the niRFSA_FetchIQMultiRecordComplex64() function is going to return an array containing values that are 64-bit values. Simply writing these to a file without any separation will not work very well. I'm a little confused about what you would like to see in the file. Are you wanting to see the data as numerical values or the raw binary IQ data? Also, what program are you using to open the file that you create? Are you using notepad or something else? To see the raw binary IQ data, you may have better luck using the FetchComplexI16 function and converting the I16 to binary in C. If you want to see numerical data, you'll need to separate your values and then write them to an appropriate file format such as .csv or .xls. 

 

Overall, I think the issue we are having is a representation issue and not a problem with the RFSA functions since, as you mentioned, the data appears correctly when displayed in CVI.

0 Kudos
Message 27 of 56
(2,545 Views)

Hi Robert,

Thanks for the guidance, am now using FetchComplexI16 function. Can you assist me with a code snippet that converts I16 to binary in C. Yes i was using notepad++ to open my file, which is the best program to open such files?

 

Thanks,

Moses.

0 Kudos
Message 28 of 56
(2,534 Views)

Moses,

 

There are quite a few resources out there for performing this conversion. Here are a couple of resources I found that have some snippets. I'm not promising functionality, but they should get you pointed in the right direction.

 

http://www.c4learn.com/c-programs/decimal-to-binary-using-bitwise-and.html

http://www.faqs.org/qa/qa-430.html

0 Kudos
Message 29 of 56
(2,528 Views)

Hi Robert,

I am still stuck in this process of representation and i havent found a way out to see the real data in my signal. I applied the following code and got the result below. How can i convert this data to alphabetical to see if the data captured is authentic?

 

#include<stdio.h>
int main()
{
FILE *fp,*out;
char *buffer;
size_t i = 0;
fp=fopen("c:/GSM/GSM.txt", "rb");
if(out != NULL)
{
fread(buffer, sizeof buffer,1, fp);
}
out = fopen("c:/GSM/res.txt", "w");
if(out != NULL)
{
// buffer = (char*) malloc (sizeof(char)*Size);

for( i = 0; i < sizeof(buffer); i += 2)
{
const unsigned int var = buffer[i] + 256 * buffer[i + 1];
fprintf(out, "%u\n", var);
}
fclose(out);
}
fclose(fp);

}

 

The results below is what am getting but i need it translated to a mixture with alphabetical characters.

263
4294966987
4294967222
4294967032
64
4294967013
73
4294967004
90
4294967028
83
4294966975
37
4294966961
5
4294966976
82
4294966942
4294967022
4294966994
11
4294967024
29
4294966985
4294966986
4294966954

 

Thanks,

Moses

0 Kudos
Message 30 of 56
(2,509 Views)