Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESL PR separate into subsys and sample #12012

Closed

Conversation

pirun
Copy link
Contributor

@pirun pirun commented Aug 11, 2023

Separate ESL application into two parts.

BLE ESL service and profile in subsys/bluetooth/service.
ESL AP and Tag sample in samples/bluetooth.

@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label Aug 11, 2023
@pirun pirun marked this pull request as draft August 11, 2023 03:38
@pirun pirun added the DNM label Aug 11, 2023
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Aug 11, 2023

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
desktop52_verification X
test-fw-nrfconnect-ble X
test-fw-nrfconnect-ble_samples X
test-sdk-find-my X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

@alwa-nordic
Copy link
Contributor

There is a compliance failure. It's rejecting the images as binary files. Do you have a solution for this?

@alwa-nordic
Copy link
Contributor

Does this PR replace the old PR? If so can you close the old one?

@pirun
Copy link
Contributor Author

pirun commented Aug 16, 2023

Does this PR replace the old PR? If so can you close the old one?

This is a draft to show how ESL application PR could be separated into smaller chunk PR.
Will be closed soon as well as old PR

@pirun pirun closed this Aug 16, 2023
@pirun
Copy link
Contributor Author

pirun commented Aug 24, 2023

Re-open for tech writer document review.

@pirun pirun reopened this Aug 24, 2023
@pirun pirun force-pushed the esl_pr_seperate_sample_and_subsys branch from 46a6c88 to 85538a3 Compare August 24, 2023 04:14
@greg-fer
Copy link
Contributor

Adding @annakielar and @peknis to take care of the docs, as per mail thread.

doc/nrf/libraries/bluetooth_services/services/esl.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/bluetooth_services/services/esl.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/bluetooth_services/services/esl.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/bluetooth_services/services/esl.rst Outdated Show resolved Hide resolved
doc/nrf/libraries/bluetooth_services/services/esl.rst Outdated Show resolved Hide resolved
samples/bluetooth/central_esl/README.rst Outdated Show resolved Hide resolved
samples/bluetooth/central_esl/central_esl_subcommands.rst Outdated Show resolved Hide resolved
samples/bluetooth/central_esl/central_esl_subcommands.rst Outdated Show resolved Hide resolved
samples/bluetooth/central_esl/central_esl_subcommands.rst Outdated Show resolved Hide resolved
samples/bluetooth/central_esl/central_esl_subcommands.rst Outdated Show resolved Hide resolved
@pirun pirun force-pushed the esl_pr_seperate_sample_and_subsys branch from 85538a3 to 0bcfdb0 Compare September 6, 2023 06:32
Add electronic shelf label service (ESLS).
Add electronic shelf label service (ESLS) client.
It implemented all mandatory features.
Leave all hardware-related control to callback functions.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
Add a sample running electronic shelf label service
as tag role.
The sample use LED on DKs to simulate EPD display.
This sample provides real EPD reference code as well.

Add a sample running esl client as AP role.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
@pirun
Copy link
Contributor Author

pirun commented Sep 6, 2023

Change PR status to trigger doc build.

@pirun pirun marked this pull request as ready for review September 6, 2023 14:07
@pirun pirun removed the DNM label Sep 6, 2023
@pirun pirun force-pushed the esl_pr_seperate_sample_and_subsys branch from da36dc0 to 1844c74 Compare September 6, 2023 14:13
Add esl service and profile library document.

Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no>
@pirun pirun force-pushed the esl_pr_seperate_sample_and_subsys branch from 1844c74 to 2d630c1 Compare September 6, 2023 15:48
@pirun pirun marked this pull request as draft September 7, 2023 00:02
@pirun pirun added the DNM label Sep 7, 2023
Tuning the library docs to match them to
the template, at least to some extent.

Signed-off-by: Pekka Niskanen <pekka.niskanen@nordicsemi.no>
A few more minor fixes to the docs, based
on answers from the SME.

