'nsh: i2c: command not found' means that the i2c app was not built into the image and/or was not registered at build time. NSH is simply complaining that you are trying to run an app that does not exist.
Did you remember to include logic in your board/src file in order to initialize and register the i2c application? If you don't register it, then it will not exist. You can look at other board-level initialization to see how this is done. On 4/18/2024 9:30 AM, Gustavo Soares wrote:
Hi everyone! I've built an application that sends i2c set/get commands to NuttX using the system() function in a loop that breaks after a timer runs out. After some i2c requests, NuttX prompts the message 'nsh: i2c: command not found' and the only way to solve it is rebooting the ESP32. This is what I tried so far: 1. Enabling i2c reset command and sending it every time i2c get/set fails, but it won't work because it depends on i2c driver; 2. Enabling the reboot command, but of course it resets the board so the app stops; Some more details: * I2c debug tool shows no error (only that one message); * Killing the program and sending any i2c command from console works fine; * Depending on the scenario, the error raises after sending around 3000 i2c requests. Is there any other way how to reset the i2c driver without rebooting the board? Forcing a delay at every request significantly reduces the amount of i2c requests, but it does not solve the problem.