platform/upstream/neard.git
11 years agonfctool: sniffer: ssap and dsap were displayed switched
Thierry Escande [Thu, 25 Apr 2013 11:03:02 +0000 (13:03 +0200)]
nfctool: sniffer: ssap and dsap were displayed switched

In the LLCP header of a received frame, dsap is the local port and ssap is the
remote port. ssap and dsap fields of the sniffer_packet structure have been
renamed to local_sap and remote_sap to avoid confusion.

11 years agonfctool: sniffer: Group sniffed packet info into the same struct
Thierry Escande [Thu, 25 Apr 2013 11:03:01 +0000 (13:03 +0200)]
nfctool: sniffer: Group sniffed packet info into the same struct

Raw socket header (direction and adapter index) and LLCP info are now stored
into the same struct (sniffer_packet). This structure is then passed to PDU
specific decoding functions.

11 years agonfctool: Fix a memory leak
Thierry Escande [Thu, 25 Apr 2013 11:03:00 +0000 (13:03 +0200)]
nfctool: Fix a memory leak

The handlers hash table was not freed

11 years agonfctyp3: Set cookie cb to NULL when read succeeds
Arron Wang [Mon, 22 Apr 2013 09:19:53 +0000 (17:19 +0800)]
nfctyp3: Set cookie cb to NULL when read succeeds

Otherwise the callback function may be call twice and
write_msg is unreferenced twice:

process 1868: arguments to dbus_message_unref() were incorrect,
assertion "message != NULL" failed in file dbus-message.c line 1616
0  0xb7fe1424 in __kernel_vsyscall ()
1  0xb7bcfcc1 in raise () from /lib/libc.so.6
2  0xb7bd30ee in abort () from /lib/libc.so.6
3  0xb7da5045 in _dbus_abort () from /usr/lib/libdbus-1.so.3
4  0xb7d99f86 in _dbus_warn_check_failed () from /usr/lib/libdbus-1.so.3
5  0xb7d8856e in dbus_message_unref () from /usr/lib/libdbus-1.so.3
6  0x08062a63 in tag_read_cb (adapter_idx=0, target_idx=6, status=0)
    at src/tag.c:240
7  0x08063277 in near_tag_add_records (tag=0x8081a30, records=0x8080270,
    cb=0x8062a30 <tag_read_cb>, status=0) at src/tag.c:814

11 years agobluetooth: Get name value from right message iterator
Arron Wang [Mon, 22 Apr 2013 09:19:23 +0000 (17:19 +0800)]
bluetooth: Get name value from right message iterator

We need to get name value from var instead of the container iter
else it may also cause neard crash:
process 1044: type variant 118 not a basic type
0  0xb7fe1424 in __kernel_vsyscall ()
1  0xb7bcfcc1 in raise () from /lib/libc.so.6
2  0xb7bd30ee in abort () from /lib/libc.so.6
3  0xb7da5045 in _dbus_abort () from /usr/lib/libdbus-1.so.3
4  0xb7d99f86 in _dbus_warn_check_failed () from /usr/lib/libdbus-1.so.3
5  0xb7d9bc9c in _dbus_marshal_read_basic () from /usr/lib/libdbus-1.so.3
6  0xb7d84e0f in _dbus_type_reader_read_basic () from /usr/lib/libdbus-1.so.3
7  0xb7d89f0b in dbus_message_iter_get_basic () from /usr/lib/libdbus-1.so.3
8  0x0806b638 in bt_adapter_property_changed (conn=0x80814c8,
    message=0x8081870, user_data=0x0) at src/bluetooth.c:445

11 years agoRelease 0.11 0.11
Samuel Ortiz [Wed, 17 Apr 2013 10:33:32 +0000 (12:33 +0200)]
Release 0.11

11 years agounit: Fix broken SNEP read unit test
Olivier Guiter [Mon, 15 Apr 2013 11:36:55 +0000 (13:36 +0200)]
unit: Fix broken SNEP read unit test

In "crash-1" loop, the snep_data was added to the slist, but not removed
because of a specific exit condition. This fix swaps the test condition
and the action on slist, in order to add the fragment only when the length
test passed.

11 years agonfctool: Correct unsigned int comparison
Thierry Escande [Mon, 8 Apr 2013 16:55:29 +0000 (18:55 +0200)]
nfctool: Correct unsigned int comparison

An uint can't be less than 0...

11 years agonfctool: Make good use of snap_len option
Thierry Escande [Mon, 8 Apr 2013 16:55:28 +0000 (18:55 +0200)]
nfctool: Make good use of snap_len option

snap_len now really limits sniffer output.

