Troubles building Hello Drone Flight mission

Hi,

I encountered some issues building Hello Drone Flight Mission and I share the way I fixed it.
I’m under Ubuntu 20.04, Python 3.8.10.

First, pip3 install pycryptodomex installed 3.6.1.
When I ran ./build.sh -p hello-pc -t all -j, I’ve got this error :
Cryptodome.PublicKey.ECC.UnsupportedEccFeature: Unsupported ECC curve (OID: 1.3.132.0.35)

So I forced installed pip3 install pycryptodomex==3.14.1 → It fixed the first error.

Thus I got this new error :

  File "/home/cllebi/airsdk/build/dragon_buildext_sign/sign.py", line 368, in <module>
    main()
  File "/home/cllebi/airsdk/build/dragon_buildext_sign/sign.py", line 364, in main
    sign_archive(options.archive, options.name, filenames, provider, hash_func)
  File "/home/cllebi/airsdk/build/dragon_buildext_sign/sign.py", line 307, in sign_archive
    add_signature_file(archive, name, signature_contents)
  File "/home/cllebi/airsdk/build/dragon_buildext_sign/sign.py", line 282, in add_signature_file
    tarfd.add(tmpfd.name, name)
  File "/usr/lib/python3.8/tarfile.py", line 1971, in add
    self.addfile(tarinfo, f)
  File "/usr/lib/python3.8/tarfile.py", line 1993, in addfile
    buf = tarinfo.tobuf(self.format, self.encoding, self.errors)
  File "/usr/lib/python3.8/tarfile.py", line 824, in tobuf
    return self.create_ustar_header(info, encoding, errors)
  File "/usr/lib/python3.8/tarfile.py", line 843, in create_ustar_header
    return self._create_header(info, USTAR_FORMAT, encoding, errors)
  File "/usr/lib/python3.8/tarfile.py", line 938, in _create_header
    itn(info.get("uid", 0), 8, format),
  File "/usr/lib/python3.8/tarfile.py", line 217, in itn
    raise ValueError("overflow in number field")
ValueError: overflow in number field
[E] Command failed (returncode=1)

That I fixed thanks to tarfile failure with long user ID · Issue #1013 · kivy/python-for-android · GitHub → line 279 of dragon_buildext_sign/sign.py

Now I can build the Hello Drone Flight mission for simulated drone.
However, for real drone, ./build.sh -p hello-classic -t all -j seems to don’t use key.pem that I copyied to products/hello/classic/key.pem, and I get this warning during building :
**[W] No signature key configured**. Is it normal ?

Best,
Clément

1 Like

Unfortunately, even if building com.parrot.missions.samples.hello.tar.gz succeed for simulated parrot (hello-pc), I’ve got this error when trying to install it into the simulated drone from Olympe (User guide - 7.1) :

olympe.missions.ANAFI Ai 000000 - _install - 550 Server Error: Invalid Mission Signature for url: http://10.202.0.1/api/v1/mission/missions/?allow_overwrite=yes
Traceback (most recent call last):
  File "helloDrone.py", line 73, in <module>
    test_hello_mission()
  File "helloDrone.py", line 29, in test_hello_mission
    assert hello.install(allow_overwrite=True)
AssertionError

I succeed to install with ./build.sh -p hello-pc -t sync --unsigned --reboot but not with Olympe. Trying to upload mission from http://10.202.0.1/#/ got same error (550)

Any idea ?

When I try to install mission into the drone from Olympe, the drone’s log are :

