@Tisham-Dhar I've gone ahead and implemented a working half-duplex transmission function! Version 4.0.1 of python-spidev features a new xfer3 function.Getting the Latest Version of python-spidev
If you don't have it installed already:opkg update opkg install python-light python-spidev
If you have it installed, you'll need to upgrade:opkg update opkg upgrade python-spidev To use the new function: values = spi.xfer3([<list of bytes to write>], <number of bytes to read>)
This will write all of the bytes from the list in the first argument and will then immediately read the number of bytes specified by the second argument.
The function will return a list of the bytes that were read.An Example
Instead of using spi.xfer([0x80,0xD9,0x00,0x00])
Try values = spi.xfer3([0x80,0xD9], 2)More Details
More details can be found in our python-spidev github repo readme
Let me know how it goes!