Need help making ccsniffer project work

Hello there, this is my first post, and although this is not really the right section, it's the only one where I'm allowed to post, so here goes:
I am trying to make this work: GitHub - studiofuga/ccSniffer: A sniffer for cc1101 chip.
But the source code is a .cpp file, and when I paste it into the sketch, I get a whole lot of errors, so I'm kind of stuck, since my knowledge of C++ and Arduino is rather minimal.
I'm wondering why somebody would share a project, while it's incomplete or incompatible.
Here's a snippet of the errors I get:

In file included from C:\snif\SRC\sniffer\main.cpp:5:0:
C:\snif\SRC\sniffer\RadioLib.h:75:4: warning: #warning "Low-end platform detected, stability issues are likely!" [-Wcpp]
#warning "Low-end platform detected, stability issues are likely!"
And the list goes on and on.
I have copied the contents of main.cpp into the sketch window, and as you can see, there is a reference to the main.cpp file, so my best guess is that I started out the wrong way, but what is the right way, I wonder.

Thanks in advance for your help, and also the best holiday wishes!
Oh, and here's the entire main.cpp:

#include <Arduino.h>
#include "cc1101.h"
#include "PacketQueue.h"
#include "SerialHandler.h"
#include "radiolib.h"

#if defined (BOARD_HUZZAH32)
CC1101Tranceiver radio(25, 39, 34);
#elif defined (BOARD_NANO)
CC1101Tranceiver radio(10, 3, 2);
#endif

using UnprocessedQueue = RawPacketsQueue<4,64>;
UnprocessedQueue unprocessedQueue;
using Queue = PacketsQueue<4,64>;
Queue queue;

SerialHandler serial;

void irqRead(void);
void irqSent(void);

volatile int numSent = 0;
volatile int numTimeout = 0;
volatile int numRecvIrq = 0;

void PrintHex8(const uint8_t *data, uint8_t length, char const *separator) // prints 8-bit data in hex with leading zeroes
{
    for (int i = 0; i < length; i++) {
        if (data[i] < 0x10) { Serial.print("0"); }
        Serial.print(data[i], HEX);

        if (separator != nullptr) {
            Serial.print(" ");
        }
    }
}

uint8_t nibble(char n) {
    if (n >= '0' && n <= '9')
        return n - '0';
    if (n >= 'A' && n <= 'F')
        return n - 'A' + 10;
    if (n >= 'a' && n <= 'f')
        return n - 'a' + 10;
    return 0;
}

size_t hexToBin(const char *hex, uint8_t *bin, size_t maxbinlen) {
    size_t len = 0;
    while (true) {
        if (*hex == '\0') {
            return len;
        }
        *bin = (nibble(*hex) << 4);
        ++hex;
        if (*hex == '\0') {
            return len;
        }
        *bin = *bin | (nibble(*hex));
        ++hex;
        ++len;
        ++bin;
        if (len == maxbinlen)
            return len;
    }
}

void setup()
{
    serial.init();

    Serial.println(F("+ccSniffer"));
    Serial.print(F("+CC1101 Initializing ... "));

    auto state = radio.initialize();
    if (state == 0) {
        Serial.println(F("success!"));
    } else {
        Serial.print(F("failed, code "));
        Serial.println(state);
        while (true) {}
    }

    auto v = radio.getChipVersion();
    Serial.print("+Chip version: ");
    Serial.println(v);

    radio.setFrequency(868.3);
    radio.setBitrate(38.383);
    radio.setDeviation(20.63);
    radio.setReceiverBW(101.56);
    radio.setOutputPower(10);

    radio.setModulation(CC1101Tranceiver::Modulation::GFSK);
    radio.setSyncType(CC1101Tranceiver::SyncType::Sync30_32);
    radio.setPreambleLength(CC1101Tranceiver::PreambleTypes::Bytes4);
    radio.setSyncWord(0x2d, 0xc5);
    radio.enableCRC();
    radio.enableWhitening();
    radio.SPIsetRegValue(CC1101_REG_FSCTRL1, 0x06, 4, 0);
    radio.SPIsetRegValue(CC1101_REG_FSCTRL0, 0x05, 7, 0);

    radio.setReceiveHandler(irqRead, CC1101Tranceiver::SignalDirection::Rising);
    radio.setTransmitHandler(irqSent, CC1101Tranceiver::SignalDirection::Rising);

    delay(500);
    radio.receive();

    Serial.println(F("+CC1101 Registers dump:"));
    for (int i = 0; i < 0x30; ++i) {
        if ((i%8) == 0)
            Serial.print("+");
        uint8_t value = radio.SPIreadRegister(i);
        PrintHex8(&value, 1, " ");
        if (i % 8 == 7) {
            Serial.println();
        }
    }

    Serial.println("+READY");
}

