I have an an embedded Linux ARM board, where an application opens the
/dev/spidev1.0 device and constantly talks through with another MCU.
Now, if I I try to look at what exchanges (that's what I'd need), doing
/dev/spidev1.0 shows something in the beginning but causes the application to crash. The app is very sensitive and I think it crashes because the app uses and it can't be used for viewing simultaneously.
Would there be a way to create an alias, or something like a mirror of this device if I write some extra code/driver? Or is there no chance for me to sniff the traffic like that (in software) ?
int ioctl(int fd, unsigned long request, struct spi_ioc_transfer *xfer)
gcc output the following error:
myioctl.c:6:5: error: conflicting types for ‘ioctl’ In file included from myioctl.c:1:0: /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/include/sys/ioctl.h:41:12: note: previous declaration of ‘ioctl’ was here
Any help how the original definition:
/* Perform the I/O control operation specified by REQUEST on FD. One argument may follow; its presence and type depend on REQUEST. Return value depends on REQUEST. Usually -1 indicates error. */ extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
could be overridden.