Closed Bug 982708 Opened 10 years ago Closed 10 years ago

[NFC] Output RF discovery id in emulator console

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED INVALID
tracking-b2g backlog

People

(Reporter: tzimmermann, Assigned: tzimmermann)

References

Details

Attachments

(1 file)

We need the RF discovery id to select the connection when talking to the NFC emulator.
Blocks: 980851
If you test this patch and run into bug 970263, you can work around it by manually enabling NFC in the Settings app before running the tests.
Attachment #8389887 - Flags: review?(vyang)
Comment on attachment 8389887 [details]
Github pull request (v2)

Looks good to me, but I haven't had a try yet.  Will do asap.
Attachment #8389887 - Flags: review?(vyang)
Flags: needinfo?(vyang)
Comment on attachment 8389887 [details]
Github pull request (v2)

This patch fails command "nfc ntf rf_intf_activated".

  emulator64-arm: external/qemu/hw/nfc-nci.c:1007: nfc_create_rf_intf_activated_ntf: Assertion `*re' failed.
Attachment #8389887 - Flags: review-
Flags: needinfo?(vyang)
If don't bother very much, please attach an test script for testing supported nfc console commands.  Currently we have only "nfc ntf rf_intf_activated <n>" referenced in https://mxr.mozilla.org/mozilla-central/source/dom/nfc/tests/marionette/test_nfc_manager_tech_discovered.js , but there are also:

  nfc ntf rf_discover <i>
  nfc ntf rf_intf_activated [<i>]
  nfc data s|send|w|wr|write <connid> <data>
Comment on attachment 8389887 [details]
Github pull request (v2)

I pushed an updated version into the pull request.

Changes since v1:

  - added proper error messages
  - reworked console interface to catch more errors earlier...
  - ...including !re->active_re
Attachment #8389887 - Attachment description: Github pull request → Github pull request (v2)
Attachment #8389887 - Flags: review- → review?(vyang)
Hi Vicamo

(In reply to Vicamo Yang [:vicamo][:vyang] from comment #4)
> If don't bother very much, please attach an test script for testing
> supported nfc console commands.  Currently we have only "nfc ntf
> rf_intf_activated <n>" referenced in
> https://mxr.mozilla.org/mozilla-central/source/dom/nfc/tests/marionette/
> test_nfc_manager_tech_discovered.js , but there are also:
> 
>   nfc ntf rf_discover <i>

This command makes the emulator 'discover' device no <i>. I implemented this once, but it broke at some point. I opened bug 984337 to track the issue.

>   nfc ntf rf_intf_activated [<i>]

I guess you mean rf_intf_activated without any parameter. This depends on rf_discover. If an NFC device has been discovered in the vicinity, it can be selected as 'active' by the NFC driver. Running rf_intf_activated without parameters should activate the selected interface for data transmission.

>   nfc data s|send|w|wr|write <connid> <data>

This is tracked in bug 980851.
Comment on attachment 8389887 [details]
Github pull request (v2)

Removing the r? for now. I need to re-evaluate if this change is necessary.
Attachment #8389887 - Flags: review?(vyang)
Blocks: b2g-NFC-2.0
No longer blocks: b2g-NFC-2.0
blocking-b2g: --- → backlog
This bug blocks NFC 2.0 release.
Blocks: b2g-NFC-2.0
I figured out that the internal id is not necessary. So this bug report is invalid.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: