platform/upstream/neard.git
12 years agonfctype1: Remove duplicate tag read-only check
Ravi kumar Veeramally [Tue, 26 Jun 2012 14:50:43 +0000 (17:50 +0300)]
nfctype1: Remove duplicate tag read-only check

Tag read-only check while writing is added in tag.c.
So remove duplicate call from plugin.

12 years agotest: Add Handover type support to push-device
Samuel Ortiz [Tue, 26 Jun 2012 16:09:30 +0000 (18:09 +0200)]
test: Add Handover type support to push-device

The pushed handover NDEF will be a handover request one, and the argument
to the push-device script is the expected carrier (bluetooth or wifi).

12 years agodevice: Specify service name when pushing NDEFs
Samuel Ortiz [Tue, 26 Jun 2012 16:01:02 +0000 (18:01 +0200)]
device: Specify service name when pushing NDEFs

Depending on the NDEF type, the service name will be different. In
particular, Handover NDEFs should be sent to the handover service, not
the SNEP one.

12 years agotag: Do not attempt to write to a read only tag
Samuel Ortiz [Mon, 25 Jun 2012 17:39:57 +0000 (19:39 +0200)]
tag: Do not attempt to write to a read only tag

12 years agoadapter: Early p2p binding
Samuel Ortiz [Fri, 22 Jun 2012 13:37:10 +0000 (15:37 +0200)]
adapter: Early p2p binding

The LLCP wks array will be properly built before the MAC link is up by
binding to p2p services as soon as a p2p driver is registered.
The bound will also happen when the MAC link is up for supporting kernels
where the bound LLCP sockets will be closed when the MAC is brought down.
For more recent kernels, the bind operation will happen only once.

12 years agop2p: Do not return an error when a service name is already bound
Samuel Ortiz [Fri, 22 Jun 2012 13:34:20 +0000 (15:34 +0200)]
p2p: Do not return an error when a service name is already bound

When trying to re-use the same service name, bind will fail but it means
a server is already listening on this service.

12 years agop2p: Keep track of allocated servers
Samuel Ortiz [Fri, 22 Jun 2012 13:25:18 +0000 (15:25 +0200)]
p2p: Keep track of allocated servers

12 years agop2p: Bind and listen only on a specific target
Samuel Ortiz [Thu, 21 Jun 2012 16:44:10 +0000 (18:44 +0200)]
p2p: Bind and listen only on a specific target

Bind and listening are related to a particular adapter, not to a target
or device index.

12 years agobluetooth: Check for OOB pointers to be NULL before freeing them
Samuel Ortiz [Wed, 20 Jun 2012 19:25:16 +0000 (21:25 +0200)]
bluetooth: Check for OOB pointers to be NULL before freeing them

12 years agohandover: Support for handover selector mode
Olivier Guiter [Wed, 20 Jun 2012 10:21:20 +0000 (12:21 +0200)]
handover: Support for handover selector mode

This code parses received handover requester records, create an Hs one
and send it back to the requester.

12 years agondef: Prepare handover record
Olivier Guiter [Wed, 20 Jun 2012 10:21:19 +0000 (12:21 +0200)]
ndef: Prepare handover record

This patch allows to create handover (Hr or Hs) frames with all the
expecteded records (collision, ac, ...) and the configuration ones
(like e.g. the Bluetooth OOB related data).

12 years agondef: Add NDEF record couting routine
Olivier Guiter [Wed, 20 Jun 2012 11:11:39 +0000 (13:11 +0200)]
ndef: Add NDEF record couting routine

For a defined record type, this routine will count how many records are
found in an NDEF.

12 years agondef: Add handover parsing routines
Olivier Guiter [Wed, 20 Jun 2012 10:21:17 +0000 (12:21 +0200)]
ndef: Add handover parsing routines

Because of the handover specific frame structure (out of NDEF record
messages), the routines are slightly different than the existing ones.

12 years agondef: Add handover records freeing routines
Olivier Guiter [Wed, 20 Jun 2012 10:21:16 +0000 (12:21 +0200)]
ndef: Add handover records freeing routines

12 years agondef: Add handover record definitions
Olivier Guiter [Wed, 20 Jun 2012 10:21:15 +0000 (12:21 +0200)]
ndef: Add handover record definitions