Signed-off-by: Pekka Niskanen <pekka.niskanen@nordicsemi.no>
Using a link to the sample doc.

Signed-off-by: Pekka Niskanen <pekka.niskanen@nordicsemi.no>
You need to implement the following callbacks to if display device exists on ESL Tag.
The :c:func:`display_init` callback is used to initialize the display device if additional work is not done by display driver. e.g.: Initialize memory region for framebuffer, set font type. To implement this callback, you need to write a function that initializes the display device.
This function is called when the tag device is booting up and unassociated.
To implement this callback, you need to write a function that takes the index of the display device and displays the necessary information on the device.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to describe what parameters the function takes?
This is described in the API documentation section.

Similarly in other places.

Comment on lines 310 to 311
If the sensor reading is successful, value ``0`` is returned.
If the sensor reading is not fast enough or fails, value `-EBUSY` is returned.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A detailde description of the returned values by the funkction shoud be in the API dokumentation.
There is a sentence there: "If the operation was successful. Otherwise, a (negative) error code is returned", this can be extended.

Comment on lines +143 to +154
Power Consumption Measurement
=============================

Prerequisite: Read :ref:`app_power_opt_general` and get `Power Profiler Kit II (PPK2)`_

1. Build and program the Tag (:ref:`nrf52833dk_nrf52833`) Power Profiling configuration by following :ref:`peripheral_esl_build_and_program` and :ref:`peripheral_esl_power_profiling_variant`

#. Follow `Preparing a DK for current measurement`_ to prepare 52833DK for Power Consumption measurements

a. Cut SB40.
b. Connect VOUT of PPK2 to nRF current Measurement on DK, connect GND of PPK2 to External supply negative polarity pin (`-`). By doing so, PPK2 will provide power to only the nRF52 SoC.
c. Connect the PPK2 (powered ON) in “Source Meter” mode to the :ref:`nrf52833dk_nrf52833` (turned ON) and enable power output 3000mV on the Power Profiler GUI and start measurement. Power the rest of the ESL Tag DevKit via USB (same as programming USB port), and keep the DevKit turned ON.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that in the sample dokumentation we don't need a dedscription of how to use the Power Profiler Kit. This is included in the PPK documentation.

Copy link
Contributor

@maje-emb maje-emb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some general suggestion from me.
ESL Service:

  • UUID definitions for this service should be in the zephyr/include/zephyr/bluetooth/uuuid.h file.
  • It seems that the service can be registered statically. We don't need to use "Bluetooth GATT attribute pools"
  • Initialization of the display, LEDs, sensors should be outside the service.
  • The setup of advertising, PAwR should be outside the service.
  • The OTS should run alongside the ESL service; it is not a part of it.
  • There are a lot of work_q and work Items used. Are all of them necessary? I'm worried that it could lead to a race condition. Please optimize it.
  • Connection and bond management should be outside the service.

ESL Client:

  • Scanning and advertising should be outside.
  • The discovery process should be outside.
  • Client should be able to read or write all the service characteristics.

Other:

  • Are the Kconfig.esl_client.defaults and Kconfig.esl.defaults files necessary?
  • In file names, functions, etc., consider using the acronym "ESLS" (Electronic Shelf Labels Service).
  • In the /nrf/include/bluetooth/services/ directory, I suggest that there should be only esl.h and esl_client.h files.

The proposal for changes to the Service and Client APIs will be discussed offline.

@greg-fer
Copy link
Contributor

greg-fer commented Nov 2, 2023

I might've been wrong in my assessment and the ESL might fall into the category of demos according to https://nordicsemi.atlassian.net/wiki/spaces/NC/pages/56004256/Product+requirements . @peknis , @annakielar , @pirun , could you discuss this with Lorenzo and Eirik?

@jori-nordic jori-nordic removed the request for review from annakielar December 12, 2023 07:02
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Oct 18, 2024
@github-actions github-actions bot closed this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNM doc-required PR must not be merged without tech writer approval. Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants