framework/connectivity/neard.git
11 years agobuild: Generate correct dependencies for the pkg-config file
Guillem Jover [Fri, 22 Mar 2013 11:29:25 +0000 (12:29 +0100)]
build: Generate correct dependencies for the pkg-config file

This fixes the bogus libnl dependency in the pkg-config file, and
centralizes all dependencies in configure.ac, to replace them at
configure time so that they accurately define the ones detected.
This also makes the build system future-proof against changing
dependencies in one place and not the other.

11 years agoconfigure: Add scripts/neard to the configure output
Samuel Ortiz [Fri, 22 Mar 2013 11:32:58 +0000 (12:32 +0100)]
configure: Add scripts/neard to the configure output

11 years agondef: Fix typo in unknown carrier string
Guillem Jover [Wed, 20 Mar 2013 16:39:49 +0000 (17:39 +0100)]
ndef: Fix typo in unknown carrier string

11 years agoAUTHORS: Mention Marcin's contributions
Samuel Ortiz [Wed, 20 Mar 2013 00:40:21 +0000 (01:40 +0100)]
AUTHORS: Mention Marcin's contributions

11 years agosnep: SNEP core moved from plugins to core
Marcin Małagowski [Sun, 17 Mar 2013 12:59:51 +0000 (13:59 +0100)]
snep: SNEP core moved from plugins to core

This is needed for implementing SNEP unit tests.

11 years agobuild: Install nfctool to @bin@
Samuel Ortiz [Tue, 19 Mar 2013 16:13:24 +0000 (17:13 +0100)]
build: Install nfctool to @bin@

11 years agodoc: Add nfctool manpage
Thierry Escande [Mon, 11 Mar 2013 16:55:12 +0000 (17:55 +0100)]
doc: Add nfctool manpage

11 years agonfctool: Add --version option
Thierry Escande [Mon, 11 Mar 2013 16:55:11 +0000 (17:55 +0100)]
nfctool: Add --version option

The nfctool version number is based on neard's one.

11 years agonfctype2: Get the actual tag data length when trying to write an NDEF
Samuel Ortiz [Fri, 15 Mar 2013 19:53:20 +0000 (20:53 +0100)]
nfctype2: Get the actual tag data length when trying to write an NDEF

11 years agotag: Export tag data length
Samuel Ortiz [Fri, 15 Mar 2013 19:53:06 +0000 (20:53 +0100)]
tag: Export tag data length

11 years agondef: Fix local carrier data fetching error message
Samuel Ortiz [Mon, 11 Mar 2013 14:21:37 +0000 (15:21 +0100)]
ndef: Fix local carrier data fetching error message

11 years agoRelease 0.10
Samuel Ortiz [Fri, 8 Mar 2013 09:58:32 +0000 (10:58 +0100)]
Release 0.10

11 years agobuild: Add agent-api.txt to the document files list
Samuel Ortiz [Thu, 7 Mar 2013 14:11:04 +0000 (15:11 +0100)]
build: Add agent-api.txt to the document files list

11 years agodoc: Add neard man pages
Samuel Ortiz [Thu, 7 Mar 2013 14:09:07 +0000 (15:09 +0100)]
doc: Add neard man pages

One man page for the daemon and another one for the configuration file.

11 years agobuild: Install neard back to libexec/nfc/
Samuel Ortiz [Thu, 7 Mar 2013 10:53:05 +0000 (11:53 +0100)]
build: Install neard back to libexec/nfc/

11 years agobuild: Install neard to /usr/sbin
Olivier Guiter [Mon, 4 Mar 2013 14:26:10 +0000 (15:26 +0100)]
build: Install neard to /usr/sbin

11 years agonfctool: Add Service Name Lookup support
Thierry Escande [Mon, 4 Mar 2013 13:49:18 +0000 (14:49 +0100)]
nfctool: Add Service Name Lookup support

This adds a --snl option to get the sap number for the passed service name
(i.e. urn:nfc:sn:snep). nfctool will wait until it receives a result for
all the requested services before exiting.