near_ndef_record will point to one of them.

12 years agondef: Add a function to set/reset MB and ME bits in NDEF headers
Olivier Guiter [Wed, 20 Jun 2012 10:21:14 +0000 (12:21 +0200)]
ndef: Add a function to set/reset MB and ME bits in NDEF headers

12 years agondef: Extend the NDEF alocation routine
Olivier Guiter [Wed, 20 Jun 2012 10:21:13 +0000 (12:21 +0200)]
ndef: Extend the NDEF alocation routine

ndef_message_alloc_complete allows to pass more arguments when allocating
a new NDEF.
ndef_message_alloc is now a wrapper to ndef_message_alloc_complete,
mainly because, in most cases, payload_id is null.

12 years agondef: Add Bluetooth pairing argument to parse_mime_type()
Olivier Guiter [Wed, 20 Jun 2012 10:21:12 +0000 (12:21 +0200)]
ndef: Add Bluetooth pairing argument to parse_mime_type()

This argument being set to TRUE will initiate a Bluetooth pairing.

12 years agondef: Add near_ndef_record_length function
Olivier Guiter [Wed, 20 Jun 2012 10:21:11 +0000 (12:21 +0200)]
ndef: Add near_ndef_record_length function

This function returns the length of a NDEF record.

12 years agondef: Save type length in record header structure
Olivier Guiter [Tue, 19 Jun 2012 09:46:23 +0000 (11:46 +0200)]
ndef: Save type length in record header structure

12 years agobluetooth: Define Bluetooth MIME types
Olivier Guiter [Tue, 19 Jun 2012 09:46:22 +0000 (11:46 +0200)]
bluetooth: Define Bluetooth MIME types

12 years agogdbus: Add macro for methods marked as NOREPLY
Lucas De Marchi [Tue, 29 May 2012 11:57:06 +0000 (08:57 -0300)]
gdbus: Add macro for methods marked as NOREPLY

Bring gdbus up to sync with other projects. The macro is
not yet used in neard.

12 years agoAUTHORS: Mention Eyal's contributions
Samuel Ortiz [Mon, 18 Jun 2012 13:58:48 +0000 (15:58 +0200)]
AUTHORS: Mention Eyal's contributions

12 years agonfctype2: Fix wrong read command length
Eyal Reizer [Mon, 18 Jun 2012 08:19:16 +0000 (11:19 +0300)]
nfctype2: Fix wrong read command length

According to "Type 2 Tag Operation Specification" the read command is 2
bytes long: (Code=0x30 and Block number).

Instead of sending 2 bytes the code was sending 6 bytes which caused some
NFC controllers to send a wrong read command which resulted with a read
timeout.

12 years agofeatures: Update
Samuel Ortiz [Tue, 12 Jun 2012 14:30:13 +0000 (16:30 +0200)]
features: Update

12 years agoTODO: Update
Samuel Ortiz [Tue, 12 Jun 2012 14:27:15 +0000 (16:27 +0200)]
TODO: Update

12 years agonetlink: Simplfy the netlink initialisation code
Samuel Ortiz [Tue, 12 Jun 2012 13:55:33 +0000 (15:55 +0200)]
netlink: Simplfy the netlink initialisation code

The cache and generic netlink family pointer are not needed.

12 years agoplugins: Remove near_tag_get_data() useless cast
Samuel Ortiz [Tue, 12 Jun 2012 10:06:27 +0000 (12:06 +0200)]
plugins: Remove near_tag_get_data() useless cast

There is no need for such a cast when a size_t pointer can be passed
as an argument.

12 years agobuild: Put --prefix before --enable options
Marcel Holtmann [Sun, 10 Jun 2012 23:32:32 +0000 (08:32 +0900)]
build: Put --prefix before --enable options

12 years agobuild: Core plugins should be builtin
Samuel Ortiz [Tue, 5 Jun 2012 16:53:51 +0000 (18:53 +0200)]
build: Core plugins should be builtin

There is no valid reasons for building the current plugins as libraries.
All of them are either buitin or disabled now.

12 years agobuild: Enable all plugins by default
Samuel Ortiz [Tue, 5 Jun 2012 16:49:24 +0000 (18:49 +0200)]
build: Enable all plugins by default

