Hello everybody,
I used SDK14.2.0 , S132 .
I keep the data from nus_data in the uint8_t array. Then I am trying to write the array with use fds_write.
My fds_write function;
I use my fds_write function by this way;
Then I am trying to read and store the data into another array.
My fds_read function;
I use my fds_read function by this way;
I can write and read something but these are not meaningful data. Or I can not read the data I wrote because of anything. I obviously could not figure out exactly where the problem was.
The steps I want to take are as follows;
- Store particular nus_data into an array (uint8_t source_data_0[10] ) -> I'm already doing this. No problem.
- Write the stored array(uint8_t source_data_0[10] ) via FDS -> I do that already, but I do not know exactly whether it is successful.
- Read the stored array(uint8_t source_data_0[10] )via FDS and Store the read array(source_data_0[10] ) in another array (uint8_t dest_data_0[10] = {0}).
Test Result;
I sent the nus data( "aaaaaaaaaa" ) and I can store it into source_data_0[] successfully. Then I use my fds_write function;
0> <info> app: save_data
0> <info> app: Writing Record ID = 1
0>
0> <info> app: 61 61 61 61 61 61 61 61|aaaaaaaa
0> <info> app: 61 61 |aa
Finally I tried to read and result is;
0> <info> app: first_Setup Start
0> <info> app: Start searching...
0>
0> <info> app: Found Record ID = 1
0>
0> <info> app: Data =
0> <info> app: 00 04 00 20 |...
0> <info> app:
0>
0> <info> app: dest_data_0 :
0> <info> app: 00 04 00 20 E9 08 00 00|... é...
0> <info> app: 7D 05 |}.
As a result; The data I read is not the same as the data I write . May be I read it in the wrong format, I do not know exactly.
So, Do you have any suggestion ?