Hello. I try to log some uORB topict to SD card. When I insert card to slot, and turn on, microSD checks with OK. PARAMS, DATAMAN and LOG-directory are created well. Also, I create etc/logging/logger_topics.txt file. But logger dont create any ULOG file. I discovered code and saw, that hardware even cannot open file: (inside this) int ntopics = add_topics_from_file(PX4_STORAGEDIR "/etc/logging/logger_topics.txt");
And: fp = fopen(fname, "r"); returns with error. Platform simply cannot open file and get needed topics. ULOG file dont created too. But PARAM, DATAMAN and LOG dir was created with OK
Thanks. LOG file created correctly, but main issue still not resolved. Program cannot found file
Inside function int Logger::add_topics_from_file(const char *fname)
. fopen-function returns fail. ‘Cannot open file’
But this file exists. I also experimented with custom file in root directory. And… I also cannot open it. That is very strange
Yes. It seems that path is invalid. In User Guide i read that I need etc/logging/logger_topics.txt.
But with ls I see next nsh> ls /fs: microsd/ nsh> cd microsd nsh> ls /fs/microsd: DATAMAN PARAMS LOG/ ETC/ FTEST.TXT nsh> cd etc nsh> ls /fs/microsd/etc: LOGGING/ nsh> cd logging nsh> ls /fs/microsd/etc/logging: LOGGER~1.TXT
As I understood, driver get path default in fs/microsd - path. But in /fs/microsd/etc/logging: I suddenly see LOGGER~1.TXT (not logger_topics.txt, that I created on SD).
Is it right?
Thanks! I changed add_topics_from_file(PX4_STORAGEDIR "/etc/logging/logger_topics.txt");
to add_topics_from_file(PX4_STORAGEDIR "/etc/logging/logger~1.txt");
and now it works fine.
But it’s strange, as guide says to create logger_topics.txt. I cannot suggest why this file looks with another name (logger~1.txt instead logger_topics.txt)