All tag types and p2p are core features, so they should be enabled by
default. --disable- allows for explicit disablement.

12 years agoRelease 0.4 0.4
Samuel Ortiz [Tue, 5 Jun 2012 13:07:24 +0000 (15:07 +0200)]
Release 0.4

12 years agotest: Convert neard-ui to the new polling API
Olivier Guiter [Mon, 4 Jun 2012 13:47:21 +0000 (15:47 +0200)]
test: Convert neard-ui to the new polling API

12 years agotag: Return tag writing in progress when there is a messaged queued
Ravi kumar Veeramally [Mon, 4 Jun 2012 12:58:21 +0000 (15:58 +0300)]
tag: Return tag writing in progress when there is a messaged queued

12 years agomanager: Add handover agent registration API
Samuel Ortiz [Mon, 4 Jun 2012 12:55:00 +0000 (14:55 +0200)]
manager: Add handover agent registration API

12 years agodoc: Add handover agent API definition
Samuel Ortiz [Mon, 4 Jun 2012 12:54:15 +0000 (14:54 +0200)]
doc: Add handover agent API definition

12 years agohandover: Add handover agent API
Samuel Ortiz [Mon, 4 Jun 2012 12:47:00 +0000 (14:47 +0200)]
handover: Add handover agent API

The handover agent API will allow handover agents to register against neard
and provide it Bluetooth OOB or 802.11 crypto data. This data will be used
to build Handover select messages and send them back to the handover
requester.

12 years agotest: The default polling loop mode is Initiator
Samuel Ortiz [Fri, 1 Jun 2012 13:52:52 +0000 (15:52 +0200)]
test: The default polling loop mode is Initiator

12 years agoadapter: Default polling loop mode is Initiator
Samuel Ortiz [Fri, 1 Jun 2012 13:51:35 +0000 (15:51 +0200)]
adapter: Default polling loop mode is Initiator

Until the kernel target mode gets more testing, the default polling loop
mode should be Initiator, as it used to be.

12 years agonetlink: Pass IM protocols through NFC_ATTR_PROTOCOLS as well
Samuel Ortiz [Fri, 1 Jun 2012 11:32:02 +0000 (13:32 +0200)]
netlink: Pass IM protocols through NFC_ATTR_PROTOCOLS as well

This way the polling loop will also work with older kernels.

12 years agoadapter: Set the DEP flag to false when a device is removed
Samuel Ortiz [Thu, 31 May 2012 17:51:24 +0000 (19:51 +0200)]
adapter: Set the DEP flag to false when a device is removed

12 years agonetlink: Support target mode netlink events
Samuel Ortiz [Wed, 16 May 2012 23:19:41 +0000 (01:19 +0200)]
netlink: Support target mode netlink events

Target mode activation and deactivation events are sent by the kernel
through netlink.

12 years agoadapter: Add device addition API
Samuel Ortiz [Mon, 21 May 2012 16:34:35 +0000 (18:34 +0200)]
adapter: Add device addition API

This API will be used for adding new devices when running in target mode.

12 years agodevice: Check for NFCID length being greater than zero
Samuel Ortiz [Mon, 21 May 2012 16:33:21 +0000 (18:33 +0200)]
device: Check for NFCID length being greater than zero

12 years agoadapter: Implement new polling loop D-Bus API
Samuel Ortiz [Fri, 25 May 2012 14:06:23 +0000 (16:06 +0200)]
adapter: Implement new polling loop D-Bus API

The simple StartPoll is replaced with a polling loop method, where polling
mode is specified. It can be Initiator, Target or both.
When starting the polling loop in Target mode an NFC device could
eventually activate us.

12 years agodevice: Push is an asynchronous D-Bus method
Samuel Ortiz [Fri, 25 May 2012 13:50:17 +0000 (15:50 +0200)]
device: Push is an asynchronous D-Bus method

12 years agotag: Write is an asynchronous D-Bus method
Samuel Ortiz [Fri, 25 May 2012 13:49:45 +0000 (15:49 +0200)]
tag: Write is an asynchronous D-Bus method

12 years agotag: Dbus reply to tag write request
Ravi kumar Veeramally [Fri, 18 May 2012 08:58:58 +0000 (11:58 +0300)]
tag: Dbus reply to tag write request