void irqSent(void)
{
    ++numSent;
}

void irqRead(void)
{
    ++numRecvIrq;
    size_t retries = 0;
    while(true) {
        if (++retries > 100) {
            // timeout
            ++numTimeout;
            radio.receive();
            return;
        }
        auto fifo = radio.SPIgetRegValue(CC1101_REG_RXBYTES, 6, 0);
        if (fifo > 0) break;
    };

    uint8_t str[128];
    auto status = radio.read(str, 128);

    if (status.len > 0 && status.errc != ReadErrCode::NoData) {
        unprocessedQueue.push(str, status.len);
    }

    radio.receive();
}

void handleUnprocessed()
{
    int y= 0;
    do {
        noInterrupts();
        if (unprocessedQueue.empty()) {
            interrupts();
/*
            if (y>0) {
                Serial.print(y);
                Serial.print(" ");
                Serial.println(queue.empty());
            }
*/
            return;
        }

        uint8_t raw[UnprocessedQueue::MAX_PACKET_SIZE];
        uint8_t len = unprocessedQueue.pop(raw, UnprocessedQueue::MAX_PACKET_SIZE);
        interrupts();

        Queue::PacketType packet;

        packet.setRssi(raw[len-2]);
        packet.setLqi(raw[len-1] & 0x7f);
        packet.setStatus((raw[len-1] & 0x80) ? PacketOK : CRCError);
        packet.rawCopyFrom(raw+1, len-3);

        queue.push(packet);
        ++y;
    } while (true);
}

void handleReceived()
{
    if (!queue.empty()) {
        Queue::PacketType packet;
        if (queue.pop(packet)) {

            Serial.print(F("*"));
            Serial.print(millis());
            Serial.print(F(","));
            Serial.print(packet.getRssi());
            Serial.print(F(","));
            Serial.print(packet.getLqi());
            Serial.print(F(","));
            PrintHex8(packet.data(), packet.len(), nullptr);

            if (packet.getStatus() == CRCError) {
                Serial.print(",BADCRC");
            }
            Serial.println();
        }
    }
}


int cacheNumSent = -1, cachedNumTo = -1;
int cachedNumIrq = -1;

void loop()
{
    if (cachedNumTo != numTimeout) {
        Serial.println("+CC1101 Timeout");
        cachedNumTo = numTimeout;
    }
/*
    if (cachedNumIrq != numRecvIrq) {
        Serial.print("+CC1101 IRQ:");
        Serial.println(numRecvIrq);
        cachedNumIrq = numRecvIrq;
    }
*/
/*
    if (cacheNumSent != numSent) {
        Serial.println();
        Serial.print("+CC1101 ");
        Serial.print(numSent);
        Serial.println(" Preambles Recv/Sent");
        cacheNumSent = numSent;
    }
*/

    if (serial.lineAvailable()) {
        static char buf[128];
        auto sz = serial.copyLine(buf,128);
        buf[sz] = '\0';
//        Serial.print("Got ");
//        Serial.print(sz);
//        Serial.print(": ");
//        Serial.println(buf);

        static uint8_t pkt[64];
        auto pktlen = hexToBin(buf,pkt,64);
        radio.transmit(pkt, pktlen);

//        Serial.print("Sent ");
//        Serial.print(sn);
//        Serial.print(": ");
//        PrintHex8(pkt, pktlen, " ");
    }

    handleUnprocessed();
    handleReceived();
}