11 years agonfctool: Add a handler mechanism for netlink events
Thierry Escande [Mon, 4 Mar 2013 13:49:17 +0000 (14:49 +0100)]
nfctool: Add a handler mechanism for netlink events

Instead of one callback function in main.c for all netlink events, these
changes allow to register per event callback functions. this will be used
more intensively for service name lookup support.

11 years agomain: Big fat warning for netlink initialization failure
Samuel Ortiz [Mon, 4 Mar 2013 10:33:13 +0000 (11:33 +0100)]
main: Big fat warning for netlink initialization failure

11 years agosnep: Fix missing call to snep_exit
Szymon Janc [Thu, 28 Feb 2013 15:20:26 +0000 (16:20 +0100)]
snep: Fix missing call to snep_exit

snep_core should call snep_exit to unregister p2p driver.

16 bytes in 1 blocks are still reachable in loss record 31 of 153
   at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E92CA2: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E93ABD: g_slist_prepend (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4178B7: near_p2p_register (p2p.c:382)
   by 0x418DE5: snep_core_init (snep-core.c:820)
   by 0x4173BC: p2p_init (p2p.c:399)
   by 0x41FC61: __near_plugin_init (plugin.c:180)
   by 0x4092AE: main (main.c:214)

11 years agomain: Exit neard if netlink initialization failed
Szymon Janc [Thu, 28 Feb 2013 15:20:30 +0000 (16:20 +0100)]
main: Exit neard if netlink initialization failed

There is no point in going further without netlink operational.

11 years agobluetooth: Fix possible NULL pointer dereference
Szymon Janc [Thu, 28 Feb 2013 15:20:29 +0000 (16:20 +0100)]
bluetooth: Fix possible NULL pointer dereference

If DBus message allocation failed NULL pointer msg would be
passed to libdbus functions later on resulting in libdbus NULL pointer
assertion or crash.

11 years agonfctyp3: Remove set but not used variable
Szymon Janc [Thu, 28 Feb 2013 15:20:28 +0000 (16:20 +0100)]
nfctyp3: Remove set but not used variable

system_code in receive_system_code function was written but never read.

11 years agobuild: Add some missing files to .gitignore
Szymon Janc [Thu, 28 Feb 2013 15:20:27 +0000 (16:20 +0100)]
build: Add some missing files to .gitignore

Add unit test binaries to ignore list.

11 years agotest: Add wifi carrier support for handover_agent test
Ravi kumar Veeramally [Thu, 28 Feb 2013 14:01:49 +0000 (16:01 +0200)]
test: Add wifi carrier support for handover_agent test

Currently received data in PushOOB/RequestOOB is printed
and reply to RequestOOB ss generated from static data.

11 years agoorg.neard.conf: Add the HandoverAgent interface sending permissions
Ravi kumar Veeramally [Thu, 28 Feb 2013 14:01:48 +0000 (16:01 +0200)]
org.neard.conf: Add the HandoverAgent interface sending permissions

11 years agoagent: Add WSC field to handover agent API
Ravi kumar Veeramally [Thu, 28 Feb 2013 14:01:47 +0000 (16:01 +0200)]
agent: Add WSC field to handover agent API

WiFi out of band data is added to PushOOB request.
Field name is WSC. OOB data format is following the WiFi simple
configuration technical specification.

11 years agondef: Add support for multiple carriers
Ravi kumar Veeramally [Thu, 28 Feb 2013 14:01:46 +0000 (16:01 +0200)]
ndef: Add support for multiple carriers

Support for mutliple carrier handling for tag and p2p device.

In case of tag (tag with simple mime type or with static
handover data): First detects number of carriers in a tag
and try to connect/associate with carrier. If connection or
association failed then go for next carrier otherwise return
success.

In case of p2p device (either neard receiving Hr and sending Hr):
If neard receives Hr message with multiple carriers (e.g. bt and
wifi), first extracts multiple carriers data and reply back with
neard's alternative carrier capacity (e.g. It could be 'bt' or 'wifi'
or both or empty). If neard wants to negotiate handover with other
p2p device it sends Hr with available carriers (e.g. bt ot wifi or
both, if there are no carriers replies error to dbus request).
After receiving Hs from other p2p device, it tries to
connect/associate with carriers (ho agents).

