Hello,
I've been having a hard time receiving the "Done" string from the IWRBOOST whenever I configure the device using my own C program.
I'm sending the following char arrays one by one over serial UART Config at 115200 baud rate.
If I configure the device using the Visualizer first and then try sending below arrays using my own program, then I will receive the exact line that I sent but without the "Done." string. (Note that the receiving array is 100 bytes in length so I think it should be enough to receive the whole acknowledgement.)
If I don't configure the device using the Visualizer, and just try to configure it using the same C program, I will not receive anything from the serial. The serial read will just timeout.
Am I sending the correct sequence with the \n at the end of the line? I'm also adding 20ms delay per line.
char aTxLine1[] = "dfeDataOutputMode 1\n";
char aTxLine2[] = "channelCfg 15 3 0\n";
char aTxLine3[] = "adcCfg 2 1\n";
char aTxLine4[] = "adcbufCfg 0 1 1 1\n";
char aTxLine5[] = "profileCfg 0 77 30 7 62 0 0 60 1 128 2500 0 0 30\n";
char aTxLine6[] = "chirpCfg 0 0 0 0 0 0 0 1\n";
char aTxLine7[] = "chirpCfg 1 1 0 0 0 0 0 2\n";
char aTxLine8[] = "frameCfg 0 1 128 0 50 1 0\n";
char aTxLine9[] = "lowPower 0 0\n";
char aTxLine10[] = "guiMonitor 1 1 0 0\n";
char aTxLine11[] = "doaCfg 600 1875 30 1\n";
char aTxLine12[] = "SceneryParam - 2 2 0.05 6\n";
char aTxLine13[] = "GatingParam 4 3 2 0\n";
char aTxLine14[] = "StateParam 10 5 10 100 5\n";
char aTxLine15[] = "AllocationParam 250 0.01 5 1 2\n";
char aTxLine16[] = "VariationParam 0.289 0.289 1.0\n";
char aTxLine17[] = "trackingCfg 1 2 250 20 200 50 90\n";
char aTxLine18[] = "sensorStart\n";
The code is like this repeated for all the lines:
/* Send the line */
if (false == libserialcomms_WriteData(handle, aTxLine1, sizeof(aTxLine1), numOfBytesWr))
{
fprintf(stdout, "Write Failed!\n");
return STATUS_ERROR;
}
Sleep(DELAY);
/* Receive ACK from the device */
if (false == libserialcomms_ReadData(handle, data, LINE_BUFF_LEN, numOfBytesRd, timeout))
{
fprintf(stdout, "Read failed\n");
return STATUS_ERROR;
}
If device is configured by Visualizer first,
OUTPUT:
dfeDataOutputMode 1
mmwDemo:/>
channelCfg 15 3 0
mmwDemo:/> >
adcCfg 2 1
mmwDemo:/> emo:/> >
(and so on)
If device is NOT configured by Visualizer, just my program
OUTPUT
nothing