Post this list, in code tags, just like the sketch.

1 Like

Hi @h3nk ,

Welcome to the forum..

that's a warning not an error..
maybe the board you are using is not proper..
code looks like it was developed in VS but should be compatible..

what board you got??

good luck.. ~q

1 Like

Yeah, here's the full list of misery:

Arduino: 1.8.18 (Windows 7), Board: "Arduino Duemilanove or Diecimila, ATmega328P"





















C:\arduino-1.8.18\arduino-builder -dump-prefs -logger=machine -hardware C:\arduino-1.8.18\hardware -tools C:\arduino-1.8.18\tools-builder -tools C:\arduino-1.8.18\hardware\tools\avr -built-in-libraries C:\arduino-1.8.18\libraries -libraries C:\Users\Hank\Documents\Arduino\libraries -fqbn=arduino:avr:diecimila:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10818 -build-path C:\Users\Hank\AppData\Local\Temp\arduino_build_82520 -warnings=none -build-cache C:\Users\Hank\AppData\Local\Temp\arduino_cache_922814 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\arduino-1.8.18\hardware\tools\avr -verbose C:\snif\SRC\sniffer\sniffer.ino

C:\arduino-1.8.18\arduino-builder -compile -logger=machine -hardware C:\arduino-1.8.18\hardware -tools C:\arduino-1.8.18\tools-builder -tools C:\arduino-1.8.18\hardware\tools\avr -built-in-libraries C:\arduino-1.8.18\libraries -libraries C:\Users\Hank\Documents\Arduino\libraries -fqbn=arduino:avr:diecimila:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10818 -build-path C:\Users\Hank\AppData\Local\Temp\arduino_build_82520 -warnings=none -build-cache C:\Users\Hank\AppData\Local\Temp\arduino_cache_922814 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\arduino-1.8.18\hardware\tools\avr -verbose C:\snif\SRC\sniffer\sniffer.ino

Using board 'diecimila' from platform in folder: C:\arduino-1.8.18\hardware\arduino\avr

Using core 'arduino' from platform in folder: C:\arduino-1.8.18\hardware\arduino\avr

Detecting libraries used...

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\sniffer.ino.cpp" -o nul

Alternatives for SPI.h: [SPI@1.0]

ResolveLibrary(SPI.h)

  -> candidates: [SPI@1.0]

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\sniffer.ino.cpp" -o nul

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\ArduinoHal.cpp" -o nul

Alternatives for EEPROM.h: [EEPROM@2.0]

ResolveLibrary(EEPROM.h)

  -> candidates: [EEPROM@2.0]

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\ArduinoHal.cpp" -o nul

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Hal.cpp" -o nul

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Module.cpp" -o nul

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\SerialHandler.cpp" -o nul

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\cc1101.cpp" -o nul

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\main.cpp" -o nul

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src\\SPI.cpp" -o nul

Generating function prototypes...

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\sniffer.ino.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\preproc\\ctags_target_for_gcc_minus_e.cpp"

"C:\\arduino-1.8.18\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\ArduinoHal.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\ArduinoHal.cpp.o"

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Hal.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Hal.cpp.o"

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Module.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Module.cpp.o"

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\SerialHandler.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\SerialHandler.cpp.o"

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\cc1101.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\cc1101.cpp.o"

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\main.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\main.cpp.o"

"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\sniffer.ino.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\sniffer.ino.cpp.o"

C:\snif\SRC\sniffer\main.cpp: In function 'void setup()':

main.cpp:76:18: error: 'radio' was not declared in this scope

     auto state = radio.initialize();

                  ^~~~~

C:\snif\SRC\sniffer\main.cpp:76:18: note: suggested alternative: 'random'

     auto state = radio.initialize();

                  ^~~~~

                  random

C:\snif\SRC\sniffer\main.cpp: In function 'void irqRead()':

