---
name: "kdk_bluetooth_get_dev_version"
section: "3"
platform: "linux"
package: "libkysdk-system"
version: "3.0.1.4-1"
release: "Arch Linux 2026-11-07"
platforms: ["linux"]
url: "https://carta.tech/man/kdk_bluetooth_get_dev_version"
---

# kdk\_bluetooth\_get\_dev\_version(3)

获取蓝牙的设备id

## NAME

kdk\_bluetooth\_get\_dev\_version - 获取蓝牙的设备id

## SYNOPSIS

```
#include <libkybluetooth.h>

extern char* kdk_bluetooth_get_dev_version(int num);

Link with -lkybluetooth.
```

## Detailed Description

The main function of the interface is to obtain the device version of Bluetooth.

The argument *num* is the number of Bluetooth devices, starting from 0, 0 represents 1, and so on.

## RETURN VALUE

On success, returns the device Bluetooth version of type char\*; The returned string needs to be released by *free*

On error, return **NULL.**

## EXAMPLES

```
#include "libkybluetooth.h"
#include <stdio.h>
#include <stdlib.h>
int main()
{
    int i = 0;
    char *manufacturer = " ";
    char *version = " ";
    char *name = " ";
    char *address = " ";
    char *link_mode  =" ";
    char *link_policy =" ";
    char *scomtu = " ";
    char *alcmtu = " ";
    char *packettype = " ";
    char *features = " ";
    char *bus = " ";
    int **id = kdk_bluetooth_get_device_id();
    do
    {
        printf("id = %d0,id[i]);
        manufacturer = kdk_bluetooth_get_manufacturer(i);
        printf("manufacturer: %s0, manufacturer);
        free(manufacturer);
        version = kdk_bluetooth_get_dev_version(i);
        printf("version: %s0, version);
        free(version);
        name = kdk_bluetooth_get_name(id[i]);
        printf("name: %s0, name);
        address = kdk_bluetooth_get_address(id[i]);
        printf("address: %s0, address);
        link_mode = kdk_bluetooth_get_link_mode(id[i]);
        printf("link_mode: %s0, link_mode);
        link_policy = kdk_bluetooth_get_link_policy(id[i]);
        printf("link_policy: %s0, link_policy);
        scomtu = kdk_bluetooth_get_scomtu(id[i]);
        printf("scomtu: %s0, scomtu);
        alcmtu = kdk_bluetooth_get_alcmtu(id[i]);
        printf("alcmtu: %s0, alcmtu);
        packettype = kdk_bluetooth_get_packettype(id[i]);
        printf("packettype: %s0, packettype);
        features = kdk_bluetooth_get_features(id[i]);
        printf("features: %s0, features);
        bus = kdk_bluetooth_get_bus(id[i]);
        printf("bus: %s0, bus);
        i++;
    }while(id[i]);
    return 0;
}
```

## CONFORMING TO

These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: **kdk\_bluetooth\_get\_device\_id**(), **kdk\_bluetooth\_get\_manufacturer**(), **kdk\_bluetooth\_get\_name**(), **kdk\_bluetooth\_get\_address**(), **kdk\_bluetooth\_get\_link\_mode**(), **kdk\_bluetooth\_get\_link\_policy**(), **kdk\_bluetooth\_get\_bus**(), **kdk\_bluetooth\_get\_scomtu**(), **kdk\_bluetooth\_get\_alcmtu**(), **kdk\_bluetooth\_get\_packettype**() and **kdk\_bluetooth\_get\_features**().

## SEE ALSO

[**kdk\_bluetooth\_get\_device\_id**(3)](/man/kdk_bluetooth_get_device_id/3.md), [**kdk\_bluetooth\_get\_manufacturer**(3)](/man/kdk_bluetooth_get_manufacturer/3.md), [**kdk\_bluetooth\_get\_name**(3)](/man/kdk_bluetooth_get_name/3.md), [**kdk\_bluetooth\_get\_address**(3)](/man/kdk_bluetooth_get_address/3.md), [**kdk\_bluetooth\_get\_link\_mode**(3)](/man/kdk_bluetooth_get_link_mode/3.md), [**kdk\_bluetooth\_get\_link\_policy**(3)](/man/kdk_bluetooth_get_link_policy/3.md), [**kdk\_bluetooth\_get\_bus**(3)](/man/kdk_bluetooth_get_bus/3.md), [**kdk\_bluetooth\_get\_scomtu**(3)](/man/kdk_bluetooth_get_scomtu/3.md), [**kdk\_bluetooth\_get\_alcmtu**(3)](/man/kdk_bluetooth_get_alcmtu/3.md), [**kdk\_bluetooth\_get\_packettype**(3)](/man/kdk_bluetooth_get_packettype/3.md) and [**kdk\_bluetooth\_get\_features**(3)](/man/kdk_bluetooth_get_features/3.md).