11 years agonfctool: Set sniffer buffer large enough to handle MAX_MIU bytes frames
Thierry Escande [Mon, 8 Apr 2013 16:55:27 +0000 (18:55 +0200)]
nfctool: Set sniffer buffer large enough to handle MAX_MIU bytes frames

This fixes the size of the recv buffer for the sniffer. Frames can be
up to 7ff+128+(llcp, seq, and raw headers) bytes.

11 years agomain.conf: Add DefaultPowered configuration
Samuel Ortiz [Wed, 10 Apr 2013 10:14:33 +0000 (12:14 +0200)]
main.conf: Add DefaultPowered configuration

DefaultPowered is a boolean and will force neard into turning any detected
adapter on when set to TRUE.

11 years agogdbus: Use gcc builtin instead of g_atomic
Lucas De Marchi [Mon, 8 Apr 2013 20:56:18 +0000 (17:56 -0300)]
gdbus: Use gcc builtin instead of g_atomic

g_atomic_* end up using G_STATIC_ASSERT, causing gcc 4.8 to yell due to
-Wunused-local-typedefs.

gdbus/client.c: In function ‘g_dbus_client_ref’:
/usr/include/glib-2.0/glib/gmacros.h:162:53: error: typedef ‘_GStaticAssertCompileTimeAssertion_2’ locally defined but not used [-Werror=unused-local-typedefs]
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1]

11 years agogdbus: Fix not calling property_changed callback
Luiz Augusto von Dentz [Wed, 27 Feb 2013 12:00:23 +0000 (14:00 +0200)]
gdbus: Fix not calling property_changed callback

In case a property did not appear by the time proxy_added was called
property_changed has to be called if it appear latter otherwise the
application will be unaware of it.

11 years agollcp: Validation test server
Olivier Guiter [Thu, 4 Apr 2013 12:02:13 +0000 (14:02 +0200)]
llcp: Validation test server

This llcp validation server follows NFC Forum requirements and scenarios
and supports the initial list of 9 test cases.
Most of these tests rely on sending frames to an echo server, using
connection less or connection oriented modes.

11 years agop2p: Add support for connection less binding
Olivier Guiter [Thu, 4 Apr 2013 12:02:12 +0000 (14:02 +0200)]
p2p: Add support for connection less binding

Some validation tests are done in connection less mode. near_p2p_driver
now handles not only stream socket but also datagram socket.

11 years agounit: Add WSC NDEF build test case
Ravi kumar Veeramally [Thu, 4 Apr 2013 14:02:36 +0000 (17:02 +0300)]
unit: Add WSC NDEF build test case

Added test cases to test WSC MIME type NDEF build.

11 years agondef: Add api to prepare mime type wsc record
Ravi kumar Veeramally [Thu, 4 Apr 2013 14:02:35 +0000 (17:02 +0300)]
ndef: Add api to prepare mime type wsc record

Added api to prepare MIME type WSC record for unit tests.

11 years agondef: Remove unnecessary debug statement
Ravi kumar Veeramally [Thu, 4 Apr 2013 14:02:34 +0000 (17:02 +0300)]
ndef: Remove unnecessary debug statement

Removed unnecessary debug statement which is added with
56a275c8841352a9c8a60bdcb3e63ba69fe783c6 commit.

11 years agonfc_copy: Update with new socket options
Samuel Ortiz [Fri, 5 Apr 2013 13:49:33 +0000 (15:49 +0200)]
nfc_copy: Update with new socket options

11 years agounit: Support for SNEP REJECT request
Marcin Malagowski [Tue, 26 Mar 2013 18:25:04 +0000 (19:25 +0100)]
unit: Support for SNEP REJECT request

11 years agounit: Fixed cleaning SNEP fragments
Marcin Malagowski [Tue, 26 Mar 2013 18:25:03 +0000 (19:25 +0100)]
unit: Fixed cleaning SNEP fragments

If sending the fragment fails, server should remove all
the remaining fragments.

11 years agotest: Add test script to write mime type on tag
Ravi kumar Veeramally [Wed, 3 Apr 2013 12:37:27 +0000 (15:37 +0300)]
test: Add test script to write mime type on tag

Added test script to write mime type on tag. Currently it
supports application/vnd.wfa.wsc mime type.

11 years agondef: Add support to build wifi_wsc mime type ndef record
Ravi kumar Veeramally [Wed, 3 Apr 2013 12:37:26 +0000 (15:37 +0300)]
ndef: Add support to build wifi_wsc mime type ndef record

Implemented mime type record building upon dbus request.
Currently it supports application/vnd.wfa.wsc.

11 years agonfctool: Print length of buffer before its hexadecimal dump
Thierry Escande [Mon, 25 Mar 2013 16:45:54 +0000 (17:45 +0100)]
nfctool: Print length of buffer before its hexadecimal dump