main.cpp:137:13: error: 'radio' was not declared in this scope

             radio.receive();

             ^~~~~

C:\snif\SRC\sniffer\main.cpp:137:13: note: suggested alternative: 'random'

             radio.receive();

             ^~~~~

             random

main.cpp:140:21: error: 'radio' was not declared in this scope

         auto fifo = radio.SPIgetRegValue(CC1101_REG_RXBYTES, 6, 0);

                     ^~~~~

C:\snif\SRC\sniffer\main.cpp:140:21: note: suggested alternative: 'random'

         auto fifo = radio.SPIgetRegValue(CC1101_REG_RXBYTES, 6, 0);

                     ^~~~~

                     random

main.cpp:145:19: error: 'radio' was not declared in this scope

     auto status = radio.read(str, 128);

                   ^~~~~

C:\snif\SRC\sniffer\main.cpp:145:19: note: suggested alternative: 'random'

     auto status = radio.read(str, 128);

                   ^~~~~

                   random

C:\snif\SRC\sniffer\main.cpp: In function 'void loop()':

main.cpp:248:9: error: 'radio' was not declared in this scope

         radio.transmit(pkt, pktlen);

         ^~~~~

C:\snif\SRC\sniffer\main.cpp:248:9: note: suggested alternative: 'random'

         radio.transmit(pkt, pktlen);

         ^~~~~

         random

C:\snif\SRC\sniffer\sniffer.ino: In function 'void irqRead()':

sniffer:141:9: error: 'PacketQueueT' has not been declared

         PacketQueueT ::PacketT packet;

         ^~~~~~~~~~~~

sniffer:143:13: error: 'packet' was not declared in this scope

             packet.setStatus(CRCError);

             ^~~~~~

C:\snif\SRC\sniffer\sniffer.ino:143:13: note: suggested alternative: 'Packet'

             packet.setStatus(CRCError);

             ^~~~~~

             Packet

sniffer:144:9: error: 'packet' was not declared in this scope

         packet.setRssi(status.rssi);

         ^~~~~~

C:\snif\SRC\sniffer\sniffer.ino:144:9: note: suggested alternative: 'Packet'

         packet.setRssi(status.rssi);

         ^~~~~~

         Packet

sniffer:144:31: error: 'struct ReadStatus' has no member named 'rssi'

         packet.setRssi(status.rssi);

                               ^~~~

sniffer:145:30: error: 'struct ReadStatus' has no member named 'lqi'

         packet.setLqi(status.lqi);

                              ^~~

C:\snif\SRC\sniffer\sniffer.ino: In function 'void handleReceived()':

sniffer:177:9: error: 'PacketQueueT' has not been declared

         PacketQueueT ::PacketT packet;

         ^~~~~~~~~~~~

sniffer:178:33: error: 'packet' was not declared in this scope

         uint8_t len = queue.pop(packet);

                                 ^~~~~~

C:\snif\SRC\sniffer\sniffer.ino:178:33: note: suggested alternative: 'Packet'

         uint8_t len = queue.pop(packet);

                                 ^~~~~~

                                 Packet

Using library SPI at version 1.0 in folder: C:\arduino-1.8.18\hardware\arduino\avr\libraries\SPI 

Using library EEPROM at version 2.0 in folder: C:\arduino-1.8.18\hardware\arduino\avr\libraries\EEPROM 

exit status 1

'radio' was not declared in this scope



The board is labeled as NANO, but it's just a run off the mill 328P clone, which works as a Duemilanove, and it works a treat with simple sketches, so the board is not the issue, exactly the same board is also used in the project.
And it's written by an Italian, and I see no contact info @ github, else I would have contacted him directly.
I think that the real issue is that this code is not really compatible with Arduino, but how to fix it, that's the big question!

From the error log:

Arduino: 1.8.18 (Windows 7), Board: "Arduino Duemilanove or Diecimila, ATmega328P"

Reposting error log without excess crlf

Arduino: 1.8.18 (Windows 7), Board: "Arduino Duemilanove or Diecimila, ATmega328P"
C:\arduino-1.8.18\arduino-builder -dump-prefs -logger=machine -hardware C:\arduino-1.8.18\hardware -tools C:\arduino-1.8.18\tools-builder -tools C:\arduino-1.8.18\hardware\tools\avr -built-in-libraries C:\arduino-1.8.18\libraries -libraries C:\Users\Hank\Documents\Arduino\libraries -fqbn=arduino:avr:diecimila:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10818 -build-path C:\Users\Hank\AppData\Local\Temp\arduino_build_82520 -warnings=none -build-cache C:\Users\Hank\AppData\Local\Temp\arduino_cache_922814 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\arduino-1.8.18\hardware\tools\avr -verbose C:\snif\SRC\sniffer\sniffer.ino
C:\arduino-1.8.18\arduino-builder -compile -logger=machine -hardware C:\arduino-1.8.18\hardware -tools C:\arduino-1.8.18\tools-builder -tools C:\arduino-1.8.18\hardware\tools\avr -built-in-libraries C:\arduino-1.8.18\libraries -libraries C:\Users\Hank\Documents\Arduino\libraries -fqbn=arduino:avr:diecimila:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10818 -build-path C:\Users\Hank\AppData\Local\Temp\arduino_build_82520 -warnings=none -build-cache C:\Users\Hank\AppData\Local\Temp\arduino_cache_922814 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\arduino-1.8.18\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\arduino-1.8.18\hardware\tools\avr -verbose C:\snif\SRC\sniffer\sniffer.ino
Using board 'diecimila' from platform in folder: C:\arduino-1.8.18\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\arduino-1.8.18\hardware\arduino\avr
Detecting libraries used...
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\sniffer.ino.cpp" -o nul
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
  -> candidates: [SPI@1.0]
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\sniffer.ino.cpp" -o nul
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\ArduinoHal.cpp" -o nul
Alternatives for EEPROM.h: [EEPROM@2.0]
ResolveLibrary(EEPROM.h)
  -> candidates: [EEPROM@2.0]
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\ArduinoHal.cpp" -o nul
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Hal.cpp" -o nul
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Module.cpp" -o nul
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\SerialHandler.cpp" -o nul
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\cc1101.cpp" -o nul
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\main.cpp" -o nul
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src\\SPI.cpp" -o nul
Generating function prototypes...
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\sniffer.ino.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\arduino-1.8.18\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\ArduinoHal.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\ArduinoHal.cpp.o"
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Hal.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Hal.cpp.o"
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Module.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\Module.cpp.o"
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\SerialHandler.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\SerialHandler.cpp.o"
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\cc1101.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\cc1101.cpp.o"
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\main.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\main.cpp.o"
"C:\\arduino-1.8.18\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10818 -DARDUINO_AVR_DUEMILANOVE -DARDUINO_ARCH_AVR "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\arduino-1.8.18\\hardware\\arduino\\avr\\libraries\\EEPROM\\src" "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\sniffer.ino.cpp" -o "C:\\Users\\Hank\\AppData\\Local\\Temp\\arduino_build_82520\\sketch\\sniffer.ino.cpp.o"
C:\snif\SRC\sniffer\main.cpp: In function 'void setup()':
main.cpp:76:18: error: 'radio' was not declared in this scope
     auto state = radio.initialize();
                  ^~~~~
C:\snif\SRC\sniffer\main.cpp:76:18: note: suggested alternative: 'random'
     auto state = radio.initialize();
                  ^~~~~
                  random
C:\snif\SRC\sniffer\main.cpp: In function 'void irqRead()':
main.cpp:137:13: error: 'radio' was not declared in this scope
             radio.receive();
             ^~~~~
C:\snif\SRC\sniffer\main.cpp:137:13: note: suggested alternative: 'random'
             radio.receive();
             ^~~~~
             random
main.cpp:140:21: error: 'radio' was not declared in this scope
         auto fifo = radio.SPIgetRegValue(CC1101_REG_RXBYTES, 6, 0);
                     ^~~~~