11 years agondef: Add support for multiple carriers in Hr message
Ravi kumar Veeramally [Thu, 28 Feb 2013 14:01:45 +0000 (16:01 +0200)]
ndef: Add support for multiple carriers in Hr message

Added support for multiple carrriers request for Hr message. For
multiple carriers dbus request has to be comma separated strings
(e.g. bluetooth,wifi).

11 years agondef: Implement Hr message preparation routine
Ravi kumar Veeramally [Thu, 28 Feb 2013 14:01:44 +0000 (16:01 +0200)]
ndef: Implement Hr message preparation routine

To support multiple carriers in handover request message, implemented
seperate function for handover request message.

11 years agondef: Implement Hs message preparation routine
Ravi kumar Veeramally [Thu, 28 Feb 2013 14:01:43 +0000 (16:01 +0200)]
ndef: Implement Hs message preparation routine

To support multiple carriers in handover select message, implemented
seperate function for handover select message.

11 years agondef: Add helper funtions to create handover messages
Ravi kumar Veeramally [Thu, 28 Feb 2013 14:01:42 +0000 (16:01 +0200)]
ndef: Add helper funtions to create handover messages

Providing helper functions to create Hanodver select and
request messages.

11 years agondef: Return empty Hs in case of unsupported Hr version
Ravi kumar Veeramally [Thu, 28 Feb 2013 14:01:41 +0000 (16:01 +0200)]
ndef: Return empty Hs in case of unsupported Hr version

Return empty handover select message for unsupported versions of
handover request message.

Implementing separate functions for empty Hs, Hs with carriers
and Hr messages. Next patches contain these functionality.
Separating them because each message requires different
input parameters and preparation conditions. Handover message
preparation is bit different and bigger than other ndef message
types. Also handover messages contain multiple alterative
carriers, configuration messages, collision and error records.

11 years agondef: Add helper function to free ndef messages
Ravi kumar Veeramally [Thu, 28 Feb 2013 14:01:40 +0000 (16:01 +0200)]
ndef: Add helper function to free ndef messages

Added helper funtion to free ndef message structure data.
It is quite helpful to reduce code redundancy.

11 years agonfctool: Use nfc_copy.h instead of the system NFC header
Samuel Ortiz [Thu, 28 Feb 2013 11:05:07 +0000 (12:05 +0100)]
nfctool: Use nfc_copy.h instead of the system NFC header

11 years agonfctool: Move adapter related functions in one place
Thierry Escande [Fri, 22 Feb 2013 18:28:34 +0000 (19:28 +0100)]
nfctool: Move adapter related functions in one place

This moves adapter management functions in adapter.c

11 years agogdbus: Always unreference the message in g_dbus_send_message()
Tomasz Bursztyka [Fri, 8 Feb 2013 13:58:10 +0000 (15:58 +0200)]
gdbus: Always unreference the message in g_dbus_send_message()

A quick fix on g_dbus_send_message(), if check_signal() fails it returns
FALSE without unreferencing the message as it should. This patch fixes
it.

11 years agonfc_copy: Add SNL netlink API
Samuel Ortiz [Fri, 22 Feb 2013 11:19:54 +0000 (12:19 +0100)]
nfc_copy: Add SNL netlink API

11 years agonfc_copy: Add LLCP socket option names
Samuel Ortiz [Fri, 22 Feb 2013 10:51:02 +0000 (11:51 +0100)]
nfc_copy: Add LLCP socket option names

