05-02-2014 06:16 AM
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
05-05-2014 11:52 AM
Moses,
The code would be helpful. That will help me see the bigger picture. Thanks.
05-08-2014 02:38 AM
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.
05-08-2014 04:11 PM
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.
05-10-2014 04:28 AM
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
05-12-2014 04:09 AM
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.
05-12-2014 11:50 AM
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.
05-19-2014 04:30 AM
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.
05-20-2014 08:27 AM
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
06-03-2014 03:05 AM - edited 06-03-2014 03:22 AM
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