11 years agonfctool: Fix some integer sizes and signedness
Thierry Escande [Mon, 25 Mar 2013 16:45:53 +0000 (17:45 +0100)]
nfctool: Fix some integer sizes and signedness

Also, use glib types to be coherent.

11 years agonfctool: Fix aggregated frame support
Thierry Escande [Mon, 25 Mar 2013 16:45:52 +0000 (17:45 +0100)]
nfctool: Fix aggregated frame support

This adds the llcp sniffer pseudo header to PDUs extracted from the
aggregated frames before re-entering llcp_print_pdu.

11 years agondef: Remove not used Doxygen annotations
Szymon Janc [Mon, 25 Mar 2013 10:48:01 +0000 (11:48 +0100)]
ndef: Remove not used Doxygen annotations

As previous commit shows doxygen annotation are not really used.
Those annotations require also more focus when reading (and mostly
describe obvious parts of the code) comparing to simple comments.
Also not used doxygen annotations tend to drift away from actual code
and simply confuse developer.

Simply remove doxygen annotations as functions and params names are
self-explanatory anyway. Some comments where left to document
non-obvious behaviour.

11 years agondef: Remove bogus text from near_ndef_parse_msg comment
Szymon Janc [Mon, 25 Mar 2013 10:48:00 +0000 (11:48 +0100)]
ndef: Remove bogus text from near_ndef_parse_msg comment

This was accidentally pasted in commit 8a141753.

11 years agondef: Use sizeof instead of strlen to get BT_MIME_STRING_2_0 len
Szymon Janc [Mon, 25 Mar 2013 10:47:59 +0000 (11:47 +0100)]
ndef: Use sizeof instead of strlen to get BT_MIME_STRING_2_0 len

This is a constant string and there is no need to calculate its length
in runtime.

11 years agondef: Fix some typos in comments and debug messages
Szymon Janc [Mon, 25 Mar 2013 10:47:58 +0000 (11:47 +0100)]
ndef: Fix some typos in comments and debug messages

11 years agondef: Simplify near_ndef_prepare_ac_and_cfg_records function
Szymon Janc [Mon, 25 Mar 2013 10:47:56 +0000 (11:47 +0100)]
ndef: Simplify near_ndef_prepare_ac_and_cfg_records function

Make error path a bit cleaner and easier to understand. This also makes
code less confusing to some GCC version (eg. 4.6.3 on Debian ARM) about
variables mime_type and cdr being used without initialization.

make --no-print-directory all-am
  CC     src/ndef.o
src/ndef.c: In function ‘near_ndef_prepare_ac_and_cfg_records’:
src/ndef.c:1758:6: error: ‘mime_type’ may be used uninitialized in this
  function [-Werror=uninitialized]
src/ndef.c:1781:8: note: ‘mime_type’ was declared here
src/ndef.c:1835:36: error: ‘cdr’ may be used uninitialized in this
  function [-Werror=uninitialized]
cc1: all warnings being treated as errors
make[1]: *** [src/ndef.o] Error 1
make: *** [all] Error 2

11 years agosnep-validation: Fix compilation on ARM due to unaligned memory access
Szymon Janc [Mon, 25 Mar 2013 10:47:55 +0000 (11:47 +0100)]
snep-validation: Fix compilation on ARM due to unaligned memory access

Use near_get_be32 helper function to access nfc_data. Although there is
most likely no risk of unaligned access since nfc_data is allocated
from heap (and properly alligned as access starts from first byte) this
result in compilation error on ARM (Debian GCC 4.6.3).

plugins/snep-validation.c: In function ‘snep_validation_server_req_get’:
plugins/snep-validation.c:155:22: error: cast increases required alignment
  of target type [-Werror=cast-align]
cc1: all warnings being treated as errors
make[1]: *** [plugins/snep-validation.o] Error 1
make: *** [all] Error 2

11 years agop2p: Support for single connection server
Samuel Ortiz [Mon, 25 Mar 2013 16:48:03 +0000 (17:48 +0100)]
p2p: Support for single connection server

The LLCP validation tests require to reject any connection once a client
is connected. Which means a new listen should start iff the current
connection is closed. For that a single_connection field is added to the
p2p_driver structure and the p2p_bind code is factorized so that the
client close hook can call it without re-allocating a server data pointer.

11 years agomain: Wait to daemonize to just before entering the main loop
Guillem Jover [Mon, 25 Mar 2013 11:44:07 +0000 (12:44 +0100)]
main: Wait to daemonize to just before entering the main loop

To be able to get correct exit codes in case of error, we have to delay
the daemonization to just before entering the main loop. Otherwise the
init scripts might assume everything started fine and go ahead when that
was not the case.