11 years agop2p: Remove client data from the server client list when channel closes
Samuel Ortiz [Thu, 21 Feb 2013 16:37:29 +0000 (17:37 +0100)]
p2p: Remove client data from the server client list when channel closes

11 years agonfctool: Close sniffer socket when getting IO errors
Samuel Ortiz [Thu, 21 Feb 2013 16:28:49 +0000 (17:28 +0100)]
nfctool: Close sniffer socket when getting IO errors

11 years agosnep-validation: Remove DBG statement from init and exit routines
Samuel Ortiz [Thu, 21 Feb 2013 11:27:23 +0000 (12:27 +0100)]
snep-validation: Remove DBG statement from init and exit routines

11 years agodevice: Do not double free the device records list
Samuel Ortiz [Fri, 15 Feb 2013 16:59:07 +0000 (17:59 +0100)]
device: Do not double free the device records list

Typo from the previous commit...

11 years agodevice: Do not open code the records freeing routine
Samuel Ortiz [Fri, 15 Feb 2013 15:25:58 +0000 (16:25 +0100)]
device: Do not open code the records freeing routine

Use near_ndef_records_free instead.

11 years agomonitor-near: Monitor Tags and Devices properties
Samuel Ortiz [Fri, 15 Feb 2013 15:24:48 +0000 (16:24 +0100)]
monitor-near: Monitor Tags and Devices properties

11 years agotag: Send PropertyChanged signal when new records are added
Samuel Ortiz [Fri, 15 Feb 2013 15:24:25 +0000 (16:24 +0100)]
tag: Send PropertyChanged signal when new records are added

11 years agodevice: Send PropertyChanged signal when new records are added
Samuel Ortiz [Fri, 15 Feb 2013 15:23:50 +0000 (16:23 +0100)]
device: Send PropertyChanged signal when new records are added

11 years agop2p: Do not try to bind if LLCP is not supported
Samuel Ortiz [Fri, 15 Feb 2013 15:15:02 +0000 (16:15 +0100)]
p2p: Do not try to bind if LLCP is not supported

11 years agogdbus: Add g_dbus_proxy_set_removed_watch
Denis Kenzior [Thu, 7 Feb 2013 16:22:57 +0000 (10:22 -0600)]
gdbus: Add g_dbus_proxy_set_removed_watch

11 years agogdbus: Fix missing PropertiesChanged signal
Vinicius Costa Gomes [Thu, 7 Feb 2013 17:40:31 +0000 (14:40 -0300)]
gdbus: Fix missing PropertiesChanged signal

If D-Bus ObjectManager is not supported, InterfacesAdded signal
checking needs to be ignored otherwise PropertiesChanged signal
will never be sent.

11 years agonfctype3: Do not call write callback if the initial write command succeeds
Olivier Guiter [Thu, 14 Feb 2013 15:19:50 +0000 (16:19 +0100)]
nfctype3: Do not call write callback if the initial write command succeeds

When write-tag on a type 3 tag, the command returns
with "Invalid arguments", though it actually writes successfully.

11 years agosnep: Fix Android's handover over SNEP support
Olivier Guiter [Mon, 11 Feb 2013 15:52:33 +0000 (16:52 +0100)]
snep: Fix Android's handover over SNEP support

Android does handover over SNEP and recent changes broke the offset used
to check the handover frame validity.

11 years agohandover: Reply with no ACs when getting an Hr with an empty AC list
Olivier Guiter [Mon, 11 Feb 2013 15:52:32 +0000 (16:52 +0100)]
handover: Reply with no ACs when getting an Hr with an empty AC list

This fixes handover validation test #2.

If the Hr comes with no alternative carriers, the Hs AC list should be
empty as well.

11 years agondef: Send empty Hs when an Hr carries a single unknow type carrier
Olivier Guiter [Mon, 11 Feb 2013 15:52:31 +0000 (16:52 +0100)]
ndef: Send empty Hs when an Hr carries a single unknow type carrier

This fixes handover validation test #6.

Check that the remote handover server returns a select message
without alternative carriers if a single carrier of unknown type was
sent with the handover request.

