paparazzi secure datalink compile errors.

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

paparazzi secure datalink compile errors.

Chris Efstathiou
Hi.

During compilation of an example just to get familiar with the secure
datalink i get those errors

Did i forgot something in the airframe file?


make TARGET=ap -f Makefile.ac all_ac_h
make[1]: Entering directory '/home/hendrix/paparazzi'
Using "arch/stm32/openpilot_revo.ld" as ldscript for target "ap".
GENERATE KEYS
    Compiling key_generator v0.1.0
(/home/hendrix/paparazzi/sw/ext/key_generator)
warning: use of deprecated associated function
`std::error::Error::description`: use the Display impl or to_string()
   --> src/main.rs:90:71
    |
90 |             Err(why) => panic!("couldn't create {}: {}", display,
why.description()),
| ^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: use of deprecated associated function
`std::error::Error::description`: use the Display impl or to_string()
    --> src/main.rs:103:73
     |
103 |             Err(why) => panic!("couldn't write to {}: {}",
display, why.description()),
| ^^^^^^^^^^^

warning: use of deprecated associated function
`std::error::Error::description`: use the Display impl or to_string()
    --> src/main.rs:109:73
     |
109 |             Err(why) => panic!("couldn't write to {}: {}",
display, why.description()),
| ^^^^^^^^^^^

warning: use of deprecated associated function
`std::error::Error::description`: use the Display impl or to_string()
    --> src/main.rs:115:73
     |
115 |             Err(why) => panic!("couldn't write to {}: {}",
display, why.description()),
| ^^^^^^^^^^^

warning: use of deprecated associated function
`std::error::Error::description`: use the Display impl or to_string()
    --> src/main.rs:129:71
     |
129 |             Err(why) => panic!("couldn't create {}: {}", display,
why.description()),
| ^^^^^^^^^^^

warning: use of deprecated associated function
`std::error::Error::description`: use the Display impl or to_string()
    --> src/main.rs:141:73
     |
141 |             Err(why) => panic!("couldn't write to {}: {}",
display, why.description()),
| ^^^^^^^^^^^

warning: use of deprecated associated function
`std::error::Error::description`: use the Display impl or to_string()
    --> src/main.rs:147:73
     |
147 |             Err(why) => panic!("couldn't write to {}: {}",
display, why.description()),
| ^^^^^^^^^^^

warning: use of deprecated associated function
`std::error::Error::description`: use the Display impl or to_string()
    --> src/main.rs:153:73
     |
153 |             Err(why) => panic!("couldn't write to {}: {}",
display, why.description()),
| ^^^^^^^^^^^

error: linking with `cc` failed: exit code: 1
   |
   = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64"
"-Wl,--eh-frame-hdr" "-L"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.0.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.1.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.10.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.11.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.12.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.13.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.14.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.15.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.2.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.3.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.4.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.5.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.6.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.7.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.8.rcgu.o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.9.rcgu.o"
"-o"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.2urjyjs3gvtw0uiy.rcgu.o"
"-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1"
"-nodefaultlibs" "-L"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps" "-L"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/build/rusthacl-ae9df3fc713c0171/out"
"-L"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib"
"-Wl,-Bstatic"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/librusthacl-96ea517d001ef71d.rlib"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/librand-acef951c8a8b724e.rlib"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/librand-fce77a54c38c0ac7.rlib"
"/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/liblibc-3c615dad05dfc927.rlib"
"-Wl,--start-group"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-e12de7683a34c500.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-446a53c2e468675f.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-86fef9fb252a2d33.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-3bed9bfd30304751.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-0e38eeb474a7b386.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-a846ed547b824740.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-c9540f0a4fb9265d.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-7d2ca66c92c356eb.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-147e2c808f949493.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-bd2a4369506670e9.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-74bfdd0ce7d0ed48.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-6777f47f1c491841.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-b104f1790174f2be.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-db37898996f45c13.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-25b7435131fc4938.rlib"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-9d4b6f3c097e876e.rlib"
"-Wl,--end-group"
"/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-3f953ad652ab829a.rlib"
"-Wl,-Bdynamic" "-lhacl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm"
"-ldl" "-lc"
   = note: /usr/bin/ld: cannot find -lhacl
           collect2: error: ld returned 1 exit status


error: aborting due to previous error; 8 warnings emitted

error: could not compile `key_generator`

To learn more, run the command again with --verbose.
Makefile.ac:188: recipe for target 'generate_keys' failed
make[1]: *** [generate_keys] Error 101
make[1]: Leaving directory '/home/hendrix/paparazzi'
Makefile.ac:211: recipe for target 'ap.compile' failed
make: *** [ap.compile] Error 2
make: Leaving directory '/home/hendrix/paparazzi'

FAILED 'make -C /home/hendrix/paparazzi -f Makefile.ac
AIRCRAFT=secure_fixed_wing ap.compile' with code 2


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Gautier Hattenberger-3
Hi,

