Thanks,
Robert
For your BBBlack, I don't easily see in the tutorial code how the CS line is being controlled.
You likely need to manually control the slave select lines using GPIO. For example: select one slave by driving its CS line low, send/receive serial data, then deselect the slave by driving its CS line high.
Only one slave CS line may be driven low at a time when reading data from individual slaves.
Since I used the BBBlue (which is basically a BBBlack with the Robotics Cape integrated into it), I modified the Robotics Cape API functions, rather than directly using ioctl and spidev. I've attached my modified SPI functions here.
I've tested the functions rc_spi_init_mod, rc_manual_select_mod, and rc_manual_deselect_mod with a 3-to-8 line decoder and a Bus Pirate for sniffing the SPI bus.
You probably won't need a line decoder for only 4 SPI slaves, so you can just directly drive the CS lines using GPIO.
It'll be another couple of weeks before I receive my prototype slave devices, so I haven't had the chance to fully test my functions just yet.
I would dig around in the Robotics Cape library code. The SPI functions in the library are more readable and better documented than the tutorial code, to be honest.
The simplest solution I can think of would be to try installing the Robotics Cape API on your BBBlack and see if you can use their API functions without the Robotics Cape hardware.
Hopefully this helps.
Regards,
Robert