The tag writing operation is asynchronous, and any request received while
one of them is currently running will be rejected.

12 years agosnep: Removed unnecessary NDEF TLV addition
Ravi kumar Veeramally [Fri, 18 May 2012 08:34:35 +0000 (11:34 +0300)]
snep: Removed unnecessary NDEF TLV addition

TLV adding and parsing is not required for SNEP messages.
near_ndef_parse() can be called staight away.

12 years agosnep: Fixed snep read fragmentation
Ravi kumar Veeramally [Fri, 18 May 2012 08:34:34 +0000 (11:34 +0300)]
snep: Fixed snep read fragmentation

Response CONTINUE has to be sent only after the first fragment.

12 years agoadapter: Fix GIOChannel leak
Vinicius Costa Gomes [Mon, 21 May 2012 17:59:41 +0000 (14:59 -0300)]
adapter: Fix GIOChannel leak

As we are not using channel anymore we may drop this reference, and
let GLib clean it up, closing the file descriptor.

12 years agonetlink: Fix memory leak when handling netlink events
Vinicius Costa Gomes [Mon, 21 May 2012 17:59:40 +0000 (14:59 -0300)]
netlink: Fix memory leak when handling netlink events

12 years agosnep: Add SNEP version to the SNEP response
Samuel Ortiz [Fri, 25 May 2012 10:59:57 +0000 (12:59 +0200)]
snep: Add SNEP version to the SNEP response

12 years agogdbus: add Method.NoReply annotation in introspection
Lucas De Marchi [Wed, 23 May 2012 13:20:08 +0000 (10:20 -0300)]
gdbus: add Method.NoReply annotation in introspection

12 years agogdbus: add Deprecated annotation in introspection
Lucas De Marchi [Wed, 23 May 2012 13:20:07 +0000 (10:20 -0300)]
gdbus: add Deprecated annotation in introspection

12 years agogdbus: remove signature and reply from tables
Lucas De Marchi [Wed, 23 May 2012 13:20:06 +0000 (10:20 -0300)]
gdbus: remove signature and reply from tables

12 years agoDo not set signature and reply in GDBus tables
Henrique Dante de Almeida [Wed, 23 May 2012 13:20:05 +0000 (10:20 -0300)]
Do not set signature and reply in GDBus tables

Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.

12 years agogdbus: loop over args to check message signature
Lucas De Marchi [Wed, 23 May 2012 13:20:04 +0000 (10:20 -0300)]
gdbus: loop over args to check message signature

12 years agogdbus: use GDBusArgInfo to generate introspection
Lucas De Marchi [Wed, 23 May 2012 13:20:03 +0000 (10:20 -0300)]
gdbus: use GDBusArgInfo to generate introspection

By using GDBusArgInfo in methods and signals, the introspection
generation is much simpler and we can add each argument name.

12 years agoConvert GDBus methods and signals to use macro helpers
Henrique Dante de Almeida [Wed, 23 May 2012 13:20:02 +0000 (10:20 -0300)]
Convert GDBus methods and signals to use macro helpers

With these macro helpers we can separate in/out arguments and use their
own vector.

12 years agogdbus: add and use helpers for table declarations
Lucas De Marchi [Wed, 23 May 2012 13:20:01 +0000 (10:20 -0300)]
gdbus: add and use helpers for table declarations

12 years agogdbus: add argument info to methods and signals
Lucas De Marchi [Wed, 23 May 2012 13:20:00 +0000 (10:20 -0300)]
gdbus: add argument info to methods and signals

12 years agoConstify GDBus signal tables
Henrique Dante de Almeida [Wed, 23 May 2012 13:19:59 +0000 (10:19 -0300)]
Constify GDBus signal tables

    Constify signal tables with the following command:

        find . -name '*.[ch]' -exec \
                 sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;

12 years agoConstify GDBus method tables
Henrique Dante de Almeida [Wed, 23 May 2012 13:19:58 +0000 (10:19 -0300)]
Constify GDBus method tables

    Constify method tables with the following command:

    find . -name '*.[ch]' -exec \
                 sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;

12 years agogdbus: Constify introspection method table
Marcel Holtmann [Fri, 18 May 2012 02:56:27 +0000 (19:56 -0700)]
gdbus: Constify introspection method table