The initialization error messages are printed to syslog instead of
stderr, which would need a rework in the future of either the logging
functions, or the call sites to distinguish what belongs where. But at
least for now we get correct exit values.

11 years agounit: Sanitize NDEF test names
Samuel Ortiz [Mon, 25 Mar 2013 11:14:59 +0000 (12:14 +0100)]
unit: Sanitize NDEF test names

11 years agounit: Sanitize SNEP test names
Samuel Ortiz [Mon, 25 Mar 2013 11:11:13 +0000 (12:11 +0100)]
unit: Sanitize SNEP test names

11 years agoAUTHORS: Mention Marcin's contributions
Samuel Ortiz [Mon, 25 Mar 2013 11:06:44 +0000 (12:06 +0100)]
AUTHORS: Mention Marcin's contributions

11 years agounit: Remove SNEP routines forward declarations
Samuel Ortiz [Mon, 25 Mar 2013 11:05:21 +0000 (12:05 +0100)]
unit: Remove SNEP routines forward declarations

11 years agounit: Add SNEP PUT/GET NDEF test
Marcin Malagowski [Sat, 23 Mar 2013 11:40:27 +0000 (12:40 +0100)]
unit: Add SNEP PUT/GET NDEF test

11 years agounit: Add SNEP GET request "fragmented" test
Marcin Malagowski [Sat, 23 Mar 2013 11:40:26 +0000 (12:40 +0100)]
unit: Add SNEP GET request "fragmented" test

11 years agounit: Add SNEP GET request "not implemented" test
Marcin Malagowski [Sat, 23 Mar 2013 11:40:25 +0000 (12:40 +0100)]
unit: Add SNEP GET request "not implemented" test

11 years agounit: Add SNEP GET request "ok" test
Marcin Malagowski [Sat, 23 Mar 2013 11:40:24 +0000 (12:40 +0100)]
unit: Add SNEP GET request "ok" test

11 years agounit: Add SNEP PUT request "fragmented" test
Marcin Malagowski [Sat, 23 Mar 2013 11:40:23 +0000 (12:40 +0100)]
unit: Add SNEP PUT request "fragmented" test

11 years agounit: Add SNEP PUT request "feature not implemented" test
Marcin Malagowski [Sat, 23 Mar 2013 11:40:22 +0000 (12:40 +0100)]
unit: Add SNEP PUT request "feature not implemented" test

11 years agounit: Add SNEP PUT request "unsupported version" test
Marcin Malagowski [Sat, 23 Mar 2013 11:40:21 +0000 (12:40 +0100)]
unit: Add SNEP PUT request "unsupported version" test

11 years agounit: Add SNEP PUT request "ok" test
Marcin Malagowski [Sat, 23 Mar 2013 11:40:20 +0000 (12:40 +0100)]
unit: Add SNEP PUT request "ok" test

11 years agounit: Add SNEP test utilities
Marcin Malagowski [Sat, 23 Mar 2013 11:40:19 +0000 (12:40 +0100)]
unit: Add SNEP test utilities

11 years agobuild: Remove unused linking of neard against libresolv
Guillem Jover [Fri, 22 Mar 2013 18:53:12 +0000 (19:53 +0100)]
build: Remove unused linking of neard against libresolv

11 years agonfctool: Fix pointer casting errors on ARM
Waldemar Rymarkiewicz [Tue, 12 Mar 2013 10:46:18 +0000 (11:46 +0100)]
nfctool: Fix pointer casting errors on ARM

On GLib 2.28, Macro GINT_TO_POINTER on ARM will fail
as it won't cast implicitly to int before casting to gpointer.

It results in casting uint8 directly to void *, which will
not do the job on some ARM processors.

Error message:

tools/nfctool/netlink.c: In function ‘nl_nfc_event_cb’:
tools/nfctool/netlink.c:686:39: error: cast to pointer from
integer of different size [-Werror=int-to-pointer-cast]
tools/nfctool/netlink.c: In function ‘nl_add_event_handler’:
tools/nfctool/netlink.c:731:35: error: cast to pointer from
integer of different size [-Werror=int-to-pointer-cast]

11 years agoconfigure: Remove init script skeleton
Samuel Ortiz [Fri, 22 Mar 2013 14:21:24 +0000 (15:21 +0100)]
configure: Remove init script skeleton

All distros use their own flavor of it, and several are systemd
based. An init script skeleton is probably useless.

11 years agoAUTHORS: Mention Guillem's contributions
Samuel Ortiz [Fri, 22 Mar 2013 11:40:43 +0000 (12:40 +0100)]
AUTHORS: Mention Guillem's contributions

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 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