This rust code is old, that explain the 'deprecated' warnings.

But for the actual error, it needs the hacl C library, which should be
compiled by rusthacl I guess, but it is not done. So it needs to be
compiled and install by hand.

In your dev folder do:

git clone https://github.com/paparazzi/hacl-c.git
cd hacl-c
make
sudo cp libhacl.so /usr/lib

After that, it should compile the rust link agent. But the best would be
to understand why it is not compiling correctly in the first place (and
eventually fix the warnings) but I'm not expert in Rust and Michal who
made this code doesn't seem to maintain it anymore. Maybe you can still
ask him directly for assistance. Also, rusthacl alone is just compiling
correctly.

Cheers

Gautier

Le 12/01/2021 à 17:03, Chris a écrit :

> Hi.
>
> During compilation of an example just to get familiar with the secure
> datalink i get those errors
>
> Did i forgot something in the airframe file?
>
>
> make TARGET=ap -f Makefile.ac all_ac_h
> make[1]: Entering directory '/home/hendrix/paparazzi'
> Using "arch/stm32/openpilot_revo.ld" as ldscript for target "ap".
> GENERATE KEYS
>    Compiling key_generator v0.1.0
> (/home/hendrix/paparazzi/sw/ext/key_generator)
> warning: use of deprecated associated function
> `std::error::Error::description`: use the Display impl or to_string()
>   --> src/main.rs:90:71
>    |
> 90 |             Err(why) => panic!("couldn't create {}: {}", display,
> why.description()),
> | ^^^^^^^^^^^
>    |
>    = note: `#[warn(deprecated)]` on by default
>
> warning: use of deprecated associated function
> `std::error::Error::description`: use the Display impl or to_string()
>    --> src/main.rs:103:73
>     |
> 103 |             Err(why) => panic!("couldn't write to {}: {}",
> display, why.description()),
> | ^^^^^^^^^^^
>
> warning: use of deprecated associated function
> `std::error::Error::description`: use the Display impl or to_string()
>    --> src/main.rs:109:73
>     |
> 109 |             Err(why) => panic!("couldn't write to {}: {}",
> display, why.description()),
> | ^^^^^^^^^^^
>
> warning: use of deprecated associated function
> `std::error::Error::description`: use the Display impl or to_string()
>    --> src/main.rs:115:73
>     |
> 115 |             Err(why) => panic!("couldn't write to {}: {}",
> display, why.description()),
> | ^^^^^^^^^^^
>
> warning: use of deprecated associated function
> `std::error::Error::description`: use the Display impl or to_string()
>    --> src/main.rs:129:71
>     |
> 129 |             Err(why) => panic!("couldn't create {}: {}",
> display, why.description()),
> | ^^^^^^^^^^^
>
> warning: use of deprecated associated function
> `std::error::Error::description`: use the Display impl or to_string()
>    --> src/main.rs:141:73
>     |
> 141 |             Err(why) => panic!("couldn't write to {}: {}",
> display, why.description()),
> | ^^^^^^^^^^^
>
> warning: use of deprecated associated function
> `std::error::Error::description`: use the Display impl or to_string()
>    --> src/main.rs:147:73
>     |
> 147 |             Err(why) => panic!("couldn't write to {}: {}",
> display, why.description()),
> | ^^^^^^^^^^^
>
> warning: use of deprecated associated function
> `std::error::Error::description`: use the Display impl or to_string()
>    --> src/main.rs:153:73
>     |
> 153 |             Err(why) => panic!("couldn't write to {}: {}",
> display, why.description()),
> | ^^^^^^^^^^^
>
> error: linking with `cc` failed: exit code: 1
>   |
>   = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64"
> "-Wl,--eh-frame-hdr" "-L"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.0.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.1.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.10.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.11.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.12.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.13.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.14.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.15.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.2.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.3.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.4.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.5.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.6.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.7.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.8.rcgu.o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.key_generator.9lvuj26w-cgu.9.rcgu.o"
> "-o"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/key_generator-a7d7af48f20f2848.2urjyjs3gvtw0uiy.rcgu.o"
> "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1"
> "-nodefaultlibs" "-L"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps"
> "-L"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/build/rusthacl-ae9df3fc713c0171/out"
> "-L"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib"
> "-Wl,-Bstatic"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/librusthacl-96ea517d001ef71d.rlib"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/librand-acef951c8a8b724e.rlib"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/librand-fce77a54c38c0ac7.rlib"
> "/home/hendrix/paparazzi/sw/ext/key_generator/target/release/deps/liblibc-3c615dad05dfc927.rlib"
> "-Wl,--start-group"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-e12de7683a34c500.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-446a53c2e468675f.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-86fef9fb252a2d33.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-3bed9bfd30304751.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-0e38eeb474a7b386.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-a846ed547b824740.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-c9540f0a4fb9265d.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-7d2ca66c92c356eb.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-147e2c808f949493.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-bd2a4369506670e9.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-74bfdd0ce7d0ed48.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-6777f47f1c491841.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-b104f1790174f2be.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-db37898996f45c13.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-25b7435131fc4938.rlib"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-9d4b6f3c097e876e.rlib"
> "-Wl,--end-group"
> "/home/hendrix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-3f953ad652ab829a.rlib"
> "-Wl,-Bdynamic" "-lhacl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm"
> "-ldl" "-lc"
>   = note: /usr/bin/ld: cannot find -lhacl
>           collect2: error: ld returned 1 exit status
>
>
> error: aborting due to previous error; 8 warnings emitted
>
> error: could not compile `key_generator`
>
> To learn more, run the command again with --verbose.
> Makefile.ac:188: recipe for target 'generate_keys' failed
> make[1]: *** [generate_keys] Error 101
> make[1]: Leaving directory '/home/hendrix/paparazzi'
> Makefile.ac:211: recipe for target 'ap.compile' failed
> make: *** [ap.compile] Error 2
> make: Leaving directory '/home/hendrix/paparazzi'
>
> FAILED 'make -C /home/hendrix/paparazzi -f Makefile.ac
> AIRCRAFT=secure_fixed_wing ap.compile' with code 2
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Chris Efstathiou
In reply to this post by Chris Efstathiou
After reading a little about rust i think the warnings are fixed if we
replace

