10 posts / 0 new
Last post
罗伊诺维
Offline
Last seen:3年7个月前
加入:2015-11-04 18:11
dsps uuid adv

hello
i am using the dsps device and host (da1458)
我想知道where in the dsps_device code can i find the uuid that is advertised by dsps_device (which i can see in the dsps iphone app : DA:3CB1DKFR-RRJF-........)
tnx

设备:
Gongyu_Dialog
Offline
Last seen:5天21小时前
加入:2016-04-27 07:07
Check in the file sps_serverc

Check in the file sps_serverc.c , search "SPS_SERVICE_UUID"....

罗伊诺维
Offline
Last seen:3年7个月前
加入:2015-11-04 18:11
i found it in sps_server.h,

i found it in sps_server.h, not in sps_server.c
但其:#define SPS_SERVICE_UUID{0xb7、0x5c、0x49、0xd2、0x04、0xa3、0x40、0x71、0xa0、0xb5、0x35、0x85、0x3e、0xb0、0x83、0x07}
so
a)its 16 byte and not 32 like i see in the dsps app
b)its constant, but every device i have advertises different uuid.
does every module advertises its uuid or something else?
我在见e app, when i operate 2 modules, are 2 different unique strings, after the "DA:3FJCNV........"
是什么让这些字符串?
how can i copy/use these strings? is there an api command to copy them?

MT_dialog
Offline
Last seen:2 weeks 12 hours ago
Staff
加入:2015-06-08 11:34
嗨roinovi,

嗨roinovi,

dsp的UUID是128位的,因为它是一个自定义配置文件,广告字符串中的UUID应该是这个特定的UUID,以便指示设备实现特定的配置文件。您应该在广告消息中看到的字符串就是您所指示的字符串。你的意思是,当你在不同的设备上下载相同的固件时,广告字符串会发生变化?没有特定的api来用adv数据填充广告字符串,您可以检查DSPS sdk3中的app\u adv\u func以查看当前应用程序是如何完成的。请检查APP\u DFLT\u ADV\u数据,这是填充广告字符串的定义。

Thanks MT_dialog

罗伊诺维
Offline
Last seen:3年7个月前
加入:2015-11-04 18:11
what i mean is that i need a

我的意思是,我需要一个不同设备的唯一id
i thought that the advertising string is compiled out of a mac address for each device to make it unique.
因为当我打开两台设备,打开dsps iphone应用程序时,我看到两台设备,但每台都有不同的32个字符串
我想知道
1)what does it symbols?
2)how it is populated (different string for each device) is it based on a mac? or a different unique identifier?
3) 如何使用此唯一标识符?它是否保存在我可以使用的字符串中?
我在APPŠDFLTŠADVŠDATA中看到它只是一个Šdefine APPŠDFLTŠADVŠDATA“\x11\x07\xb7\x5c\x49\xd2\x04\xa3\x40\x71\xa0\xb5\x35\x85\x3e\xb0\x83\x07”
so how does a unique identifier is made for each device?

i am missing something

MT_dialog
Offline
Last seen:2 weeks 12 hours ago
Staff
加入:2015-06-08 11:34
嗨roinovi,

嗨roinovi,

The unique id for the device has nothing to do with the advertising string of the device that advertises. The unique advestising id is the bd address that each device has. There are a number of ways to provide a unique id to your 580 based device. You can either set it by firmware through the nvds structure, or you can set it in the OTP NVDS. When the device boots up, the NVDS structure is populated from the OTP, and not by firmware, also you can set it in the OTP Header, the device checks if the OTP header is burned with an MAC address and if it is, it advertises with that address, if not it uses the NVDS structure. In the DSPS firmware, if there is nothing written on the OTP header the device gets its bd address from the nvds structure that is located in the nvds.c file. If you see different bd addresses for each device with the same firmware that means that the unique identifier field in the OTP Header is burned with an address.

Thanks MT_dialog

罗伊诺维
Offline
Last seen:3年7个月前
加入:2015-11-04 18:11
hello

hello
i have 2 devices as you can see in the pic attached
我没有烧录任何东西到OPT,只是通过智能代码段spi(相同的固件)定期烧录
you can see in the pic that every device has a different 32 charecters string under the advertising name (1-biobeat,2-DA1458x)
please answer my questions 1,2,3 above.
in general, i want to know how to get a unique id for each device based on its mac address (i need to incorporate this unique id to a string that i am sending-different for each device so i want to know in which variable it is stored)
what does the BD_ADD represent? is it different for each device.
tnx

Attachment:
MT_dialog
Offline
Last seen:2 weeks 12 hours ago
Staff
加入:2015-06-08 11:34
嗨roinovi,

嗨roinovi,

The android DSPS application shows the bd address of the current device not the advertising string, from the pdf that you ve send i suppose that the device you are working with is an iOS device, in iOS the phone device assigns a special UUID in every bluetooth device it gets (it doesn't show the bd address), it has nothing to do with the advertising string or the bd address its something that depends on the phone and not the DSPS application. If you run the android application you should be able to see the phone's bd address as is. You can check the advertising string of your device with a generic application.

Thanks MT_dialog

罗伊诺维
Offline
Last seen:3年7个月前
加入:2015-11-04 18:11
i am not using OTP

i am not using OTP
so the bd address for each device is set by the nvds structure in the .NVDS_TAG_BD_ADDRESS ?
so both of my devices will have the same bd address when i burn the same firmware? because by firmware the .NVDS_TAG_BD_ADDRESS = {0x01, 0x00, 0x00, 0xCA, 0xEA, 0x80},
how can i read the device's mac address?
我想为每个设备使用一个唯一的id

MT_dialog
Offline
Last seen:2 weeks 12 hours ago
Staff
加入:2015-06-08 11:34
嗨roinovi,

嗨roinovi,

Yes, if the OTP of your device is empty, the device should take the bd address of your NVDS_TAG_BD_ADDRESS, and yes your devices will have the same bd address if you burn the same firmware.
What do you mean how you can read the MAC address of your device, this is address that is used from the device as a unique address, the device by itself doesn't have any credentials to identify the device as unique when shipped out of the factory. If you mean to retrieve the bd address by the stack you can use the GAPM_GET_DEV_INFO_CMD with the GAPM_GET_DEV_BDADDR.

Thanks MT_dialog

Topic locked