STM32 SPI not working as I expect it should based on online reading
The slave device can only communicate when it is provided a clock from the master (your STM32). This complicates reading from the slave, because you have to cause the master to provide enough clock cycles for the slave to respond.

When you send an SPI command via SPI_I2S_SendData(), two transmission actually happen during the same eight clock pulses. The first is that your byte is clocked out of the MOSI line. But, at the same time, data is being clocked in to the microcontroller via the MISO line.

But since the slave doesn't get the full command until the end of these transactions, it doesn't present any data to the bus. This results in a received value of 0x00 or 0xFF.

Then you need to provide an additional eight clocks to allow the slave to return the actual value. With the STM32, this is done by sending a "dummy byte" to the slave.

Note that, in the first transmission, the master ignores whatever arrives from the slave. In the second transmission, the slave ignores whatever is sent by the master.

The code should look something like this:

// Activate the SS pin
GPIO_ResetBits(...);

// Send the command
SPI_I2S_SendData(SPI_BUS, txbyte);

// When the byte completes sending, the RXNE flag will get set
// and must be cleared by reading the Data Register.
// Notice that the value in the data register is ignored.
while (SPI_I2S_GetFlagStatus(SPI_BUS, SPI_I2S_FLAG_RXNE) == RESET);
SPI_I2S_ReceiveData(SPI_BUS); // Notice there is no variable assignment here!

// Now get the response. Load the data register (DR) with a dummy
// byte to start data reception.
SPI_I2S_SendData(SPI_BUS, 0);

// When the dummy byte completes sending, the RX buffer will contain the
// response byte. Get it.
while (SPI_I2S_GetFlagStatus(SPI_BUS, SPI_I2S_FLAG_RXNE) == RESET);
rxbyte = SPI_I2S_ReceiveData(SPI_BUS);
}

// Release the SS line
GPIO_SetBits(...);