11 years agondef: Send empty Hs frame when the Hr version check fails
Olivier Guiter [Mon, 11 Feb 2013 15:52:30 +0000 (16:52 +0100)]
ndef: Send empty Hs frame when the Hr version check fails

This fixes handover validation test #3.

Verify that the remote handover server handles historic and future
handover request version numbers. The test failed on step 4
(Check version 15.0).

11 years agondef: Do not build a reply to handover select messages
Olivier Guiter [Mon, 11 Feb 2013 14:33:52 +0000 (15:33 +0100)]
ndef: Do not build a reply to handover select messages

Handover select frames must not be replied to.

This fixes the following bt-handover error:
"ERROR:dbus.connection:Exception in handler for D-Bus signal"

11 years agogdbus: Don't call property changed callback during client init
Marcel Holtmann [Mon, 11 Feb 2013 19:19:10 +0000 (20:19 +0100)]
gdbus: Don't call property changed callback during client init

When the client uses ObjectManager to init properties, do not call
property changed callbacks. They should only be called once the proxy
added has been successfully signaled since the proxy itself provides
a full copy of available properties.

11 years agotest: Update handover agent register/unregister tests
Ravi kumar Veeramally [Fri, 8 Feb 2013 12:01:50 +0000 (14:01 +0200)]
test: Update handover agent register/unregister tests

To match the new API.

11 years agoagent: Add an extra parameter to the handover registration agent api
Ravi kumar Veeramally [Fri, 8 Feb 2013 12:01:49 +0000 (14:01 +0200)]
agent: Add an extra parameter to the handover registration agent api

Current handover registration apis does not support for carrier
specific registration. Added an extra parameter (carrier type) to
RegisterHandoverAgent and UnregisterHandoverAgent. This is an initial
patch for wifi handover agent registration. WiFi NDEF message handling
will be supported soon.

11 years agonear: Rename struct name bt_data to carrier_data
Ravi kumar Veeramally [Fri, 8 Feb 2013 12:01:48 +0000 (14:01 +0200)]
near: Rename struct name bt_data to carrier_data

To be more generic, renaming structure name from bt_data to
carrier_data.

11 years agoadapter: Disconnect from the target when data read fails to start
Samuel Ortiz [Wed, 6 Feb 2013 08:00:04 +0000 (09:00 +0100)]
adapter: Disconnect from the target when data read fails to start

11 years agounit: Rename test-ndef to test-ndef-parse
Samuel Ortiz [Sun, 3 Feb 2013 20:09:20 +0000 (21:09 +0100)]
unit: Rename test-ndef to test-ndef-parse

11 years agounit: Add initial NDEF building test
Samuel Ortiz [Sun, 3 Feb 2013 20:07:11 +0000 (21:07 +0100)]
unit: Add initial NDEF building test

11 years agogdbus: Fix unpublished interface signal emission
Johan Hedberg [Fri, 1 Feb 2013 15:03:22 +0000 (09:03 -0600)]
gdbus: Fix unpublished interface signal emission

If we haven't published an interface yet (i.e. it's in the data->added
list), we should just ignore any property changed indications as the
values for the properties will anyway be part of the InterfacesAdded
signal.

11 years agoinclude: Add a copy of the NFC kernel header
Samuel Ortiz [Thu, 31 Jan 2013 09:06:16 +0000 (10:06 +0100)]
include: Add a copy of the NFC kernel header

With the netlink kernel API changes, including a copy of the NFC header and
not relying on the system one will allow clean builds. The drawback could
be missing runtime features but that's better than not being able to run
the daemon at all.

11 years agodevice: Fix free order in push_ndef
Szymon Janc [Fri, 4 Jan 2013 15:10:38 +0000 (16:10 +0100)]
device: Fix free order in push_ndef

ndef was freed before ndef->data.

