diff --git a/RemoteIDSpoofer.ino b/RemoteIDSpoofer/RemoteIDSpoofer.ino similarity index 100% rename from RemoteIDSpoofer.ino rename to RemoteIDSpoofer/RemoteIDSpoofer.ino diff --git a/alt_unix_time.c b/RemoteIDSpoofer/alt_unix_time.c similarity index 100% rename from alt_unix_time.c rename to RemoteIDSpoofer/alt_unix_time.c diff --git a/id_open.cpp b/RemoteIDSpoofer/id_open.cpp similarity index 100% rename from id_open.cpp rename to RemoteIDSpoofer/id_open.cpp diff --git a/id_open.h b/RemoteIDSpoofer/id_open.h similarity index 100% rename from id_open.h rename to RemoteIDSpoofer/id_open.h diff --git a/id_open_beacon.cpp b/RemoteIDSpoofer/id_open_beacon.cpp similarity index 100% rename from id_open_beacon.cpp rename to RemoteIDSpoofer/id_open_beacon.cpp diff --git a/id_open_esp32.cpp b/RemoteIDSpoofer/id_open_esp32.cpp similarity index 100% rename from id_open_esp32.cpp rename to RemoteIDSpoofer/id_open_esp32.cpp diff --git a/id_open_esp8266.cpp b/RemoteIDSpoofer/id_open_esp8266.cpp similarity index 90% rename from id_open_esp8266.cpp rename to RemoteIDSpoofer/id_open_esp8266.cpp index 5dc332a..b441323 100644 --- a/id_open_esp8266.cpp +++ b/RemoteIDSpoofer/id_open_esp8266.cpp @@ -1,17 +1,17 @@ /* -*- tab-width: 2; mode: c; -*- - * + * * C++ class for Arduino to function as a wrapper around opendroneid. * This file has the ESP8266 specific code. * * Copyright (c) 2022, Steve Jack. * - * Nov. '22: Split out from id_open.cpp. + * Nov. '22: Split out from id_open.cpp. * * MIT licence. * * NOTES * - * + * */ #define DIAGNOSTICS 0 @@ -26,7 +26,7 @@ #include "id_open.h" -#if ID_OD_WIFI +#if ID_OD_WIFI #include @@ -64,11 +64,11 @@ void init2(char *ssid,int ssid_length,uint8_t *WiFi_mac_addr,uint8_t wifi_channe #if ID_OD_WIFI softap_config wifi_config; - + WiFi.mode(WIFI_OFF); WiFi.macAddress(WiFi_mac_addr); - + WiFi.softAP(ssid,NULL,wifi_channel,false,0); WiFi.setOutputPower(20.0); @@ -77,7 +77,7 @@ void init2(char *ssid,int ssid_length,uint8_t *WiFi_mac_addr,uint8_t wifi_channe // wifi_softap_set_config(&wifi_config); if (Debug_Serial) { - + sprintf(text,"esp_read_mac(): %02x:%02x:%02x:%02x:%02x:%02x\r\n", WiFi_mac_addr[0],WiFi_mac_addr[1],WiFi_mac_addr[2], WiFi_mac_addr[3],WiFi_mac_addr[4],WiFi_mac_addr[5]); @@ -96,7 +96,7 @@ void init2(char *ssid,int ssid_length,uint8_t *WiFi_mac_addr,uint8_t wifi_channe uint8_t *capability() { static uint8_t capa[2] = {0x11,0x00}; - + return capa; } @@ -111,7 +111,7 @@ int tag_rates(uint8_t *beacon_frame,int beacon_offset) { beacon_frame[beacon_offset++] = 0x82; // 1 beacon_frame[beacon_offset++] = 0x84; // 2 beacon_frame[beacon_offset++] = 0x0c; // 6 - beacon_frame[beacon_offset++] = 0x18; // 12 + beacon_frame[beacon_offset++] = 0x18; // 12 beacon_frame[beacon_offset++] = 0x30; // 24 beacon_frame[beacon_offset++] = 0x60; // 48 @@ -124,10 +124,10 @@ int tag_ext_rates(uint8_t *beacon_frame,int beacon_offset) { beacon_frame[beacon_offset++] = 0x32; beacon_frame[beacon_offset++] = 0x04; - beacon_frame[beacon_offset++] = 0x6c; // 54 - beacon_frame[beacon_offset++] = 0x12; // 9 - beacon_frame[beacon_offset++] = 0x24; // 18 - beacon_frame[beacon_offset++] = 0x48; // 36 + beacon_frame[beacon_offset++] = 0x6c; // 54 + beacon_frame[beacon_offset++] = 0x12; // 9 + beacon_frame[beacon_offset++] = 0x24; // 18 + beacon_frame[beacon_offset++] = 0x48; // 36 return beacon_offset; } diff --git a/id_open_nrf52.cpp b/RemoteIDSpoofer/id_open_nrf52.cpp similarity index 100% rename from id_open_nrf52.cpp rename to RemoteIDSpoofer/id_open_nrf52.cpp diff --git a/id_open_nrf52.h b/RemoteIDSpoofer/id_open_nrf52.h similarity index 100% rename from id_open_nrf52.h rename to RemoteIDSpoofer/id_open_nrf52.h diff --git a/odid_wifi.h b/RemoteIDSpoofer/odid_wifi.h similarity index 100% rename from odid_wifi.h rename to RemoteIDSpoofer/odid_wifi.h diff --git a/opendroneid.c b/RemoteIDSpoofer/opendroneid.c similarity index 100% rename from opendroneid.c rename to RemoteIDSpoofer/opendroneid.c diff --git a/opendroneid.h b/RemoteIDSpoofer/opendroneid.h similarity index 100% rename from opendroneid.h rename to RemoteIDSpoofer/opendroneid.h diff --git a/spoofer.cpp b/RemoteIDSpoofer/spoofer.cpp similarity index 100% rename from spoofer.cpp rename to RemoteIDSpoofer/spoofer.cpp diff --git a/spoofer.h b/RemoteIDSpoofer/spoofer.h similarity index 100% rename from spoofer.h rename to RemoteIDSpoofer/spoofer.h diff --git a/utm.cpp b/RemoteIDSpoofer/utm.cpp similarity index 100% rename from utm.cpp rename to RemoteIDSpoofer/utm.cpp diff --git a/utm.h b/RemoteIDSpoofer/utm.h similarity index 100% rename from utm.h rename to RemoteIDSpoofer/utm.h diff --git a/wifi.c b/RemoteIDSpoofer/wifi.c similarity index 100% rename from wifi.c rename to RemoteIDSpoofer/wifi.c diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..d68e3f6 --- /dev/null +++ b/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 RemoteIDSpoofer/RemoteIDSpoofer.ino --clean diff --git a/library.properties b/library.properties deleted file mode 100644 index c80b353..0000000 --- a/library.properties +++ /dev/null @@ -1,10 +0,0 @@ -name=id_open -version=1.2 -author=Steve Jack -maintainer=Steve Jack -sentence=Arduino/ESP32 opendroneid. -paragraph=Arduino/ESP32 library to act as a wrapper around opendroneid. -category=Uncategorized -url=https://github.com/sxjack/uav_electronic_ids/tree/main/id_open -architectures=esp32,esp8266,rp2040,nrf52 -includes=id_open.h diff --git a/upload.sh b/upload.sh new file mode 100755 index 0000000..cba6f64 --- /dev/null +++ b/upload.sh @@ -0,0 +1,2 @@ +#!/bin/bash +arduino-cli upload --port /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcuv2 RemoteIDSpoofer/RemoteIDSpoofer.ino