12 years agogdbus: do not call memset for terminating NUL
Lucas De Marchi [Thu, 17 May 2012 18:19:59 +0000 (15:19 -0300)]
gdbus: do not call memset for terminating NUL

12 years agogdbus: return if method signature is malformed
Lucas De Marchi [Thu, 17 May 2012 18:19:58 +0000 (15:19 -0300)]
gdbus: return if method signature is malformed

12 years agosnep: Fix typo in SNEP push max fragment length
Ravi kumar Veeramally [Tue, 15 May 2012 12:27:13 +0000 (15:27 +0300)]
snep: Fix typo in SNEP push max fragment length

12 years agoAUTHORS: Mention Vinicius' contributions
Samuel Ortiz [Wed, 16 May 2012 23:22:25 +0000 (01:22 +0200)]
AUTHORS: Mention Vinicius' contributions

12 years agobuild: Add main.conf to the source package
Vinicius Costa Gomes [Tue, 15 May 2012 22:20:03 +0000 (19:20 -0300)]
build: Add main.conf to the source package

Even if this file isn't installed it needs to be present in the source
package so administrators are able to change some runtime behaviour.

12 years agobuild: install org.neard.conf dbus configuration file
Vinicius Costa Gomes [Tue, 15 May 2012 22:20:02 +0000 (19:20 -0300)]
build: install org.neard.conf dbus configuration file

Also, adds org.neard.conf to the source package.

12 years agotools: Fix snep-send compilation with glibc 2.15
Vinicius Costa Gomes [Tue, 15 May 2012 22:20:01 +0000 (19:20 -0300)]
tools: Fix snep-send compilation with glibc 2.15

From glibc 2.15 on, AF_NFC is already defined, so we need to protect
all local redefinitions.

12 years agobuild: Add support for building with libnl-3.0
Vinicius Costa Gomes [Tue, 15 May 2012 22:20:00 +0000 (19:20 -0300)]
build: Add support for building with libnl-3.0

libnl-3.0 has a precedence over the others. The change in the indetation
was made to reflect that.

12 years agobuild: Fix typo when checking for libnl-2.0
Vinicius Costa Gomes [Tue, 15 May 2012 22:19:59 +0000 (19:19 -0300)]
build: Fix typo when checking for libnl-2.0

12 years agogitignore: add tools/snep-send
Vinicius Costa Gomes [Tue, 15 May 2012 22:19:58 +0000 (19:19 -0300)]
gitignore: add tools/snep-send

12 years agoRelease 0.3 0.3
Samuel Ortiz [Mon, 14 May 2012 16:54:34 +0000 (18:54 +0200)]
Release 0.3

12 years agodevice: Dbus reply to device Push request and message queue
Ravi kumar Veeramally [Fri, 11 May 2012 14:45:02 +0000 (17:45 +0300)]
device: Dbus reply to device Push request and message queue

Replying to device push request after success or failure response
from p2p device. Maintaining push message pending queue and reply
-EALREADY if push transaction already in place.

12 years agosnep: Implement SNEP Push fragmentation
Ravi kumar Veeramally [Mon, 14 May 2012 15:52:03 +0000 (18:52 +0300)]
snep: Implement SNEP Push fragmentation

If intended Push message is larger than lower layers max allowable
length, then slpit into multiple fragments and wait for CONTINUE
response from p2p server for first fragment and then send all
remaining fragments and close on SUCCESS response and call the
callback with status.

12 years agobluetooth: Complete get_properties parsing
Olivier Guiter [Mon, 14 May 2012 12:36:35 +0000 (12:36 +0000)]
bluetooth: Complete get_properties parsing

12 years agobluetooth: Add pairing flag on parsing
Olivier Guiter [Mon, 14 May 2012 12:36:34 +0000 (12:36 +0000)]
bluetooth: Add pairing flag on parsing

The action flag allows a simple "parse oob data" or a "parse and
pair the devices" call.

12 years agobluetooth: Add synchronous local oob data read
Olivier Guiter [Mon, 14 May 2012 12:36:33 +0000 (12:36 +0000)]
bluetooth: Add synchronous local oob data read