Invalid read of size 8
   at 0x41CF58: push_ndef (device.c:287)
   by 0x40B850: process_message.isra.4 (object.c:285)
   by 0x5143C40: ??? (in /lib/x86_64-linux-gnu/libdbus-1.so.3.5.8)
   by 0x5135B0F: dbus_connection_dispatch (in /lib/x86_64-linux-gnu/libdbus-1.so.3.5.8)
   by 0x409247: message_dispatch (mainloop.c:76)
   by 0x4E7A91A: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E79D52: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E7A09F: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E7A499: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x408D8E: main (main.c:221)
 Address 0x6847fb0 is 16 bytes inside a block of size 24 free'd
   at 0x4C2A82E: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x41CF57: push_ndef (device.c:286)
   by 0x40B850: process_message.isra.4 (object.c:285)
   by 0x5143C40: ??? (in /lib/x86_64-linux-gnu/libdbus-1.so.3.5.8)
   by 0x5135B0F: dbus_connection_dispatch (in /lib/x86_64-linux-gnu/libdbus-1.so.3.5.8)
   by 0x409247: message_dispatch (mainloop.c:76)
   by 0x4E7A91A: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E79D52: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E7A09F: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E7A499: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x408D8E: main (main.c:221)

11 years agop2p: Fix memory leak in p2p_listener_event
Szymon Janc [Fri, 4 Jan 2013 15:10:37 +0000 (16:10 +0100)]
p2p: Fix memory leak in p2p_listener_event

g_io_add_watch keeps own reference to iochannel so local reference
should be dropped before leaving.

882 (840 direct, 42 indirect) bytes in 7 blocks are definitely lost in loss record 177 of 192
   at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4EB66F4: g_io_channel_unix_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x416C6F: p2p_listener_event (p2p.c:187)
   by 0x4E79D52: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E7A09F: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E7A499: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x408DDE: main (main.c:221)

11 years agondef: Fix error message in near_ndef_prepare_handover_record
Szymon Janc [Fri, 4 Jan 2013 15:10:36 +0000 (16:10 +0100)]
ndef: Fix error message in near_ndef_prepare_handover_record

This function is used to create both Hs and Hr records.

11 years agosnep: Check ndef length before applying Android workaround
Szymon Janc [Wed, 23 Jan 2013 07:50:46 +0000 (08:50 +0100)]
snep: Check ndef length before applying Android workaround

With crafted NDEF message data outside of buffer could be read from
and write to. Potentially leading to segmentation fault or some other
undefined behaviour.

11 years agondef: Fix checking for error in parse_mime_type
Szymon Janc [Fri, 4 Jan 2013 15:10:34 +0000 (16:10 +0100)]
ndef: Fix checking for error in parse_mime_type

Upper layer don't know if action will be held or not when providing
ndef_message for reply. It is possible that reply was provided but
not used and this is not always an error

11 years agondef: Remove not needed AC payload creation in build_ho_record
Szymon Janc [Fri, 4 Jan 2013 15:10:33 +0000 (16:10 +0100)]
ndef: Remove not needed AC payload creation in build_ho_record

It was not used to create ndef message as AC recors is created inside
near_ndef_prepare_handover_record based on response from HO agent.

11 years agondef: Use stack variable for record in build_ho_record
Szymon Janc [Fri, 4 Jan 2013 15:10:32 +0000 (16:10 +0100)]
ndef: Use stack variable for record in build_ho_record

There is no need to dynamically allocate record as it is not used
after build_ho_record returns.

11 years agondef: Fix memory leak in build_ho_record
Szymon Janc [Fri, 4 Jan 2013 15:10:31 +0000 (16:10 +0100)]
ndef: Fix memory leak in build_ho_record

record data needs to be freed before returning ndef.

