Bug in the spi-tool?
I think there's a bug in the
spi-tool. I followed the instructions to set up SPI connection to my logic analyzer, and then went ahead to write some test data:
root@Omega:~# spi-tool -b 32766 -d 1 write 0x12 0x42 > SPI Write to addr 0x12: 0x42 ERROR: could not open sysfs device '/dev/spidev1.32766'
Since the device name under
/dev/spidev32766.1, it appears that the
spi-toolswaps the parameter values for bus and device. And, sure enough, if I do
root@Omega:~# spi-tool -b 1 -d 32766 write 0x12 0x42 > SPI Write to addr 0x12: 0x42
..then the data get sent out properly.
spi-toolis out-dated and deprecated at this point. We'll move it out of the package repo.
I strongly recommend using
Ok, well, I just followed the advice from the official Omega2 documentation. There is no mention of
I understand you suggest to use python module instead of command-line tool, does that mean that there is no command-line tool for SPI writing and reading?
@Pavils-Jurjans Well you can continue to use spi-tool, just remember to switch the bus and device number :)