12 years agobluetooth: Fix EIR parsing routine
Olivier Guiter [Mon, 14 May 2012 12:36:32 +0000 (12:36 +0000)]
bluetooth: Fix EIR parsing routine

12 years agobluetooth: Store default BT adapter properties
Olivier Guiter [Mon, 14 May 2012 12:36:31 +0000 (12:36 +0000)]
bluetooth: Store default BT adapter properties

12 years agobluetooth: Add handlers to track adapters changes
Olivier Guiter [Mon, 14 May 2012 12:36:30 +0000 (12:36 +0000)]
bluetooth: Add handlers to track adapters changes

12 years agop2p: Close server socket when getting a polling error
Samuel Ortiz [Wed, 9 May 2012 11:04:30 +0000 (13:04 +0200)]
p2p: Close server socket when getting a polling error

The binding will happen again when the next device is detected.

12 years agoadapter: Disconnect and check for presence when getting an I/O error
Samuel Ortiz [Fri, 4 May 2012 18:01:56 +0000 (20:01 +0200)]
adapter: Disconnect and check for presence when getting an I/O error

Without doing so, the automatic polling won't start.

12 years agotest: Add a device push script
Ravi kumar Veeramally [Wed, 2 May 2012 16:00:43 +0000 (19:00 +0300)]
test: Add a device push script

12 years agodevice: Implemented Push method
Ravi kumar Veeramally [Wed, 2 May 2012 16:00:42 +0000 (19:00 +0300)]
device: Implemented Push method

Push NDEF message to p2p device by providing dbus dictionary
of attributes.

12 years agosnep: Implement initial part of snep push method
Ravi kumar Veeramally [Thu, 3 May 2012 12:40:57 +0000 (15:40 +0300)]
snep: Implement initial part of snep push method

Implemented p2p push and snep push method. Right now sending
data and closing socket file descriptor immediately. Actually
this has to be done by attaching a listening event and push
data when socket is ready to take data in.

12 years agosnep-send: Fix Usage string
Samuel Ortiz [Wed, 2 May 2012 09:14:18 +0000 (11:14 +0200)]
snep-send: Fix Usage string

12 years agotools: More verbose snep-send error paths
Samuel Ortiz [Thu, 26 Apr 2012 13:34:09 +0000 (15:34 +0200)]
tools: More verbose snep-send error paths

12 years agomifare: Parse the complete tag buffer
Samuel Ortiz [Thu, 26 Apr 2012 22:24:10 +0000 (00:24 +0200)]
mifare: Parse the complete tag buffer

This fixes a regression introduced with the tlv parsing API changes.

12 years agonfctype1: Read UID before reading all when NFCID is not set
Samuel Ortiz [Thu, 26 Apr 2012 12:56:44 +0000 (14:56 +0200)]
nfctype1: Read UID before reading all when NFCID is not set

12 years agotag: Add tag NFCID setter
Samuel Ortiz [Thu, 26 Apr 2012 12:18:09 +0000 (14:18 +0200)]
tag: Add tag NFCID setter

12 years agonfctype1: Append UID to type 1 commands
Samuel Ortiz [Thu, 26 Apr 2012 12:17:07 +0000 (14:17 +0200)]
nfctype1: Append UID to type 1 commands

12 years agonetlink: Handle the target lost event
Samuel Ortiz [Wed, 25 Apr 2012 16:04:20 +0000 (18:04 +0200)]
netlink: Handle the target lost event

12 years agoTODO: Update
Samuel Ortiz [Tue, 24 Apr 2012 22:48:03 +0000 (00:48 +0200)]
TODO: Update

12 years agotools: Add an SNEP sending testing program
Samuel Ortiz [Tue, 24 Apr 2012 22:34:12 +0000 (00:34 +0200)]
tools: Add an SNEP sending testing program

It simply sends a Text NDEF over a polled LLCP peer.

12 years agoadapter: Restart polling when devices link goes down
Samuel Ortiz [Tue, 24 Apr 2012 15:40:44 +0000 (17:40 +0200)]
adapter: Restart polling when devices link goes down

No need for a check presence implementation as the MAC link status
will be updated over netlink.

12 years agotest: Add a tag writing script
Samuel Ortiz [Tue, 24 Apr 2012 13:04:19 +0000 (15:04 +0200)]
test: Add a tag writing script