144 (80 direct, 64 indirect) bytes in 1 blocks are definitely lost in loss record 142 of 190
   at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x4E7FBFD: g_try_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x424477: __ndef_build_from_message (ndef.c:2950)
   by 0x41CEE3: push_ndef (device.c:276)
   by 0x40B850: process_message.isra.4 (object.c:285)
   by 0x5143C40: ??? (in /lib/x86_64-linux-gnu/libdbus-1.so.3.5.8)
   by 0x5135B0F: dbus_connection_dispatch (in /lib/x86_64-linux-gnu/libdbus-1.so.3.5.8)
   by 0x409247: message_dispatch (mainloop.c:76)
   by 0x4E7A91A: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E79D52: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E7A09F: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
   by 0x4E7A499: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)

11 years agobluetooth: Track adapter properties changes
Szymon Janc [Fri, 4 Jan 2013 15:10:30 +0000 (16:10 +0100)]
bluetooth: Track adapter properties changes

Watch for PropertyChanged signal to keep track of changed properties.
Only properties used for EIR creation are tracked (name, cod, powered).

11 years agotest: Add 'State' support for handover-agent
Szymon Janc [Fri, 4 Jan 2013 15:10:29 +0000 (16:10 +0100)]
test: Add 'State' support for handover-agent

This allows to pass power state hint with handover-agent.

11 years agondef: Prepare ac record with proper BT power state
Szymon Janc [Fri, 4 Jan 2013 15:10:28 +0000 (16:10 +0100)]
ndef: Prepare ac record with proper BT power state

When adding AC record for BT handover user state provided in bt_data
to properly indicate BT carrier power state.

11 years agoagent: Set carrier power state from hint in parse_reply
Szymon Janc [Fri, 4 Jan 2013 15:10:27 +0000 (16:10 +0100)]
agent: Set carrier power state from hint in parse_reply

Set carrier power state in struct bt_data if HO agent provided power
state hint in RequestOOB reply.

11 years agoagent: Set carrier power state hint in prepare_bt_data
Szymon Janc [Fri, 4 Jan 2013 15:10:26 +0000 (16:10 +0100)]
agent: Set carrier power state hint in prepare_bt_data

If alternative carrier is power state is known add it to dictionary.

11 years agoAdd carrier power state to struct bt_data
Szymon Janc [Fri, 4 Jan 2013 15:10:25 +0000 (16:10 +0100)]
Add carrier power state to struct bt_data

Add state to bt_data and set it according to power state received in
Hs/Hr messages.

11 years agondef: Validate CPS when parsing AC record
Szymon Janc [Fri, 4 Jan 2013 15:10:24 +0000 (16:10 +0100)]
ndef: Validate CPS when parsing AC record

CPS is 2-bit field so mask out reserved bits from first byte of AC
record.

11 years agondef: Move carrier_power_state definition to header file
Szymon Janc [Fri, 4 Jan 2013 15:10:23 +0000 (16:10 +0100)]
ndef: Move carrier_power_state definition to header file

It will be also used by handover agent implementation

11 years agodoc: Remove not really needed errors from Handover Agent API
Szymon Janc [Fri, 4 Jan 2013 15:10:22 +0000 (16:10 +0100)]
doc: Remove not really needed errors from Handover Agent API

Only InProgress error is really usefull as in such case neard could
retry operation. Other errors don't give any useful information
comparing to simply returning Failed with proper error message.

11 years agodoc: Add 'State' field to handover agent API
Szymon Janc [Fri, 4 Jan 2013 15:10:21 +0000 (16:10 +0100)]
doc: Add 'State' field to handover agent API

This will allow both agent and neard to be informed about power state
of carrier. It is up to agent to decide what to do with information
provided e.g. in case of 'activating' state it could delay connection
attempt. This will also allow to properly set Carrier Power State in
ac record.

11 years agogdbus: Check for valid path before handling properties
Marcel Holtmann [Mon, 21 Jan 2013 02:25:12 +0000 (18:25 -0800)]
gdbus: Check for valid path before handling properties

11 years agobuild: Add unit tests during distribution building
Marcel Holtmann [Tue, 15 Jan 2013 23:51:41 +0000 (15:51 -0800)]
build: Add unit tests during distribution building

