I want to use fstorage to write data to a file. The File with three records: 0x1111="Tablet1", 0x2222="data: abcdef", 0x3333="26". How to implement it? Can anyone guide me?
I want to use fstorage to write data to a file. The File with three records: 0x1111="Tablet1", 0x2222="data: abcdef", 0x3333="26". How to implement it? Can anyone guide me?
I think you might want to use the 'fds' library for that. Have a look here: infocenter.nordicsemi.com/index.jsp
I print it by hexadecimal code, because it cannot print non-ASCII data. If I set the second data to 0x2222="data: abcdef". I got the message as follows. Writing Record ID = 1 set write_flag Writing Record ID = 2 set write_flag Writing Record ID = 3 set write_flag Start searching... Found Record ID = 1 Tablet1 Found Record ID = 2 Data = ?? Found Record ID = 3 Data = 0x0000001a
If I set the second data to 0x2222="data abcdef". I got the message as follows. Writing Record ID = 1 set write_flag Writing Record ID = 2 set write_flag Writing Record ID = 3 set write_flag Start searching... Found Record ID = 1 Tablet1 Found Record ID = 2 Data = data abcdef Found Record ID = 3 Data = 0x0000001a
The two strings are only different at a character of ':' .ble_pstorge_1.c
I print it by hexadecimal code, because it cannot print non-ASCII data. If I set the second data to 0x2222="data: abcdef". I got the message as follows. Writing Record ID = 1 set write_flag Writing Record ID = 2 set write_flag Writing Record ID = 3 set write_flag Start searching... Found Record ID = 1 Tablet1 Found Record ID = 2 Data = ?? Found Record ID = 3 Data = 0x0000001a
If I set the second data to 0x2222="data abcdef". I got the message as follows. Writing Record ID = 1 set write_flag Writing Record ID = 2 set write_flag Writing Record ID = 3 set write_flag Start searching... Found Record ID = 1 Tablet1 Found Record ID = 2 Data = data abcdef Found Record ID = 3 Data = 0x0000001a
The two strings are only different at a character of ':' .ble_pstorge_1.c