10 posts / 0 new
Last post
roinovi
Offline
Last seen:3 years 7 months ago
加入:2015-11-04 18:11
dsps uuid adv

hello
i am using the dsps device and host (da1458)
i wanted to know 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

Device:
Gongyu_Dialog
Offline
Last seen:5 days 21 hours ago
加入:2016-04-27 07:07
Check in the file sps_serverc

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

roinovi
Offline
Last seen:3 years 7 months ago
加入:2015-11-04 18:11
i found it in sps_server.h,

i found it in sps_server.h, not in sps_server.c
但其:#定义SPS_SERVICE_UUID {0 xb7 0 x5c 0 x49, 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 13 hours ago
Staff
加入:2015-06-08 11:34
Hi roinovi,

Hi roinovi,

The UUID of the DSPS is a 128-bit since its a custom profile, the UUID in the advertising string should be this particular UUID in order to indicate that the device implements the specific profile. The string that you should see in the advertising message is the one that you are indicating. You mean that when you download the same fw in different devices the advertising string changes ? There is no specific api to fill in the advertising string with the adv data, you can check the app_adv_func in the DSPS sdk3 in order to see how it is done by the current application. Please check the APP_DFLT_ADV_DATA, that is the definition that populates the advertising string.

Thanks MT_dialog

roinovi
Offline
Last seen:3 years 7 months ago
加入:2015-11-04 18:11
what i mean is that i need a

what i mean is that i need a unique id for different devices
i thought that the advertising string is compiled out of a mac address for each device to make it unique.
because when i have 2 devices on, and i open up the dsps iphone app, i see 2 devices but with different 32 characters string each
i wanted to know
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)how can i use this unique identifier? is it saved in a string which i can use?
i saw in the APP_DFLT_ADV_DATA that it is just a #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 13 hours ago
Staff
加入:2015-06-08 11:34
Hi roinovi,

Hi 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

roinovi
Offline
Last seen:3 years 7 months ago
加入:2015-11-04 18:11
hello

hello
i have 2 devices as you can see in the pic attached
i did not burn nothing to the OPT, just regular burn via smart snippets spi (same firmware)
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 13 hours ago
Staff
加入:2015-06-08 11:34
Hi roinovi,

Hi 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

roinovi
Offline
Last seen:3 years 7 months ago
加入: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?
i want to use it for a unique id for each device

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

Hi 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