11 years agounit: Fix includes for build testing
Marcel Holtmann [Tue, 15 Jan 2013 23:51:23 +0000 (15:51 -0800)]
unit: Fix includes for build testing

11 years agobuild: Header files are also part of the build material
Marcel Holtmann [Tue, 15 Jan 2013 23:49:15 +0000 (15:49 -0800)]
build: Header files are also part of the build material

11 years agobuild: Add unit/test-ndef to .gitignore list
Marcel Holtmann [Tue, 15 Jan 2013 23:40:08 +0000 (15:40 -0800)]
build: Add unit/test-ndef to .gitignore list

11 years agobuild: Include unit test in make check run
Marcel Holtmann [Tue, 15 Jan 2013 23:39:27 +0000 (15:39 -0800)]
build: Include unit test in make check run

11 years agounit: Hide all g_print statements behind g_test_verbose switch
Marcel Holtmann [Tue, 15 Jan 2013 23:35:31 +0000 (15:35 -0800)]
unit: Hide all g_print statements behind g_test_verbose switch

11 years agoRelease 0.9
Samuel Ortiz [Fri, 11 Jan 2013 16:29:32 +0000 (17:29 +0100)]
Release 0.9

11 years agobuild: Do not use deprecated AM_CONFIG_HEADER
Lucas De Marchi [Thu, 10 Jan 2013 15:18:14 +0000 (13:18 -0200)]
build: Do not use deprecated AM_CONFIG_HEADER

The long-obsoleted AM_CONFIG_HEADER macro was removed in automake 1.13.
Use AC_CONFIG_HEADERS instead.

11 years agobuild: Use AM_CPPFLAGS instead of INCLUDES
Lucas De Marchi [Thu, 10 Jan 2013 15:18:13 +0000 (13:18 -0200)]
build: Use AM_CPPFLAGS instead of INCLUDES

Makefile.am:50: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

11 years agotypes: Fix build error due to unaligned memory access
Olivier Guiter [Wed, 9 Jan 2013 12:42:37 +0000 (13:42 +0100)]
types: Fix build error due to unaligned memory access

This fix number of build error on architectures that can't handle
unaligned memory access (eg. ARM).

Most of the code was originally written in BlueZ's bluetooth.h.

11 years agosnep: SNEP validation test server implementation
Olivier Guiter [Wed, 9 Jan 2013 14:15:12 +0000 (15:15 +0100)]
snep: SNEP validation test server implementation

NFC forum defined a SNEP Validation specification. This set of patches
makes neard to pass all the SNEP test cases, providing a SNEP validation
server as a default one.

11 years agosnep: Separate snep default server code from snep core
Olivier Guiter [Wed, 9 Jan 2013 14:15:11 +0000 (15:15 +0100)]
snep: Separate snep default server code from snep core

In order to introduce the SNEP Validation server, we separate core
functions from snep default server code. This split leads to factorize
some parts of the process.
This code also improves the SNEP fragmentation code, more specifically
in snep_core_response_with_info.

11 years agondef: Add records comparison helpers
Olivier Guiter [Wed, 9 Jan 2013 14:15:10 +0000 (15:15 +0100)]
ndef: Add records comparison helpers

These functions propose to check ndef records for specific fields
like mime type or ID field in record header.

11 years agounit: Add Title and URI records SmartPoster NDEF unit test
Samuel Ortiz [Wed, 9 Jan 2013 11:10:57 +0000 (12:10 +0100)]
unit: Add Title and URI records SmartPoster NDEF unit test

11 years agounit: URI NDEF test should check for the field length
Samuel Ortiz [Wed, 9 Jan 2013 10:36:20 +0000 (11:36 +0100)]
unit: URI NDEF test should check for the field length

11 years agounit: Add single record SmartPoster NDEF unit test
Samuel Ortiz [Wed, 9 Jan 2013 10:34:58 +0000 (11:34 +0100)]
unit: Add single record SmartPoster NDEF unit test