Err(why) => panic!("couldn't write to {}: {}", display, why.description()),

with

Err(why) => panic!("couldn't create {}: {}", display, why.to_string()),

and comment out line 33 "use std::error::Error;"

I haven't tried it yet but the description method will be hard
deprecated and must be replaced in order "why" to return a string.

Chris


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Michal Podhradsky
Hi Chris, Gautier,

the key generator was depending on a repo that no longer exists. I fixed it in this PR: https://github.com/paparazzi/paparazzi/pull/2645

I haven't used paparazzi in a while, and all the secure telemetry modules seem to be missing something (or they haven't been updated to compile), so if you are able to test it end to end, that would be great.

Regards
Michal

On Wed, Jan 13, 2021 at 9:32 AM Chris <[hidden email]> wrote:
After reading a little about rust i think the warnings are fixed if we
replace

Err(why) => panic!("couldn't write to {}: {}", display, why.description()),

with

Err(why) => panic!("couldn't create {}: {}", display, why.to_string()),

and comment out line 33 "use std::error::Error;"

I haven't tried it yet but the description method will be hard
deprecated and must be replaced in order "why" to return a string.

Chris


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Gautier Hattenberger-3

Hello Michal,

Thanks for your help.

It seems that the rustlink tool don't compile and install hacl-c automatically. Maybe the build.rs script is not called. Any idea ?

Gautier

Le 13/01/2021 à 22:00, Michal Podhradsky a écrit :
Hi Chris, Gautier,

the key generator was depending on a repo that no longer exists. I fixed it in this PR: https://github.com/paparazzi/paparazzi/pull/2645

I haven't used paparazzi in a while, and all the secure telemetry modules seem to be missing something (or they haven't been updated to compile), so if you are able to test it end to end, that would be great.

Regards
Michal

On Wed, Jan 13, 2021 at 9:32 AM Chris <[hidden email]> wrote:
After reading a little about rust i think the warnings are fixed if we
replace

Err(why) => panic!("couldn't write to {}: {}", display, why.description()),

with

Err(why) => panic!("couldn't create {}: {}", display, why.to_string()),

and comment out line 33 "use std::error::Error;"

I haven't tried it yet but the description method will be hard
deprecated and must be replaced in order "why" to return a string.

Chris


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Michal Podhradsky
Hi Gautier,
make sure to delete Cargo.lock and do cargo clean before cargo build

Rusthacl clones hacl-c and compiles it: https://github.com/podhrmic/rusthacl/blob/master/build.rs#L9

Are you able to compile the key-generator from the command line?
Michal

On Wed, Jan 13, 2021 at 2:23 PM Gautier Hattenberger <[hidden email]> wrote:

Hello Michal,

Thanks for your help.

It seems that the rustlink tool don't compile and install hacl-c automatically. Maybe the build.rs script is not called. Any idea ?

Gautier

Le 13/01/2021 à 22:00, Michal Podhradsky a écrit :
Hi Chris, Gautier,

the key generator was depending on a repo that no longer exists. I fixed it in this PR: https://github.com/paparazzi/paparazzi/pull/2645

I haven't used paparazzi in a while, and all the secure telemetry modules seem to be missing something (or they haven't been updated to compile), so if you are able to test it end to end, that would be great.

Regards
Michal

