GithubHelp home page GithubHelp logo

sxjack / uav_electronic_ids Goto Github PK

View Code? Open in Web Editor NEW
61.0 6.0 27.0 1.13 MB

Arduino classes for various UAV electronic IDs and ATM/UTM interfaces.

License: MIT License

C 99.28% C++ 0.72%
rid astm-f3411 en-4709-002

uav_electronic_ids's Introduction

Steve Jack

My day job is engineering instrumentation and control systems for petrochemical plants.

Most of the stuff that I post on here is related to my hobby of flying radio controlled model aircraft.

Be aware that I may leave this site if github try to push two-factor authentication on me.

uav_electronic_ids's People

Contributors

sxjack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

uav_electronic_ids's Issues

Not an issue but a question

Hi,

I'm lokking in the source code, and in id_open.cpp line 706 I have this

// Pack the WiFi data.
// One group every 300ms and another every 3000ms.

If I want to change the time for example 300ms to 500ms where is it the ino file or in the lib ?

Compiling id_open

When compiling. I encountered the following error:

lib\libopendroneid\wifi.c: In function 'odid_wifi_build_nan_sync_beacon_frame':

lib\libopendroneid\wifi.c:261:11: error: 'struct ieee80211_beacon' has no member named 'element_id' beacon->element_id = 0xDD;

lib\libopendroneid\wifi.c:262:11: error: 'struct ieee80211_beacon' has no member named 'length' beacon->length = 0x22;

lib\libopendroneid\wifi.c:263:18: error: 'struct ieee80211_beacon' has no member named 'oui' memcpy(beacon->oui, wifi_alliance_oui, sizeof(beacon->oui));

lib\libopendroneid\wifi.c:263:57: error: 'struct ieee80211_beacon' has no member named 'oui' memcpy(beacon->oui, wifi_alliance_oui, sizeof(beacon->oui));

lib\libopendroneid\wifi.c:264:11: error: 'struct ieee80211_beacon' has no member named 'oui_type'

I was able to fix it by modifying the ieee80211_beacon struct in odid_wifi.h adding the missing variables.

struct __attribute__((__packed__)) ieee80211_beacon { uint64_t timestamp; uint64_t element_id; uint64_t length; uint64_t oui_type; uint64_t oui; uint16_t beacon_interval; uint16_t capability; };

I just wanted to let you know and thank you for your work.

Some errors that i don't understood

Hello

@sxjack, can you help me with these things?

