aboutsummaryrefslogtreecommitdiff
path: root/attrib
AgeCommit message (Collapse)Author
2011-03-15Fix not returning an error when DiscoverCharacteristics() failsVinicius Costa Gomes
When the connection fails an error should be returned to inform the user. This adds a field to store the DBusMessage that caused the error, so we can send the correct reply.
2011-03-15Fix the behaviour of the DiscoverCharacteristics methodVinicius Costa Gomes
The previous behaviour could lead to some problems, as it returned as soon as possible. To avoid problems we return just after as the characteristics are discovered, and to save a few round trips we return the path of all characteristics that belong to this service. After this method return it will try to read the characteristics values.
2011-03-15Rename the Discover method to DiscoverCharacteristicsVinicius Costa Gomes
2011-03-11Add indication/notification support to interactive gatttoolSheldon Demario
2011-03-10gatttool: Add Write Without Response optionClaudio Takahasi
Sub-procedure used to write a Characteristic Value to a server when the client knows the Characteristic Value Handle and the client does not need acknowledgement.
2011-03-10Extend Characteristic Write to support Write Without ResponseClaudio Takahasi
If callback is not informed, Write Command will be used to execute a Write Without Response sub-procedure. Error is not returned by the server no matter the result of the operation.
2011-03-04Add option to pass adapter to interactive gatttoolSheldon Demario
2011-03-04Add missing const to interactive() parameter in gatttoolSheldon Demario
2011-03-04Replace all strdup() with g_strdup() in gatttoolSheldon Demario
2011-03-04Add offset option to characteristic read by handleSheldon Demario
Some tests require an arbitrary offset.
2011-02-24Remove unused MTU variable in GAttrib structBruna Moreira
The MTU variable in GAttrib struct was not being used for any operation so it should be removed.
2011-02-24Coding standard change replacing malloc by glib functionsClaudio Takahasi
Use glib memory allocation functions instead of malloc for attribute data list in ATT protocol utility functions.
2011-02-24Add sec-level option to interactive gattoolSheldon Demario
2011-02-24Add Write Request in interactive gatttoolBruna Moreira
2011-02-24Move attr_data_from_string() to utils.cBruna Moreira
The attr_data_from_string() function will be used in interactive and usual gatttool so this function was moved to common file utils.c.
2011-02-24Add characteristics read options in interactive gatttoolSheldon Demario
2011-02-24Add Characteristics Descriptor Discovery option in interactive gatttoolSheldon Demario
2011-02-24Create a helper function to deal with handles on interactive gatttoolSheldon Demario
2011-02-24gatttool: Remove extra reference to the connection IO ChannelVinicius Costa Gomes
As we want the connection to be closed when the last GAttrib reference is dropped, we don't need to keep this reference.
2011-02-24Add support for GATT client timeoutsVinicius Costa Gomes
This patch adds support to destroying the GATT connection when a GATT server doesn't respond for more than 30 seconds. A function to destroy the GAttrib is introduced and it is used in the timeout case and when the last GAttrib reference is dropped.
2011-02-24Fix gattrib.c coding styleVinicius Costa Gomes
Just remove an extra empty line.
2011-02-24Add read/write callbacks to attribute serverAnderson Lizardo
These callbacks will allow profiles to act before an attribute is read and after it is written, to e.g. update the attribute value to/from an external source. Note that by the time the callback is called, the necessary security checks (attribute permissions, authentication and encryption) were already performed by the core attribute server. The callback can optionally return an ATT status code, which will be sent to the client using an Error Response PDU.
2011-02-24Don't register GATT related SDP records if attrib server is disabledClaudio Takahasi
GATT related SDP records should not be added if "AttributeServer" option is false in the configuration file. Problem happens only when attribute plugin is enabled.
2011-02-23Fix typo on DBG() string formatAnderson Lizardo
2011-02-23Check malformed notification/indication PDUElvis Pfützenreuter
This patch implements discard of obviously malformed GATT notification/indication PDUs.
2011-02-23Add Characteristics Discovery option to interactive gatttoolSheldon Demario
2011-02-23Improve help messages in interactive gatttoolSheldon Demario
Includes the parameters info on help.
2011-02-20Add missing UUID16 field to Included Svc AttributeBrian Gix
2011-02-19Add SDP registration of Primary GATT servicesBrian Gix
Add capability to register SDP record for Primary Services.
2011-02-18Add UUID property to GATT service objectElvis Pfützenreuter
2011-02-18Add Primary Discovery Services option to interactive gatttoolSheldon Demario
2011-02-17Use PSM value to select LE or BR/EDR transport on gatttoolSheldon Demario
Removes "le" parameter of gatt_connect() as well the global variables used to store the le option. LE is now the default transport, if a PSM value different than zero is given BR/EDR will be selected
2011-02-17Move do_connect() to a common file between interactive.c and gatttool.cSheldon Demario
Since do_connect() is used in both interactive.c and gatttool.c files, it was moved to a new file that should hold all common functions
2011-02-16Fix Min MTU to reflect values for both L2CAP & LEBrian Gix
2011-02-16Fix wrong header include on interactive gatttoolClaudio Takahasi
This wrong include is triggering compiler warning: implicit declaration of function 'strdup'.
2011-02-15Add connect/disconnect options on interactive mode of gatttoolSheldon Demario
2011-02-15Add an initial interactive mode to gatttoolSheldon Demario
Mode required to allow better GATT procedures control. Some scenarios require sequential commands without disconnection and delay between operations. It is also desirable to change some connection parameters of an active connection.
2011-02-15Add Write Request operation in gatttoolBruna Moreira
Add option and callbacks for Write Request operation in gatttool.
2011-02-15Add encode/decode for write responseBruna Moreira
The encode/decode functions for Write Response operations were created to keep consistency with the rest of GATT API.
2011-02-08Fix GATT listen mode updatingAndre Dieb Martins
Update gatt's listen-mode flag whenever connect_cb() is called again.
2011-02-04Fix invalid read after list concatenationBruna Moreira
g_slist_concat uses the items from second list directly so they should not be freed.
2011-02-04Fix parameter type in att_put_u32Elvis Pfützenreuter
2011-01-21Fix incoming attrib-server connection MTUsBrian Gix
It is important for the Attribute Server to be aware of and completely fill response packets up to the full MTU when reading long attributes. Some remote devices will only request additional (READ_BLOB) data if the preceding read sent the maximum amount of data. Incoming connections are identified as L2CAP or LE by pointers to the Service IO channel the incoming connection was recieved on in the user_data parameter. L2CAP channels are set to the BR/EDR minimum MTU of 48, and LE channels to the LE payload size of 23.
2011-01-21Fix duplicate characteristicsBruna Moreira
The Discover() operation (from DBus API) was registering the same characteristics after running several times. This can be checked using test-attrib.
2011-01-20Add READ_BLOB_REQUEST support to attribute serverBrian Gix
2011-01-19Move common code from Discover all Characteristics to GATT libraryBruna Moreira
The attribute client (attrib/client.c) and gatttool share similar code to parse the PDU coming from server. This commit moves this common code to attrib/gatt.c, and simplifies the callbacks implemented by the clients. The client callbacks are now called just once and get a GSList of characteristics, instead of the raw PDU.
2011-01-19Rename gatt_primary_t to more generic nameBruna Moreira
The gatt_primary_t typedef was renamed to gatt_cb_t because it will be used for primary and characteristic callbacks.
2011-01-08Move interactive code of Discover Primary to gatt.cClaudio Takahasi
Initial patch to move the shared code related to Discover All Primary Services and Discover Primary Services by UUID to gatt.c.
2011-01-07Move GATT service to attribute server coreAnderson Lizardo
GATT service (like GAP one) should be moved to the core attribute server because there can be only one instance of it. There was a "Attribute Opcodes Supported" characteristic inside the GATT service in attrib/example.c which is not defined by the Core specification and was removed before moving the code.
2011-01-07Move GAP service registration to src/attrib-server.cAnderson Lizardo
GAP service shall be registered only once, so it makes sense to move it to the core attribute server code. The GAP "Device Name" characteristic was always "Example Device" on the example server. This has been changed to use the Name attribute from main.conf.