Welcome to our Community
Wanting to join the rest of our members? Feel free to sign up today.
Sign up

Enumerating Parrot Anafi's API endpoints (part 2 of 3)

rudispropmgmt

Member
Joined
Nov 1, 2022
Messages
7
Reaction score
8
Location
Denver, CO (USA)
Website
marcusboydresearch.wordpress.com
In the first post of this thread (here) I described how I enumerated several API endpoints of the Parrot Anafi drone & SkyController3 controller. In this post I'll share a some of the data available from the APIs. Note that this will not be an exhaustive list of each endpoint's response data.

A few Controller API Endpoints​

/drones/list​

The "/drones/list" endpoint indicates the current drone that the controller is paired with.

API Request​

http://192.168.42.47/api/v1/drones/list

API Response​

JSON:
[
    {
        "order": 1,
        "ssid": "ANAFI-J123456",
        "serial": "PI04ABCDEFGJ123456",
        "model": 2323,
        "wifi_key": "",
        "security": 1,
        "hidden": false,
        "wakeup": 0
    }
]

/info/properties​

The "/info/properties" endpoint provides information about the controller.

API Request​

http://192.168.42.47/api/v1/info/properties

API Response​

JSON:
[
    {
        "key": "persist.product.name",
        "label": "Wi-Fi Access Point",
        "value": "Skycontroller 3"
    },
    {
        "key": "ro.factory.wifi.mac_address",
        "label": "Wi-Fi MAC Address",
        "value": "A0:14:3D:HA:HA:HA"
    },
    {
        "key": "ro.product.model",
        "label": "Model",
        "value": "Skycontroller 3"
    },
    {
        "key": "ro.parrot.build.variant",
        "label": "Variant",
        "value": "linux"
    },
    {
        "key": "ro.factory.serial",
        "label": "Serial Number",
        "value": "PI0ABCDEFG8G123456"
    }
]

A few Drone API Endpoints​

/info/properties​

The "/info/properties" endpoint provides information about the drone. This is one of the few endpoints that is available on both drones.

API Request​

http://192.168.42.1/api/v1/info/properties

API Response​

JSON:
[
    {
        "key": "persist.product.name",
        "label": "Wi-Fi Access Point",
        "value": "ANAFI-J123456"
    },
    {
        "key": "ro.factory.wifi.mac_address",
        "label": "Wi-Fi MAC Address",
        "value": "90:3A:E6:HA:HA:HA"
    },
    {
        "key": "ro.product.model",
        "label": "Model",
        "value": "Anafi"
    },
    {
        "key": "ro.factory.serial",
        "label": "Serial Number",
        "value": "PI4ABCDEF8J123456"
    },
    {
        "key": "ro.parrot.build.version",
        "label": "Software Version",
        "value": "1.8.2"
    },
    {
        "key": "ro.build.date",
        "label": "Software Build Date",
        "value": "Mon Sep  6 08:50:34 UTC 2021"
    },
    {
        "key": "ro.smartbattery.serial",
        "label": "Smart Battery Serial Number",
        "value": "B123456"
    },
    {
        "key": "ro.smartbattery.usb_version",
        "label": "Smart Battery USB Version",
        "value": "0.10"
    },
    {
        "key": "ro.smartbattery.version",
        "label": "Smart Battery Software Version",
        "value": "1.1.18.0"
    }
]

/sdk/description​

The "SDK description" endpoint may be one of the more valuable endpoints when correlating events from the API with SDK (Software Development Kit). The API request for the /sdk/description endpoint will return a 184KB JSON file with 16,000 lines & 910 unique IDs. The response below is 1 of the 910 records returned.

API Request​

http://192.168.42.1/api/v1/sdk/description


API Response​

JSON:
"0x8F00002A": {
    "id": "0x8F00002A",
    "prj": "Camera",
    "cls": "Default",
    "cmd": "Start_recording",
    "args": [
        {
            "name": "Cam_id",
            "type": "u8",
            "bitfield": false
        }
    ]
}

Let's pause here & admire a few things. The above record from the "SDK Descriptions" endpoint appears to represent the "Start_recording" event from the SDK. In the previous post I mentioned recording video while Wireshark logged all traffic to & from the device. I found the message within Wireshark that corresponded to the video recording start event (scrubbed of device-specific details):

Code:
Frame 8390: 194 bytes on wire (1552 bits), 194 bytes captured (1552 bits) on interface \Device\NPF_{40F0ACBE-GUID-GUID-GUID-GUIDC66BGUID}, id 0
Ethernet II, Src: Parrot_MY:MAC:ADDR (90:3a:e6:MY:MAC:ADDR), Dst: IntelCor_41:75:ee (18:26:49:HA:HA:HA)
Internet Protocol Version 4, Src: 192.168.42.1, Dst: 192.168.42.26
Transmission Control Protocol, Src Port: 80, Dst Port: 32245, Seq: 473309, Ack: 502, Len: 140
[2 Reassembled TCP Segments (144 bytes): #8389(4), #8390(140)]
WebSocket
    1... .... = Fin: True
    .000 .... = Reserved: 0x0
    .... 0001 = Opcode: Text (1)
    0... .... = Mask: False
    .111 1110 = Payload length: 126 Extended Payload Length (16 bits)
    Extended Payload length (16 bits): 140
    Payload
Line-based text data (1 lines)
    { "name": "known_cmd_caught", "data": { "cmd": { "id": "0x8F00002A", "timestamp": "13:01:02.455", "direction": "RX", "values": [ "0" ] } } }

Note the last line of the Wireshark message has the same code ("0x8F00002A") as the record above from the SDK descriptions endpoint. We'll continue investigating this example in the next post.
 
  • Like
Reactions: Crossrich

New Posts

Members online

No members online now.

Forum statistics

Threads
5,319
Messages
44,969
Members
8,318
Latest member
eltits