Connected: <fsup.message_center.airsdk_channel.AirSdkChannel object at 0x7f0ff5073b38>
01-01 01:02:32.658 I server      (webserver-347/civetweb-worker-406): http request (mission v1): PUT /api/v1/mission/missions/?allow_overwrite=yes
01-01 01:02:32.659 I mission     (webserver-347/civetweb-worker-406): Installing mission '/mnt/user-internal/missions/.tmp-uJfrct' flags=0x2
01-01 01:02:32.660 I mission     (webserver-347/civetweb-worker-406): Checking signature of 'com.parrot.missions.samples.hello'
01-01 01:02:32.660 I crypto      (webserver-347/civetweb-worker-406): files SHA512 digest 0x23aa5e15
01-01 01:02:32.660 I server      (fourasd-356)                    : Client 1 connected
01-01 01:02:32.660 I server      (fourasd-356)                    : Request 0x1000 (protocol version) with ID 0 received from client 1
01-01 01:02:32.660 I libfouras   (webserver-347/civetweb-worker-406): Server protocol revision: 1.0
01-01 01:02:32.660 I server      (fourasd-356)                    : Request 0x1002 (finish handshake) with ID 1 received from client 1
01-01 01:02:32.660 I server      (fourasd-356)                    : Client 1 has PID 347
01-01 01:02:32.660 I server      (fourasd-356)                    : Client 1 is a/an privileged user
01-01 01:02:32.660 I libfouras   (webserver-347/civetweb-worker-406): Protocol handshake complete.
01-01 01:02:32.660 I server      (fourasd-356)                    : Request 0x2000 (read Parrot firmware public key) with ID 2 received from client 1
01-01 01:02:32.663 I server      (fourasd-356)                    : Request with ID 2 for client 1 completed.
01-01 01:02:32.663 I server      (fourasd-356)                    : Request 0x2105 (scan flight mission provider keys) with ID 3 received from client 1
01-01 01:02:32.666 I server      (fourasd-356)                    : Request with ID 3 for client 1 completed.
01-01 01:02:32.666 I server      (fourasd-356)                    : Request 0x2102 (read flight mission provider public key) with ID 4 received from client 1
01-01 01:02:32.667 I server      (fourasd-356)                    : Request with ID 4 for client 1 completed.
01-01 01:02:32.667 I server      (fourasd-356)                    : Request 0x2102 (read flight mission provider public key) with ID 5 received from client 1
01-01 01:02:32.667 I server      (fourasd-356)                    : Request with ID 5 for client 1 completed.
01-01 01:02:32.667 I mission     (webserver-347/civetweb-worker-406): Public key not found in user slot
01-01 01:02:32.667 I server      (fourasd-356)                    : Client 1 disconnected
01-01 01:02:32.667 E module_mission(webserver-347/civetweb-worker-406): mission_install_now:329: mission_mngr_install err=13(Permission denied)

What I understand is a Public Key error.
When I added the key with dragon_buildext_mission, here were the logs :

./build/dragon_buildext_mission/manage_keys.py --add-key fm-provider-public-key.pem
INFO:root:Retrieving drone serial number
INFO:root:-> 000000000000000000
INFO:root:Creating temporary APC user and authentication token
INFO:root:Generating challenge
INFO:root:Sending challenge to drone
ERROR:root:Exception occured: 404 Client Error: Not Found for url: http://anafi-ai.local:80/api/v1/secure-element/sign_challenge?operation=get_secret&challenge=iwolxHnzEwmKW%21iZa%2CBV0PBfaVfB-w.kkt%21%2CBiRSseSxC%2B%3DR1i%21YemzuddwrWe%3BJa1jvLEjmS1pREw32a

Any idea to fix the url not found in simulated drone ?

Best,
Clément

I just read how to use mission with simulated drone here : How to use AirSDK missions - 2.7

May be it’s not possible to use Olympe to load mission onboard of simulated drone ? Just usefull for real drone ? If so, it could be good to add this information in User guide - 7.1

Hello,

It is possible to communicate and load/activate a mission via Olympe. For example, here is the example for the hello mission: User guide - 7.7

The issue is related to the signature used to sign the archive for the simulated drone. It must use the local key.pem present in product/hello/pc/.

The documentation will be updated (today or tomorrow) for the 7.2.2 release with the following explanations:

Thanks,

Updated on production website (7.2 version):

https://developer.parrot.com/docs/airsdk/general/sample_hello.html#security-setup

1 Like

Awesome ! Thanks @Ronan !!

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