C:\Users\User\Desktop\uav_electronic_ids-main\uav_electronic_ids-main\id_open\examples\random_flight\id_open.cpp:295:6: error: no declaration matches 'void ID_OpenDrone::set_self_id(char*)'
void ID_OpenDrone::set_self_id(char self_id) {
^~~~~~~~~~~~
C:\Users\User\Desktop\uav_electronic_ids-main\uav_electronic_ids-main\id_open\examples\random_flight\id_open.cpp:295:6: note: no functions named 'void ID_OpenDrone::set_self_id(char)'
In file included from C:\Users\2683126\Desktop\uav_electronic_ids-main\uav_electronic_ids-main\id_open\examples\random_flight\id_open.cpp:54:
C:\Users\User\Desktop\uav_electronic_ids-main\uav_electronic_ids-main\id_open\examples\random_flight\id_open.h:104:7: note: 'class ID_OpenDrone' defined here
class ID_OpenDrone {
^~~~~~~~~~~~

exit status 1

Compilation error: no declaration matches 'void ID_OpenDrone::set_self_id(char*)'

sending and receiving ODID data simultaniously

I have been trying to put together the Id_scanner and Id_open codes to both receive and transmit data simultaneously mostly via Wifi-NAN. They seem to have different wifi settings for either rx or tx. Is it a way to make them work simultaneously on the same ESP32 board or is it doomed to fail?

esp32-s3 support discussion.

I just wanted to note for others that ESP32-S3 works under the following conditions:

Arduino IDE -> File Menu -> Preferences -> "Additional Board Manager URLs:" https://github.com/espressif/arduino-esp32/releases/download/2.0.3-RC1/package_esp32_dev_index.json
Arduino IDE -> Tools Menu -> Board -> Boards Manager -> [search for 'esp32'] ->Select Version [drop-down]-> 2.0.3-RC1 -> Install
Arduino IDE -> Tools Menu -> Board -> "ESP32 Arduino" ->"ESP32S3 Dev Module" [choose it]
In your file manager navigate to ~/Arduino/libraries/ folder
in this folder you need a folder called 'id_open' and a folder called 'utm' that come from https://github.com/sxjack/uav_electronic_ids. i cloned that repo elsewhere and symlinked these two folders into ~/Arduino/libraries, but how they get here doesn't matter too much.
You can then open one of the 'example/s from id_open eg:
Arduino IDE -> File Menu -> Examples ->[scroll] Examples from Custom Libraries -> id_open -> random_flight
[plugin your ep32-s3 with usb cable using the usb port labeled "USB" on the pcb]
Arduino IDE -> Tools Menu -> Port:... -> /dev/ttyACM0
Press 'Upload' '"arrow" in IDE green bar.
If board does not flash, hold-down BOOT pushbutton on pcb while pressing RESET pushbutton briefly [to force it into bootloader mode] and retry.
done, ESP32-S3 is now running and emitting test/demo remote-id bluetooth messages.

ESP32 Differences

Hi,

If I use an ESP32 (Lilygo TTGO T1_v1.3 - https://github.com/LilyGO/ESP32-TTGO-T1) I get a steady stream of data from the jSON output on USB as expected (although with no display attached at the moment).

However, if I use a different ESP32 module with TFT display (Lilygo TTGO T4_v1.3 - https://www.aliexpress.com/item/32854502767.html) I only get a jSON output every 60 seconds and all fields are essentially zero.

23:02:49.685 -> { "index": 8, "runtime": 780, "mac": "00:00:00:00:00:00", "id": "NONE", "uav latitude": 0.000000, "uav longitude": 0.000000, "alitude msl": 0, "height agl": 0, "base latitude": 0.000000, "base longitude": 0.000000, "speed": 0, "heading": 0 }

Although the display perhaps isn't configured just yet, I would expect to see an output similar to the TTGO T1_v1.3 module.

Any idea on where to start looking at the issue please?

Thank you for your help.

Debug output

Are you able to get the debug output to the serial port when DIAGNOSTICS is set to 1 ? I'm not seeing anything. I can see the other "Arduino" serial debug output, but not the serial debug messages from C (id_open.cpp).

random_flight.ino: Non-RID Wi-Fi packets being broadcast

I'm running random_flight.ino on an ESP32 using PlatformIO. Sniffing the wifi packets using Wireshark, I am finding that valid Remote ID packets are indeed being broadcast and properly decoded, but, strangely, Wireshark also detects other wifi packets broadcast by the ESP32 that aren't OpendroneID packets. The non-remote ID packets are sent by a mac address that is incremented by 1 compared to the mac address that is broadcasting the valid remote ID packets. The hex dump from the non-remote ID packets looks completely different.

Here is a screenshot from Wireshark, where you can see both the valid Remote ID and invalid packets broadcast by the ESP32:
image

And here is the hex dump of those invalid packets broadcast by the ESP32:
image

Any idea why it is doing this? Maybe it is responding to probe requests? How can I disable this?

hardware required

Hi,

Here ESP32 and either an SH1106 or ST7735 is mentioned as required hardware. In the picture on the repo's homepage, there is another board in the middle. Can you please provide its model name and also mention whether it is necessary or not. Thanks.

Can this be used in Raspberry Pi OS

Hello @sxjack , We were trying to simulate the open drone id for connecting the drones. we were successfully able to run this test application - https://github.com/opendroneid/opendroneid-core-c in raspberry pi os. Now we are looking to emit this encoded data received from opendroneid-core-c application but not able to figure it out.

Can your please check and let me know wherever we can run this in Raspberry pi os. your help is much appreciated

'CLOCK_MONOTONIC' Error on compile

Trying to compile on an Arduino ESP32 and I am getting this error, any suggestions to resolve please?

Many thanks

D:\Users\Steven\Documents\Arduino\libraries\libopendroneid\wifi.c: In function 'odid_wifi_build_nan_sync_beacon_frame':
D:\Users\Steven\Documents\Arduino\libraries\libopendroneid\wifi.c:237:16: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
  clock_gettime(CLOCK_MONOTONIC, &ts);
                ^
D:\Users\Steven\Documents\Arduino\libraries\libopendroneid\wifi.c:237:16: note: each undeclared identifier is reported only once for each function it appears in
Multiple libraries were found for "WiFi.h"
 Used: C:\Users\Steven\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi
 Not used: D:\Program Files (x86)\Arduino\libraries\WiFi
Using library id_open at version 0.8 in folder: D:\Users\Steven\Documents\Arduino\libraries\id_open 
Using library BLE at version 1.0.1 in folder: C:\Users\Steven\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\BLE 
Using library utm at version 1.1 in folder: D:\Users\Steven\Documents\Arduino\libraries\utm 
Using library libopendroneid in folder: D:\Users\Steven\Documents\Arduino\libraries\libopendroneid (legacy)
Using library WiFi at version 1.0 in folder: C:\Users\Steven\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi 
exit status 1
Error compiling for board ESP32 Wrover Module.

Compiling ESP32 Arduino

Hi,

I'm trying to use your library but I have an issue when I try to compile with Arduino. But right now I have an error when I try to compile for Adafruit ESP32 feather with wifi.c

C:\Users\Quentin\Documents\Arduino\libraries\id_open\wifi.c: In function 'odid_wifi_build_nan_sync_beacon_frame':

C:\Users\Quentin\Documents\Arduino\libraries\id_open\wifi.c:235:19: error: 'CLOCK_MONOTONIC' undeclared (first use in this >function)
clock_gettime(CLOCK_MONOTONIC, &ts);
^
C:\Users\Quentin\Documents\Arduino\libraries\id_open\wifi.c:235:19: note: each undeclared identifier is reported only once for each function it appears in
Multiple libraries were found for "WiFi.h"
Using library: C:\Users\Quentin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi

I've put opendroneid.c, opendroneid.h and odid_wifi.h and wifi.c in C:\Users\Quentin\Documents\Arduino\libraries\id_open

here is a screenshot of my lib dir
image

and here in id_open dir
image

UPDATE
I've read this issue here I've the same issue and I made what you said in your reply but the issue is always here

UPDATE 2
Resolved, we need to download the latest version ofn opendroneid and not the 1.0 release

Program is too big

If you are using Arduino IDE, you can solve this by setting Partition Scheme to "Minimal SPIFFS". I think this should be in the readme.

Testing trasmitter and receiver

Using flight random sketch trasmitter on ESP32, seems that only BlueTooth trasmission is decoded correctly as OpenId protocol bye receivers (Tested on Android Receiver and Id_scanner).
WIFI protocol instead is trasmitted on channel 6 but not showed as OpenID from the receivers. I Captured the Wifi Signal and also the wireshark dissector is not able to decode it correctly as OpenId protocol.

Did someone test the ESP32 trasmitter on WIFI (beacon o nan)?
Any hints?

Thanks

Not an issue but a question about ble vs wifi

Hi,
I'm looking you library and I have a question about transmit() function. As I understand in the last version, you sent all packet via wifi every 0x200 beacon_interval but if we use BT, you have more transmit_ble one every 300ms other 600ms and other at other elapsed time, why ?

Why are you send each packet one by one in BLE whereas you send 4 and 3 packets at same time in wifi ? Is this a legal obligation ?

reboot after flashing

Hello, download last commits, built the project, upload and my esp-32-wroom falls in cyclic reboot? What i am doing wrong?

reboot loop with id_open code

Hi there,

I was success with running france example and scanner as well. However I have got a reboot loop when trying to run the finland code and any other open_id example with the following stack trace. Tried on two different ESP32 board, both ESP32-S and one ESP32-WROOM-32. Im using board "Esp32 Dev Module" included in library esp 1.0.6 with Arduino IDE 1.8.9 with the following params:

240MHZ Wifi/BT, Flash Mode QIO, Flash size 32Mb, Partition scheme 2MB/NO OTA/2MB SPIFF, PSRAM disabled.

Decoding stack results
0x4008f088: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 156
0x4008f305: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 171
0x4019ed64: esp_phy_rf_init at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/phy_init.c line 197
0x4019efce: esp_phy_load_cal_and_init at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/phy_init.c line 673
0x4010ff4f: esp_bt_controller_enable at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/bt/bt.c line 1528
0x400d6106: btStart at /Users/syn/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/cores/esp32/esp32-hal-bt.c line 45
0x400d37f5: BLEDevice::init(std::__cxx11::basic_string, std::allocator >) at /Users/syn/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/BLE/src/BLEDevice.cpp line 339
0x400d142d: init2(char*, int, unsigned char*, unsigned char) at /Users/syn/Documents/Arduino/libraries/id_open/id_open_esp32.cpp line 212
0x400d0b0c: ID_OpenDrone::init(UTM_parameters*) at /Users/syn/Documents/Arduino/libraries/id_open/id_open.cpp line 253
0x400d081d: setup() at /var/folders/pp/t4fyr3yn03957kjjm25g393w0000gn/T/arduino_modified_sketch_51192/finland.ino line 27
0x400d6402: loopTask(void*) at /Users/syn/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/cores/esp32/main.cpp line 18
0x4009037a: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143

Wi-Fi beacon implementation

Wi-Fi beacon (as specified in the ASD-STAN doc) should be a merging of what you already did for France (information element 0xdd (221)), but encode the data as it is in OpenDroneID.

This is all real good work!

Gabriel.

National IDs, WIFI Settings and FAA Approval

I was looking at the UAV Electronic IDs code (buckminster example). I was wondering if National ID and the WIFI settings should be dynamically configured based on GPS location? Seems like it would increase memory requirements to store country configs. Will this have to be reconfigured and compiled if someone travels across countries?

What are your concerns about getting it certified in the US for FAA approval? What needs to be added?

Thanks

id_scanner wifi channel

Edit: I realize now that the scanner only scans channel 6 because channel 6 is the channel for wifi nan. I'm wondering if the scanner only works for nan or if it works for wifi beacons as well?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.