C:\snif\SRC\sniffer\main.cpp:140:21: note: suggested alternative: 'random'
         auto fifo = radio.SPIgetRegValue(CC1101_REG_RXBYTES, 6, 0);
                     ^~~~~
                     random
main.cpp:145:19: error: 'radio' was not declared in this scope
     auto status = radio.read(str, 128);
                   ^~~~~
C:\snif\SRC\sniffer\main.cpp:145:19: note: suggested alternative: 'random'
     auto status = radio.read(str, 128);
                   ^~~~~
                   random
C:\snif\SRC\sniffer\main.cpp: In function 'void loop()':
main.cpp:248:9: error: 'radio' was not declared in this scope
         radio.transmit(pkt, pktlen);
         ^~~~~
C:\snif\SRC\sniffer\main.cpp:248:9: note: suggested alternative: 'random'
         radio.transmit(pkt, pktlen);
         ^~~~~
         random
C:\snif\SRC\sniffer\sniffer.ino: In function 'void irqRead()':
sniffer:141:9: error: 'PacketQueueT' has not been declared
         PacketQueueT ::PacketT packet;
         ^~~~~~~~~~~~
sniffer:143:13: error: 'packet' was not declared in this scope
             packet.setStatus(CRCError);
             ^~~~~~
C:\snif\SRC\sniffer\sniffer.ino:143:13: note: suggested alternative: 'Packet'
             packet.setStatus(CRCError);
             ^~~~~~
             Packet
sniffer:144:9: error: 'packet' was not declared in this scope
         packet.setRssi(status.rssi);
         ^~~~~~
C:\snif\SRC\sniffer\sniffer.ino:144:9: note: suggested alternative: 'Packet'
         packet.setRssi(status.rssi);
         ^~~~~~
         Packet
sniffer:144:31: error: 'struct ReadStatus' has no member named 'rssi'
         packet.setRssi(status.rssi);
                               ^~~~
sniffer:145:30: error: 'struct ReadStatus' has no member named 'lqi'
         packet.setLqi(status.lqi);
                              ^~~
C:\snif\SRC\sniffer\sniffer.ino: In function 'void handleReceived()':
sniffer:177:9: error: 'PacketQueueT' has not been declared
         PacketQueueT ::PacketT packet;
         ^~~~~~~~~~~~
sniffer:178:33: error: 'packet' was not declared in this scope
         uint8_t len = queue.pop(packet);
                                 ^~~~~~
C:\snif\SRC\sniffer\sniffer.ino:178:33: note: suggested alternative: 'Packet'
         uint8_t len = queue.pop(packet);
                                 ^~~~~~
                                 Packet
Using library SPI at version 1.0 in folder: C:\arduino-1.8.18\hardware\arduino\avr\libraries\SPI 
Using library EEPROM at version 2.0 in folder: C:\arduino-1.8.18\hardware\arduino\avr\libraries\EEPROM 
exit status 1
'radio' was not declared in this scope

This seems to have failed on both conditions...

1 Like

Check my previous post.

your good board is not getting selected then..


#if defined (BOARD_HUZZAH32)
CC1101Tranceiver radio(25, 39, 34);
#elif defined (BOARD_NANO)
CC1101Tranceiver radio(10, 3, 2);
#endif

or radio would be declared..

that stinks, might want to abort..

where's this ino at, don't see it in the git..

i was thinking you my want to rename main.cpp to folder name .ino, or sniffer.ino and try that with Arduino IDE..

sorry.. ~q

1 Like

The source code is several many files, all of which need to be part of your project.

Please tell us you made a tab for every file in the source code folder from the repository and copied each file's contents into the appropriate tab.

You can use an empty nameOfProject.ino file as the first tab. If you have all the other files, it should build successfully in the IDE.

Or not, for some other reasons. :expressionless:

HTH

a7

C programming is like LEGU (tm).

If you want to use red blocks, you have to buy and have red blocks nearby.
If you’re using green wheels, having them at school is no help. You need them right here on the same table.

The blocks in a large project rarely stand by themselves… you need to have a baseboard to hold them in alignment.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.