On Wed, Jan 13, 2021 at 9:32 AM Chris <[hidden email]> wrote:
After reading a little about rust i think the warnings are fixed if we
replace

Err(why) => panic!("couldn't write to {}: {}", display, why.description()),

with

Err(why) => panic!("couldn't create {}: {}", display, why.to_string()),

and comment out line 33 "use std::error::Error;"

I haven't tried it yet but the description method will be hard
deprecated and must be replaced in order "why" to return a string.

Chris


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Chris Efstathiou
In reply to this post by Chris Efstathiou
Hi Michal, Gautier.

I will try it today and report back.

Chris.


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Chris Efstathiou
In reply to this post by Chris Efstathiou
Hi.

I tried to establish a secure datalink but during launching a secure
session (udp and serial) i git this

error

RUN '/home/hendrix/paparazzi/sw/ext/rustlink/link  --udp  -a 8 -n
secure_fixed_wing -c  -v 1.0 --ping_period 1000'
RUN '/home/hendrix/paparazzi/sw/ground_segment/tmtc/server '
RUN '/home/hendrix/paparazzi/sw/ground_segment/cockpit/gcs -layout
gcs_with_video.xml -speech  -mplayer "tv:// -tv
driver=v4l2:norm=PAL:width=720:height=576:outfmt=uyvy:device=/dev/video0:input=0:"'
RUN '/home/hendrix/paparazzi/sw/ground_segment/tmtc/messages  -c
telemetry:*'
error: manifest path `sw/ext/rustlink/Cargo.toml` does not exist

FAILED '/home/hendrix/paparazzi/sw/ext/rustlink/link' with code 101

The actual file exist in the specified directory.

Chris


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Gautier Hattenberger-3
In reply to this post by Michal Podhradsky

Hello Michal,

I made a correction in pprzlink-rust for some new field types (fixed size arrays) and now everything is compiling on the ground side. I have also implemented the RNG driver for ChibiOS (PR soon) and it is also compiling on board (and led is blinking).

But I can't get the telemetry working, it seems to be stuck in init phase:

Value for ivy_bus: 127.255.255.255:2010
Value for ping_period: 1000
Value for status_period: 5000
Value for baudrate: 57600
Value for port: "/dev/ttyACM0"
Use UDP: false
Use UDP broadcast: false
Value for remote_addr: 127.0.0.1
Value for pprzlink version: v2.0
Global message class is set to Telemetry
Sender id: ground_dl
Link name: Value for aircraft name: Some("TEST")
Value for aircraft ID: 199
Enable GEC: true
Opening /home/gautier/dev/paparazzi/var/aircrafts/TEST/ap/generated/keys_gcs.h
Starting encrypted datalink...
Broadcasting on network 127.255.255.255, port 2010
returning msg1, waiting msg2 again
returning msg1, waiting msg2 again
returning msg1, waiting msg2 again

Is it suppose to work with pprzlink v2 ? With an oscilloscope, I can see some uplink message from rustlink, but no reply at all from the autopilot apparently.

Any idea ?

Thanks

Gautier

Le 14/01/2021 à 00:59, Michal Podhradsky a écrit :
Hi Gautier,
make sure to delete Cargo.lock and do cargo clean before cargo build

Rusthacl clones hacl-c and compiles it: https://github.com/podhrmic/rusthacl/blob/master/build.rs#L9

Are you able to compile the key-generator from the command line?
Michal

On Wed, Jan 13, 2021 at 2:23 PM Gautier Hattenberger <[hidden email]> wrote:

Hello Michal,

Thanks for your help.

It seems that the rustlink tool don't compile and install hacl-c automatically. Maybe the build.rs script is not called. Any idea ?

Gautier

Le 13/01/2021 à 22:00, Michal Podhradsky a écrit :
Hi Chris, Gautier,

the key generator was depending on a repo that no longer exists. I fixed it in this PR: https://github.com/paparazzi/paparazzi/pull/2645

I haven't used paparazzi in a while, and all the secure telemetry modules seem to be missing something (or they haven't been updated to compile), so if you are able to test it end to end, that would be great.

Regards
Michal

On Wed, Jan 13, 2021 at 9:32 AM Chris <[hidden email]> wrote:
After reading a little about rust i think the warnings are fixed if we
replace

Err(why) => panic!("couldn't write to {}: {}", display, why.description()),

with

Err(why) => panic!("couldn't create {}: {}", display, why.to_string()),

and comment out line 33 "use std::error::Error;"

I haven't tried it yet but the description method will be hard
deprecated and must be replaced in order "why" to return a string.

Chris


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Gautier Hattenberger-3
In reply to this post by Michal Podhradsky

Ok, the first issue was a bug in my rng driver. But now I have some issues threads and mutex


Le 14/01/2021 à 00:59, Michal Podhradsky a écrit :
Hi Gautier,
make sure to delete Cargo.lock and do cargo clean before cargo build

