I’ve been attempting to communicate with a CAN sensor on a Cubeorange flight controller, but I can’t seem to get it to work with v1.12.3. I can, however, configure SocketCAN on v1.13.2 and successfully communicate with the sensor.
On v1.13.2, I add the SocketCAN driver for my MCU (Backport STM32H7 FDCAN by JacobCrabill · Pull Request #185 · PX4/NuttX · GitHub) and enable all the CAN related config with the
make cubepilot_cubeorange menuconfig menu. I also create a custom driver that I manually run in the NuttX shell to initialize the “can0” interface that calls
stm32_fdcansockinitialize(0) in its main. Also in the NuttX shell, I manually bring up the “can0” interface with
ifup can0 and double-check that it’s up with
ifconfig. This setup works with this version and I’m able to read from my CAN sensor (using a custom module and even with candump).
Now I’ve got another system that requires v1.12.3 and uses the same sensor and flight controller. When I repeat the process above, I’m unable to communicate with the CAN sensor. From what I can see, it seems that everything hangs on a
poll() function waiting for a file descriptor to become ready.
Anyone have success in getting SocketCAN working with v1.12.3? There are obviously other changes that have been added between v1.12.3 and v1.13.2, so maybe I need additional files to get it working? Thanks in advance!