3 Copyright (C) Dean Camera, 2010.
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
10 Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
12 Permission to use, copy, modify, distribute, and sell this
13 software and its documentation for any purpose is hereby granted
14 without fee, provided that the above copyright notice appear in
15 all copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
31 #include "SDPServices.h"
37 } PROGMEM SDP_Attribute_ServiceHandle
=
39 (SDP_DATATYPE_UnsignedInt
| SDP_DATASIZE_32Bit
),
40 SWAPENDIAN_32(0x00010000),
47 ItemUUID_t UUIDList
[];
48 } PROGMEM SDP_Attribute_ServiceClassIDs
=
50 (SDP_DATATYPE_Sequence
| SDP_DATASIZE_Variable16Bit
),
51 SWAPENDIAN_16(sizeof(ItemUUID_t
) * 1),
53 {(SDP_DATATYPE_UUID
| SDP_DATASIZE_128Bit
), {BASE_80BIT_UUID
, {0x00, 0x00, 0x00, 0x00, 0x10, 0x00}}}
61 ItemProtocol_t ProtocolList
[];
62 } PROGMEM SDP_Attribute_ProtocolDescriptor
=
64 (SDP_DATATYPE_Sequence
| SDP_DATASIZE_Variable16Bit
),
65 SWAPENDIAN_16(sizeof(ItemProtocol_t
) * 1),
68 (SDP_DATATYPE_Sequence
| SDP_DATASIZE_Variable8Bit
),
70 {(SDP_DATATYPE_UUID
| SDP_DATASIZE_128Bit
), {BASE_80BIT_UUID
, {0x00, 0x00, 0x00, 0x00, 0x01, 0x00}}},
79 Item16Bit_t VersionList
[];
80 } PROGMEM SDP_Attribute_Version
=
82 (SDP_DATATYPE_Sequence
| SDP_DATASIZE_Variable8Bit
),
83 (sizeof(Item16Bit_t
) * 1),
85 {(SDP_DATATYPE_UnsignedInt
| SDP_DATASIZE_16Bit
), SWAPENDIAN_16(0x0100)}
94 } PROGMEM SDP_Attribute_ServiceName
=
96 (SDP_DATATYPE_String
| SDP_DATASIZE_Variable8Bit
),
106 } PROGMEM SDP_Attribute_ServiceDescription
=
108 (SDP_DATATYPE_String
| SDP_DATASIZE_Variable8Bit
),
109 (sizeof("Service Discovery Protocol Server") - 1),
110 "Service Discovery Protocol Server",
113 /** Service Discovery Protocol attribute table, listing all supported attributes of the service. */
114 const ServiceAttributeTable_t SDP_Attribute_Table
[] PROGMEM
=
116 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICERECORDHANDLE
, .Data
= &SDP_Attribute_ServiceHandle
},
117 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICECLASSIDS
, .Data
= &SDP_Attribute_ServiceClassIDs
},
118 // {.AttributeID = SDP_ATTRIBUTE_ID_PROTOCOLDESCRIPTORLIST, .Data = &SDP_Attribute_ProtocolDescriptor },
119 {.AttributeID
= SDP_ATTRIBUTE_ID_VERSION
, .Data
= &SDP_Attribute_Version
},
120 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICENAME
, .Data
= &SDP_Attribute_ServiceName
},
121 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICEDESCRIPTION
, .Data
= &SDP_Attribute_ServiceDescription
},
123 SERVICE_ATTRIBUTE_TABLE_TERMINATOR
130 } PROGMEM RFCOMM_Attribute_ServiceHandle
=
132 (SDP_DATATYPE_UnsignedInt
| SDP_DATASIZE_32Bit
),
133 SWAPENDIAN_32(0x00010001),
140 ItemUUID_t UUIDList
[];
141 } PROGMEM RFCOMM_Attribute_ServiceClassIDs
=
143 (SDP_DATATYPE_Sequence
| SDP_DATASIZE_Variable16Bit
),
144 SWAPENDIAN_16(sizeof(ItemUUID_t
) * 1),
146 {(SDP_DATATYPE_UUID
| SDP_DATASIZE_128Bit
), {BASE_80BIT_UUID
, {0x00, 0x00, 0x00, 0x00, 0x11, 0x01}}}
154 Item16Bit_t OffsetList
[];
155 } PROGMEM RFCOMM_Attribute_LangOffset
=
157 (SDP_DATATYPE_Sequence
| SDP_DATASIZE_Variable8Bit
),
158 (sizeof(Item16Bit_t
) * 1),
160 {(SDP_DATATYPE_UnsignedInt
| SDP_DATASIZE_16Bit
), SWAPENDIAN_16(0x0100)}
169 } PROGMEM RFCOMM_Attribute_ServiceName
=
171 (SDP_DATATYPE_String
| SDP_DATASIZE_Variable8Bit
),
172 sizeof("Serial Port") - 1,
181 } PROGMEM RFCOMM_Attribute_ServiceDescription
=
183 (SDP_DATATYPE_String
| SDP_DATASIZE_Variable8Bit
),
184 sizeof("Wireless Serial Port Service") - 1,
185 "Wireless Serial Port Service",
188 const ServiceAttributeTable_t RFCOMM_Attribute_Table
[] PROGMEM
=
190 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICERECORDHANDLE
, .Data
= &RFCOMM_Attribute_ServiceHandle
},
191 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICECLASSIDS
, .Data
= &RFCOMM_Attribute_ServiceClassIDs
},
192 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICENAME
, .Data
= &RFCOMM_Attribute_ServiceName
},
193 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICEDESCRIPTION
, .Data
= &RFCOMM_Attribute_ServiceDescription
},
195 SERVICE_ATTRIBUTE_TABLE_TERMINATOR