Rusthacl clones hacl-c and compiles it: https://github.com/podhrmic/rusthacl/blob/master/build.rs#L9

Are you able to compile the key-generator from the command line?
Michal

On Wed, Jan 13, 2021 at 2:23 PM Gautier Hattenberger <[hidden email]> wrote:

Hello Michal,

Thanks for your help.

It seems that the rustlink tool don't compile and install hacl-c automatically. Maybe the build.rs script is not called. Any idea ?

Gautier

Le 13/01/2021 à 22:00, Michal Podhradsky a écrit :
Hi Chris, Gautier,

the key generator was depending on a repo that no longer exists. I fixed it in this PR: https://github.com/paparazzi/paparazzi/pull/2645

I haven't used paparazzi in a while, and all the secure telemetry modules seem to be missing something (or they haven't been updated to compile), so if you are able to test it end to end, that would be great.

Regards
Michal

On Wed, Jan 13, 2021 at 9:32 AM Chris <[hidden email]> wrote:
After reading a little about rust i think the warnings are fixed if we
replace

Err(why) => panic!("couldn't write to {}: {}", display, why.description()),

with

Err(why) => panic!("couldn't create {}: {}", display, why.to_string()),

and comment out line 33 "use std::error::Error;"

I haven't tried it yet but the description method will be hard
deprecated and must be replaced in order "why" to return a string.

Chris


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Michal Podhradsky
Hi Gautier, Chris,
thanks for working on it. I will peek at the rustlink implementation. Do you have a configuration I should try (preferably with NPS target)?
Regards
Michal

On Thu, Jan 14, 2021 at 6:23 AM Gautier Hattenberger <[hidden email]> wrote:

Ok, the first issue was a bug in my rng driver. But now I have some issues threads and mutex


Le 14/01/2021 à 00:59, Michal Podhradsky a écrit :
Hi Gautier,
make sure to delete Cargo.lock and do cargo clean before cargo build

Rusthacl clones hacl-c and compiles it: https://github.com/podhrmic/rusthacl/blob/master/build.rs#L9

Are you able to compile the key-generator from the command line?
Michal

On Wed, Jan 13, 2021 at 2:23 PM Gautier Hattenberger <[hidden email]> wrote:

Hello Michal,

Thanks for your help.

It seems that the rustlink tool don't compile and install hacl-c automatically. Maybe the build.rs script is not called. Any idea ?

Gautier

Le 13/01/2021 à 22:00, Michal Podhradsky a écrit :
Hi Chris, Gautier,

the key generator was depending on a repo that no longer exists. I fixed it in this PR: https://github.com/paparazzi/paparazzi/pull/2645

I haven't used paparazzi in a while, and all the secure telemetry modules seem to be missing something (or they haven't been updated to compile), so if you are able to test it end to end, that would be great.

Regards
Michal

On Wed, Jan 13, 2021 at 9:32 AM Chris <[hidden email]> wrote:
After reading a little about rust i think the warnings are fixed if we
replace

Err(why) => panic!("couldn't write to {}: {}", display, why.description()),

with

Err(why) => panic!("couldn't create {}: {}", display, why.to_string()),

and comment out line 33 "use std::error::Error;"

I haven't tried it yet but the description method will be hard
deprecated and must be replaced in order "why" to return a string.

Chris


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Chris Efstathiou
In reply to this post by Chris Efstathiou
I deleted the cargo.lock file and thing started to improve, no errors
but i don't have telemetry.

One question that bothers me is how can i tell if i am using messages v1
or v2 on the aircraft side?

Here is the output i get


RUN '/home/hendrix/paparazzi/sw/ext/rustlink/link  --udp
--udp_broadcast  -a 8 -n secure_fixed_wing -c  -v 1.0 --ping_period 1000'
RUN '/home/hendrix/paparazzi/sw/ground_segment/tmtc/server '
RUN '/home/hendrix/paparazzi/sw/ground_segment/cockpit/gcs -layout
gcs_with_video.xml -speech  -mplayer "tv:// -tv
driver=v4l2:norm=PAL:width=720:height=576:outfmt=uyvy:device=/dev/video0:input=0:"'
RUN '/home/hendrix/paparazzi/sw/ground_segment/tmtc/messages  -c
telemetry:*'
warning: trait objects without an explicit `dyn` are deprecated
   --> src/comms.rs:70:37
    |
