Open smolbun opened 1 year ago
Apparently the first byte is the number of bytes of the packet, earlier the output from URH wasn't reliable.. I had to switch to a better SDR to get a more consistent reading.
I got it to work by commenting out SpiWriteReg(CC1101_TXFIFO,size);
, is there a way to do it without modifying the library?
void ELECHOUSE_CC1101::SendData(byte *txBuffer,byte size)
{
//SpiWriteReg(CC1101_TXFIFO,size);
SpiWriteBurstReg(CC1101_TXFIFO,txBuffer,size); //write data to send
SpiStrobe(CC1101_SIDLE);
SpiStrobe(CC1101_STX); //start send
while (!digitalRead(GDO0)); // Wait for GDO0 to be set -> sync transmitted
while (digitalRead(GDO0)); // Wait for GDO0 to be cleared -> end of packet
SpiStrobe(CC1101_SFTX); //flush TXfifo
trxstate=1;
}
Expected data to be transmitted: "88ee88ee8888888e8888888e8" Output from Universal Radio Hacker
Code: