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
= {(SDP_DATATYPE_UnsignedInt
| SDP_DATASIZE_32Bit
), SWAPENDIAN_32(0x00010000)};
43 ItemUUID_t UUIDList
[];
44 } PROGMEM SDP_Attribute_ServiceClassIDs
=
46 .Header
= (SDP_DATATYPE_Sequence
| SDP_DATASIZE_Variable16Bit
),
47 .Size
= SWAPENDIAN_16(sizeof(ItemUUID_t
) * 1),
50 {.Header
= (SDP_DATATYPE_UUID
| SDP_DATASIZE_128Bit
), .UUID
= {BASE_80BIT_UUID
, {0x00, 0x00, 0x00, 0x00, 0x10, 0x00}},}
58 Item16Bit_t VersionList
[];
59 } PROGMEM SDP_Attribute_Version
=
61 .Header
= (SDP_DATATYPE_Sequence
| SDP_DATASIZE_Variable8Bit
),
62 .Size
= (sizeof(Item16Bit_t
) * 1),
65 {.Header
= (SDP_DATATYPE_UnsignedInt
| SDP_DATASIZE_16Bit
), .Value
= SWAPENDIAN_16(0x0100)}
74 } PROGMEM SDP_Attribute_ServiceName
=
76 .Header
= (SDP_DATATYPE_String
| SDP_DATASIZE_Variable8Bit
),
77 .Size
= sizeof("SDP") - 1,
86 } PROGMEM SDP_Attribute_ServiceDescription
=
88 .Header
= (SDP_DATATYPE_String
| SDP_DATASIZE_Variable8Bit
),
89 .Size
= sizeof("Service Discovery Protocol Server") - 1,
90 .Text
= "Service Discovery Protocol Server",
93 /** Service Discovery Protocol attribute table, listing all supported attributes of the service. */
94 const ServiceAttributeTable_t SDP_Attribute_Table
[] PROGMEM
=
96 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICERECORDHANDLE
, .Data
= &SDP_Attribute_ServiceHandle
},
97 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICECLASSIDS
, .Data
= &SDP_Attribute_ServiceClassIDs
},
98 {.AttributeID
= SDP_ATTRIBUTE_ID_VERSION
, .Data
= &SDP_Attribute_Version
},
99 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICENAME
, .Data
= &SDP_Attribute_ServiceName
},
100 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICEDESCRIPTION
, .Data
= &SDP_Attribute_ServiceDescription
},
102 SERVICE_ATTRIBUTE_TABLE_TERMINATOR
109 } PROGMEM RFCOMM_Attribute_ServiceHandle
= {(SDP_DATATYPE_UnsignedInt
| SDP_DATASIZE_32Bit
), SWAPENDIAN_32(0x00010001)};
115 ItemUUID_t UUIDList
[];
116 } PROGMEM RFCOMM_Attribute_ServiceClassIDs
=
118 .Header
= (SDP_DATATYPE_Sequence
| SDP_DATASIZE_Variable16Bit
),
119 .Size
= SWAPENDIAN_16(sizeof(ItemUUID_t
) * 1),
122 {.Header
= (SDP_DATATYPE_UUID
| SDP_DATASIZE_128Bit
), .UUID
= {BASE_80BIT_UUID
, {0x00, 0x00, 0x00, 0x00, 0x11, 0x01}},}
130 Item16Bit_t OffsetList
[];
131 } PROGMEM RFCOMM_Attribute_LangOffset
=
133 .Header
= (SDP_DATATYPE_Sequence
| SDP_DATASIZE_Variable8Bit
),
134 .Size
= (sizeof(Item16Bit_t
) * 1),
137 {.Header
= (SDP_DATATYPE_UnsignedInt
| SDP_DATASIZE_16Bit
), .Value
= SWAPENDIAN_16(0x0100)}
146 } PROGMEM RFCOMM_Attribute_ServiceName
=
148 .Header
= (SDP_DATATYPE_String
| SDP_DATASIZE_Variable8Bit
),
149 .Size
= sizeof("Serial Port") - 1,
150 .Text
= "Serial Port",
158 } PROGMEM RFCOMM_Attribute_ServiceDescription
=
160 .Header
= (SDP_DATATYPE_String
| SDP_DATASIZE_Variable8Bit
),
161 .Size
= sizeof("Wireless Serial Port Service") - 1,
162 .Text
= "Wireless Serial Port Service",
165 const ServiceAttributeTable_t RFCOMM_Attribute_Table
[] PROGMEM
=
167 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICERECORDHANDLE
, .Data
= &RFCOMM_Attribute_ServiceHandle
},
168 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICECLASSIDS
, .Data
= &RFCOMM_Attribute_ServiceClassIDs
},
169 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICENAME
, .Data
= &RFCOMM_Attribute_ServiceName
},
170 {.AttributeID
= SDP_ATTRIBUTE_ID_SERVICEDESCRIPTION
, .Data
= &RFCOMM_Attribute_ServiceDescription
},
172 SERVICE_ATTRIBUTE_TABLE_TERMINATOR