70 | ) -> Result<serial::SystemPort, Box<Error>> {
    |                                     ^^^^^ help: use `dyn`: `dyn Error`
    |
    = note: `#[warn(bare_trait_objects)]` on by default

warning: trait objects without an explicit `dyn` are deprecated
    --> src/comms.rs:101:65
     |
101 |     pub fn new(config: Arc<LinkConfig>) -> Result<LinkComm,
Box<Error>> {
| ^^^^^ help: use `dyn`: `dyn Error`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/ivy.rs:87:33
    |
87 |             let boxed_cb: Box<(Box<Fn(&mut LinkIvyPing,
Vec<String>)>, &mut LinkIvyPing)> =
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Fn(&mut
LinkIvyPing, Vec<String>)`

warning: trait objects without an explicit `dyn` are deprecated
    --> src/ivy.rs:149:33
     |
149 |             let boxed_cb: Box<(Box<Fn(&mut LinkIvySubscriber,
Vec<String>)>, &mut LinkIvySubscriber)> =
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn
Fn(&mut LinkIvySubscriber, Vec<String>)`

warning: trait objects without an explicit `dyn` are deprecated
    --> src/ivy.rs:176:28
     |
176 |     let payload: &mut (Box<Fn(&mut LinkIvyPing, Vec<String>) ->
()>, &mut LinkIvyPing) =
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn
Fn(&mut LinkIvyPing, Vec<String>) -> ()`

warning: trait objects without an explicit `dyn` are deprecated
    --> src/ivy.rs:194:28
     |
194 |     let payload: &mut (Box<Fn(&mut LinkIvySubscriber, Vec<String>)
-> ()>, &mut LinkIvySubscriber) =
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`:
`dyn Fn(&mut LinkIvySubscriber, Vec<String>) -> ()`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/main.rs:47:21
    |
47 | ) -> Result<(), Box<Error>> {
    |                     ^^^^^ help: use `dyn`: `dyn Error`

warning: trait objects without an explicit `dyn` are deprecated
    --> src/main.rs:193:21
     |
193 | ) -> Result<(), Box<Error>> {
     |                     ^^^^^ help: use `dyn`: `dyn Error`

warning: trait objects without an explicit `dyn` are deprecated
    --> src/main.rs:355:55
     |
355 | fn thread_ivy_main(ivy_bus: String) -> Result<(), Box<Error>> {
     |                                                       ^^^^^ help:
use `dyn`: `dyn Error`

warning: variable does not need to be mutable
    --> src/main.rs:241:21
     |
241 |                 let mut buf = new_msg.to_bytes();
     |                     ----^^^
     |                     |
     |                     help: remove this `mut`
     |
     = note: `#[warn(unused_mut)]` on by default

warning: variable does not need to be mutable
    --> src/configs.rs:236:20
     |
236 |                         let mut data: Vec<&str> = data.split(|c| c
== ',' || c == '{' || c == '}').collect();
     |                             ----^^^^
     |                             |
     |                             help: remove this `mut`

warning: variable does not need to be mutable
    --> src/configs.rs:258:20
     |
258 |                         let mut data: Vec<&str> = data.split(|c| c
== ',' || c == '{' || c == '}').collect();
     |                             ----^^^^
     |                             |
     |                             help: remove this `mut`

warning: variable does not need to be mutable
    --> src/configs.rs:279:20
     |
279 |                         let mut data: Vec<&str> = data.split(|c| c
== ',' || c == '{' || c == '}').collect();
     |                             ----^^^^
     |                             |
     |                             help: remove this `mut`

warning: 13 warnings emitted

     Finished release [optimized] target(s) in 0.02s
      Running `paparazzi/sw/ext/rustlink/target/release/rustlink --udp
--udp_broadcast -a 8 -n secure_fixed_wing -c -v 1.0 --ping_period 1000`
Value for ivy_bus: 127.255.255.255:2010
Value for ping_period: 1000
Value for status_period: 5000
Value for baudrate: 9600
Value for port: "/dev/ttyUSB0"
Use UDP: true
Use UDP broadcast: true
Value for remote_addr: 127.0.0.1
Value for pprzlink version: v1.0
Global message class is set to Telemetry
Sender id: ground_dl
Link name:
Value for aircraft name: Some("secure_fixed_wing")
Value for aircraft ID: 8
Enable GEC: true
Opening
/home/hendrix/paparazzi/var/aircrafts/secure_fixed_wing/ap/generated/keys_gcs.h
Starting encrypted datalink...
returning msg1, waiting msg2

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section
again returning msg1, waiting msg2
again returning msg1, waiting msg2


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Michal Podhradsky
Hi, I got it to work in NPS, added more info in https://github.com/paparazzi/paparazzi/pull/2646 - especially the note about timing.

Chris, to your question - the secure link is by default started with `/paparazzi/sw/ext/rustlink/link  --udp  -a 1 -n Minion_RP3 -c  -v 2.0` so Pprzlink v2.0
You can change it to 1.0 if needed. 

Michal


On Thu, Jan 14, 2021 at 9:26 AM Chris <[hidden email]> wrote:
I deleted the cargo.lock file and thing started to improve, no errors
but i don't have telemetry.

One question that bothers me is how can i tell if i am using messages v1
or v2 on the aircraft side?

Here is the output i get


RUN '/home/hendrix/paparazzi/sw/ext/rustlink/link  --udp
--udp_broadcast  -a 8 -n secure_fixed_wing -c  -v 1.0 --ping_period 1000'
RUN '/home/hendrix/paparazzi/sw/ground_segment/tmtc/server '
RUN '/home/hendrix/paparazzi/sw/ground_segment/cockpit/gcs -layout
gcs_with_video.xml -speech  -mplayer "tv:// -tv
driver=v4l2:norm=PAL:width=720:height=576:outfmt=uyvy:device=/dev/video0:input=0:"'
RUN '/home/hendrix/paparazzi/sw/ground_segment/tmtc/messages  -c
telemetry:*'
warning: trait objects without an explicit `dyn` are deprecated
   --> src/comms.rs:70:37
    |
70 | ) -> Result<serial::SystemPort, Box<Error>> {
    |                                     ^^^^^ help: use `dyn`: `dyn Error`
    |
    = note: `#[warn(bare_trait_objects)]` on by default

warning: trait objects without an explicit `dyn` are deprecated
    --> src/comms.rs:101:65
     |
101 |     pub fn new(config: Arc<LinkConfig>) -> Result<LinkComm,
Box<Error>> {
| ^^^^^ help: use `dyn`: `dyn Error`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/ivy.rs:87:33
    |
87 |             let boxed_cb: Box<(Box<Fn(&mut LinkIvyPing,
Vec<String>)>, &mut LinkIvyPing)> =
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Fn(&mut
LinkIvyPing, Vec<String>)`

warning: trait objects without an explicit `dyn` are deprecated
    --> src/ivy.rs:149:33
     |
149 |             let boxed_cb: Box<(Box<Fn(&mut LinkIvySubscriber,
Vec<String>)>, &mut LinkIvySubscriber)> =
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn
Fn(&mut LinkIvySubscriber, Vec<String>)`

warning: trait objects without an explicit `dyn` are deprecated
    --> src/ivy.rs:176:28
     |
176 |     let payload: &mut (Box<Fn(&mut LinkIvyPing, Vec<String>) ->
()>, &mut LinkIvyPing) =
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn
Fn(&mut LinkIvyPing, Vec<String>) -> ()`

warning: trait objects without an explicit `dyn` are deprecated
    --> src/ivy.rs:194:28
     |
194 |     let payload: &mut (Box<Fn(&mut LinkIvySubscriber, Vec<String>)
-> ()>, &mut LinkIvySubscriber) =
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`:
`dyn Fn(&mut LinkIvySubscriber, Vec<String>) -> ()`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/main.rs:47:21
    |
47 | ) -> Result<(), Box<Error>> {
    |                     ^^^^^ help: use `dyn`: `dyn Error`

warning: trait objects without an explicit `dyn` are deprecated
    --> src/main.rs:193:21
     |
193 | ) -> Result<(), Box<Error>> {
     |                     ^^^^^ help: use `dyn`: `dyn Error`

warning: trait objects without an explicit `dyn` are deprecated
    --> src/main.rs:355:55
     |
355 | fn thread_ivy_main(ivy_bus: String) -> Result<(), Box<Error>> {
     |                                                       ^^^^^ help:
use `dyn`: `dyn Error`

warning: variable does not need to be mutable
    --> src/main.rs:241:21
     |
241 |                 let mut buf = new_msg.to_bytes();
     |                     ----^^^
     |                     |
     |                     help: remove this `mut`
     |
     = note: `#[warn(unused_mut)]` on by default

warning: variable does not need to be mutable
    --> src/configs.rs:236:20
     |
236 |                         let mut data: Vec<&str> = data.split(|c| c
== ',' || c == '{' || c == '}').collect();
     |                             ----^^^^
     |                             |
     |                             help: remove this `mut`

warning: variable does not need to be mutable
    --> src/configs.rs:258:20
     |
258 |                         let mut data: Vec<&str> = data.split(|c| c
== ',' || c == '{' || c == '}').collect();
     |                             ----^^^^
     |                             |
     |                             help: remove this `mut`

warning: variable does not need to be mutable
    --> src/configs.rs:279:20
     |
279 |                         let mut data: Vec<&str> = data.split(|c| c
== ',' || c == '{' || c == '}').collect();
     |                             ----^^^^
     |                             |
     |                             help: remove this `mut`

warning: 13 warnings emitted

     Finished release [optimized] target(s) in 0.02s
      Running `paparazzi/sw/ext/rustlink/target/release/rustlink --udp
--udp_broadcast -a 8 -n secure_fixed_wing -c -v 1.0 --ping_period 1000`
Value for ivy_bus: 127.255.255.255:2010
Value for ping_period: 1000
Value for status_period: 5000
Value for baudrate: 9600
Value for port: "/dev/ttyUSB0"
Use UDP: true
Use UDP broadcast: true
Value for remote_addr: 127.0.0.1
Value for pprzlink version: v1.0
Global message class is set to Telemetry
Sender id: ground_dl
Link name:
Value for aircraft name: Some("secure_fixed_wing")
Value for aircraft ID: 8
Enable GEC: true
Opening
/home/hendrix/paparazzi/var/aircrafts/secure_fixed_wing/ap/generated/keys_gcs.h
Starting encrypted datalink...
returning msg1, waiting msg2

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section
again returning msg1, waiting msg2
again returning msg1, waiting msg2


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Chris Efstathiou
In reply to this post by Chris Efstathiou
Hi Michal

I tried both v1 and v2 but the outcome is the same it does not establish
a link

Here is the output i constantly get minus the warnings:

     Finished release [optimized] target(s) in 0.03s
      Running `paparazzi/sw/ext/rustlink/target/release/rustlink --udp
--udp_broadcast -a 8 -n secure_fixed_wing -c -v 2.0`
Value for ivy_bus: 127.255.255.255:2010
Value for ping_period: 1000
Value for status_period: 5000
Value for baudrate: 9600
Value for port: "/dev/ttyUSB0"
Use UDP: true
Use UDP broadcast: true
Value for remote_addr: 127.0.0.1
Value for pprzlink version: v2.0
Global message class is set to Telemetry
Sender id: ground_dl
Link name:
Value for aircraft name: Some("secure_fixed_wing")
Value for aircraft ID: 8
Enable GEC: true
Opening
/home/hendrix/paparazzi/var/aircrafts/secure_fixed_wing/ap/generated/keys_gcs.h
Starting encrypted datalink...

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section

Warning: 'modules' node is deprecated, please move modules to 'firmware'
section
returning msg1, waiting msg2
again returning msg1, waiting msg2


<<

Chris, to your question - the secure link is by default started with
`/paparazzi/sw/ext/rustlink/link  --udp  -a 1 -n Minion_RP3 -c  -v 2.0`
so Pprzlink v2.0
You can change it to 1.0 if needed.

Michal

 >>


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: paparazzi secure datalink compile errors.

Gautier Hattenberger-3
In reply to this post by Michal Podhradsky

Hi,

I have only tested on real board so far, with ChibiOS. Once I got the RNG driver working, I found an error about Mutex. I can see that the gec transport is using a Mutex, but this is probably related to your implementation of ChibiOS in Paparazzi, Michal, because with the current uart driver, this is making a conflict. Actually, I think it should be removed for the current master branch (note that it doesn't affect nps and stm32 arch).

My latest problem when leaving the lab was that once the connection is established with rustlink, the MCU stops soon after because of stack overflow. Michal, do you have an idea about the actual memory usage of this algo ? Sometimes, it works a little before crashing, so the encryption part should be fine.

Gautier

Le 14/01/2021 à 17:43, Michal Podhradsky a écrit :
Hi Gautier, Chris,
thanks for working on it. I will peek at the rustlink implementation. Do you have a configuration I should try (preferably with NPS target)?
Regards
Michal

On Thu, Jan 14, 2021 at 6:23 AM Gautier Hattenberger <[hidden email]> wrote:

Ok, the first issue was a bug in my rng driver. But now I have some issues threads and mutex


Le 14/01/2021 à 00:59, Michal Podhradsky a écrit :
Hi Gautier,
make sure to delete Cargo.lock and do cargo clean before cargo build

Rusthacl clones hacl-c and compiles it: https://github.com/podhrmic/rusthacl/blob/master/build.rs#L9

Are you able to compile the key-generator from the command line?
Michal

On Wed, Jan 13, 2021 at 2:23 PM Gautier Hattenberger <[hidden email]> wrote:

Hello Michal,

Thanks for your help.

It seems that the rustlink tool don't compile and install hacl-c automatically. Maybe the build.rs script is not called. Any idea ?

Gautier

Le 13/01/2021 à 22:00, Michal Podhradsky a écrit :
Hi Chris, Gautier,

the key generator was depending on a repo that no longer exists. I fixed it in this PR: https://github.com/paparazzi/paparazzi/pull/2645

I haven't used paparazzi in a while, and all the secure telemetry modules seem to be missing something (or they haven't been updated to compile), so if you are able to test it end to end, that would be great.

Regards
Michal

On Wed, Jan 13, 2021 at 9:32 AM Chris <[hidden email]> wrote:
After reading a little about rust i think the warnings are fixed if we
replace

Err(why) => panic!("couldn't write to {}: {}", display, why.description()),

with

Err(why) => panic!("couldn't create {}: {}", display, why.to_string()),

and comment out line 33 "use std::error::Error;"

I haven't tried it yet but the description method will be hard
deprecated and must be replaced in order "why" to return a string.

Chris


_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel