Date   

Zephyr Project: APIs - Tue, 08/25/2020 4:00pm-5:00pm, Please RSVP #cal-reminder

devel@lists.zephyrproject.org Calendar <devel@...>
 

Reminder: Zephyr Project: APIs

When: Tuesday, 25 August 2020, 4:00pm to 5:00pm, (GMT+00:00) UTC

Where:Microsoft Teams Meeting

An RSVP is requested. Click here to RSVP

Organizer: devel@...

Description:

Meeting decisions/discussions in their respective PRs, tracked here: https://github.com/zephyrproject-rtos/zephyr/projects/18


________________________________________________________________________________
+1 321-558-6518 United States, Orlando (Toll)
Conference ID: 317 990 129#
Local numbers | Reset PIN | Learn more about Teams | Meeting options
 
 
________________________________________________________________________________


API meeting: agenda

Carles Cufi
 


Re: C++ user apps

Kim Bøndergaard
 


For application code it seems to be OK. You just have to enable it properly in your config:
Some of the configs I've been using:

CONFIG_STD_CPP11=y / CONFIG_STD_CPP14=y
CONFIG_NEWLIB_LIBC=y
CONFIG_CPLUSPLUS=y
CONFIG_LIB_CPLUSPLUS=y
CONFIG_RTTI=y

Beware of some of the pitfalls with e.g. exceptions.

Kim Bøndergaard
Prevas A/S
Team Manager / Systems Architect
 
Hedeager 3, DK-8200 Aarhus N

Phone +45 3315 9090
Mobile +45 5154 3961
kibo@... 
www.prevas.dk

 

 


From: devel@... <devel@...> on behalf of Simon Glass via lists.zephyrproject.org <sjg=chromium.org@...>
Sent: Monday, August 24, 2020 17:17
To: devel <devel@...>
Subject: [Zephyr-devel] C++ user apps
 
Hi,

Is there any guidance about using C++ in Zephyr? Is it common / recommended?

Does anyone have a link to a previous discussion?

Regards,
Simon




Re: C++ user apps

Peter A. Bigot
 

The meta-issue is: https://github.com/zephyrproject-rtos/zephyr/issues/18554

I personally am using C++20 but haven't got language-independent functionality to the point where I can really start making progress in a real application.  Generally C++ should work at application level and you stick to basic language capabilities avoiding things like atomic, thread, and (to some degree) exceptions.

Peter


C++ user apps

Simon Glass
 

Hi,

Is there any guidance about using C++ in Zephyr? Is it common / recommended?

Does anyone have a link to a previous discussion?

Regards,
Simon


BLE Controller Core Spec 5.2 Power Control Feature

Khaled Elsayed
 

Hello all,

I am working on the LE power control feature of Core Spec 5.2. I am almost 60-70% done defining the air-messages and the state machine within the llcp and he actions/behavior upon receiving PWR_CTRL_REQ/RSP or a related REJ. Also, not currently handling PWR_CTRL_IND and this should come later I guess. Feature still untested but it is in the pipeline.

Main issues now are:

1) Handling the APR (acceptable power reduction) in the PWR_CTRL_RSP

2) Insuring there are no leaks or any PWR_CTRL received pdu not released

3) Issuing command to change PHY TX power (I used the same method as in the host based TX power that this PR https://github.com/zephyrproject-rtos/zephyr/pull/19779 is addressing which seems to only change the connection TX power in the connection record and I guess the radio manager will then somehow use that to control the PHY?)

4) Overall testing. I need help here from the Zephyr Bluetooth developers.

Since this is my first potential contribution to Zephyr, I am following the contribution guidelines by posting in the mailing list to discuss the feature before proceeding with a pull request. 

Best regards,

Khaled Elsayed



The information contained in this message is privileged, confidential or otherwise protected from use and disclosure. If you are not the intended recipient, you are hereby notified that any review, disclosure, copying or dissemination of this message or the taking of any action in reliance on its contents, or other use is strictly prohibited.  If you received this message in error, please notify us immediately by replying to the message and deleting it from your computer.  Thank you.
Si-Vision, LLC.


Zephyr module and build settings. (BOARD, SOC, DTS, and ARCH root support)

Rasmussen, Torsten
 

Hi,

 

Zephyr modules has been extended to support multiple BOARD_ROOT, SOC_ROOT, DTS_ROOT, and ARCH_ROOT on command line.

Also Zephyr modules `module.yml` schema has been extended to allow modules to describe those roots as build settings.

 

For example:

build:

  settings:

    board_root: .

    dts_root: .

    soc_root: .

    arch_root: .

 

See more here: https://docs.zephyrproject.org/latest/guides/modules.html#build-settings

 

As part of this, the `SOC_DIR` in Kconfig files has been removed, and any Kconfig code relying on `SOC_DIR` must be updated, for example to use `rsource`.

If your code is currently having a Kconfig in `<my_soc_root>/<arch>/Kconfig` sourcing other files based on `SOC_DIR`:

 

<my_soc_root>/<arch>/Kconfig:

source $(SOC_DIR)/$(ARCH)/Kconfig.soc

 

then such code can be updated to:

rsource Kconfig.soc

 

For more details, see release notes and relevant PRs:

https://github.com/zephyrproject-rtos/zephyr/blob/master/doc/releases/release-notes-2.4.rst#build-and-infrastructure

https://github.com/zephyrproject-rtos/zephyr/pull/26715

https://github.com/zephyrproject-rtos/zephyr/pull/27431

 

 

Torsten Tejlmand Rasmussen

Senior R&D Engineer

P: +47 72 89 92 47

 

 

 

Nordic Semiconductor

Otto Nielsens veg 12, 7052 Trondheim, Norway

www.nordicsemi.com

 

 

        

 

 

           

 


Re: Cannot debug specific files #builds #debug #bluetooth #nrf52 #nrf52832

pawel.dunaj@...
 

Hi,
you can check the content of the build.ninja in the build directory. Look for the files that you suspect are built incorrectly and check the build flags. That should at least confirm that the problem is real.
Thanks,
Paweł


Cannot debug specific files #builds #debug #bluetooth #nrf52 #nrf52832

b.j.hendriks@...
 

Hello,

NOTE: I also posted this on github:https://github.com/zephyrproject-rtos/zephyr/issues/27706 I don't know which channel is the correct one for these types of issues. 

I have a question about debugging. I am using a nRF52 DK with Zephyr (sdk 0.11.3). I debug with Segger Ozone, using the zephyr.elf file and the recommended configurations: Target Interface: SWD,Interface Speed: 4000 KHz.
I try to debug a peripheral application: samples/bluetooth/peripheral_hr (tested with other apps as well).

In order to debug I need to disable some optimizations. I tried to configure this in the prj.conf which is located in the application folder (samples/bluetooth/peripheral_hr/prj.conf).

My config file looks like this:

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_SMP=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_GATT_DIS=y
CONFIG_BT_GATT_DIS_PNP=n
CONFIG_BT_GATT_BAS=y
CONFIG_BT_GATT_HRS=y
CONFIG_BT_DEVICE_NAME="Zephyr Heartrate Sensor"
CONFIG_BT_DEVICE_APPEARANCE=833

CONFIG_DEBUG=y
# CONFIG_NO_OPTIMIZATIONS=y

Without the debug configurations I can't traverse through the main.c correctly, but with the CONFIG_DEBUG flag enabled I can. But when I want to step in/over lines of code in:

zephyr/subsys/bluetooth/controller/ll_sw/nordic/lll/lll.c
or
zephyr/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c
and many more files in the controller

the debugger jumps to lines that doesn't exist or opens functions that are not present on that line. This is both for CONFIG_DEBUG and CONFIG_NO_OPTIMIZATIONS.

Somehow I think the bluetooth controller files for nordic are still optimized, and I can't find a method to disable the optimizations.

Also I found that enabling CONFIG_NO_OPTIMIZATIONS flag will not let me connect with the device anymore, is this intended?

Thank you,

Kind regards
John Hendriks


Pending pull requests needing reviews

lairdjm
 

Hi,

We have submitted 3 pull requests recently for adding new functionality to zephyr which are waiting to be merged/reviewed, is anyone able to have a look at the following PR’s to progress them?

Thanks,

Jamie


Zephyr Project: Dev Meeting - Thu, 08/20/2020 3:00pm-4:00pm, Please RSVP #cal-reminder

devel@lists.zephyrproject.org Calendar <devel@...>
 

Reminder: Zephyr Project: Dev Meeting

When: Thursday, 20 August 2020, 3:00pm to 4:00pm, (GMT+00:00) UTC

Where:Microsoft Teams Meeting

An RSVP is requested. Click here to RSVP

Organizer: devel@...

Description:

________________________________________________________________________________
+1 321-558-6518 United States, Orlando (Toll)
Conference ID: 483 314 739#
Local numbers | Reset PIN | Learn more about Teams | Meeting options
 
 
________________________________________________________________________________


Dev-Review Meeting Agenda Aug 20

Bolivar, Marti
 

Hi,

Kumar is out this week, so I'm sending the dev-review agenda.

* There are no open issues and just one seemingly stale PR (#24107) with
the "dev-review" label, so there doesn't seem to be anything open on
GitHub.

* We may use the meeting to continue discussion from Monday's Process WG
meeting about zephyr module update strategies, in particular one that
uses merge commits.

* Otherwise, we'll discuss any opens.

Thanks,
Martí


RFC: API Change: usb: Device argument to USB HID ops

Obalski, Emil <Emil.Obalski@...>
 

Hello,

 

I would like to post an RFC issue in USB subsystem. Here is the link for the issue itself:

 

And the proposed PR resolving the issue:

 

Kind regards,

Emil Obalski | Firmware Engineer
M +48 726 457 478| Kraków, Poland
nordicsemi.com | devzone.nordicsemi.com

Nordic_logo_signature

 


Zephyr Project: APIs - Tue, 08/18/2020 4:00pm-5:00pm, Please RSVP #cal-reminder

devel@lists.zephyrproject.org Calendar <devel@...>
 

Reminder: Zephyr Project: APIs

When: Tuesday, 18 August 2020, 4:00pm to 5:00pm, (GMT+00:00) UTC

Where:Microsoft Teams Meeting

An RSVP is requested. Click here to RSVP

Organizer: devel@...

Description:

Meeting decisions/discussions in their respective PRs, tracked here: https://github.com/zephyrproject-rtos/zephyr/projects/18


________________________________________________________________________________
+1 321-558-6518 United States, Orlando (Toll)
Conference ID: 317 990 129#
Local numbers | Reset PIN | Learn more about Teams | Meeting options
 
 
________________________________________________________________________________


Re: LVGL support and more examples

Lazar Chervenkov <lazar.chervenkov@...>
 

Hi Jan,

I'm using Nordic Connect SDK with Segger Embedded Studio, maybe that's why I'm confused. There is no option to select the shield in Segger and the nordic people forwarded me to Zephyr for help. So it's a magic circle :)

I also have a custom display shield with different spi pins and from the shield documentation I cannot understand how to remap the spi signals. The display driver is also different and I have to write it (it's a Sharp MIP LCD that I use).

Many thanks!

On Tue, Aug 18, 2020 at 8:29 AM Jan Van Winkel <jan.van_winkel@...> wrote:
Hi Lazar,

Not sure if your question is about how to tell LVGL which display to use or how to select a specific display controller.

The former is done by setting CONFIG_LVGL_DISPLAY_DEV_NAME to the same name as used by the display controller. Note that in case you are using any of the supported display shields, the shields config will take care of setting the correct value for CONFIG_LVGL_DISPLAY_DEV_NAME.

The later one, display controller selection, depends on the board you are using but all in-tree nrf52 boards, to my knowledge, make use of display shields and do not have on board display controllers. So the only thing you need is to pass the correct shield name during build.
For example to use the NRF52840 DK with an adafruit 2.8" TFT shield you can use following command to build: west build -b nrf52840dk_nrf52840 samples/gui/lvgl -- -DSHIELD=adafruit_2_8_tft_touch_v2

Jan

On Mon, Aug 17, 2020 at 10:49 PM Lazar Chervenkov <lazar.chervenkov@...> wrote:
Hi Carles,

I don't understand how to select which driver is used for the current project, as all are listed in the kconfig.

Thanks!

On Tue, 4 Aug 2020, 16:59 Cufi, Carles, <Carles.Cufi@...> wrote:

Hi there,

 

LVGL has been updated to version 7 in master:

https://github.com/zephyrproject-rtos/zephyr/pull/26982

 

Changing the display driver is done in Kconfig (and I assume Devicetree):

 

https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/display/Kconfig

 

Carles

 

 

From: devel@... <devel@...> On Behalf Of lazar.chervenkov via lists.zephyrproject.org
Sent: 04 August 2020 14:27
To: devel@...
Subject: [Zephyr-devel] LVGL support and more examples

 

Hi there,

I've been using LVGL for creating GUIs together with Nordic nRF5 SDK. I have to move to nRF Connect SDK for developing with nRF53 (which is actually based on Zephyr project). I'm quite new to Zephyr and I opened the LVGL example for nRF52840. But I'm using a different display driver and I cannot find a way how to change it. The information in the documentation is quite poor for this topic. Is there a plan to also move to LVGL version 7, as the one that is used now is version 6. 

Many thanks!



--
Mag. Lazar Chervenkov
phone: +4367761600476
e-mail: lazar.chervenkov@...


Re: LVGL support and more examples

Jan Van Winkel
 

Hi Lazar,

Not sure if your question is about how to tell LVGL which display to use or how to select a specific display controller.

The former is done by setting CONFIG_LVGL_DISPLAY_DEV_NAME to the same name as used by the display controller. Note that in case you are using any of the supported display shields, the shields config will take care of setting the correct value for CONFIG_LVGL_DISPLAY_DEV_NAME.

The later one, display controller selection, depends on the board you are using but all in-tree nrf52 boards, to my knowledge, make use of display shields and do not have on board display controllers. So the only thing you need is to pass the correct shield name during build.
For example to use the NRF52840 DK with an adafruit 2.8" TFT shield you can use following command to build: west build -b nrf52840dk_nrf52840 samples/gui/lvgl -- -DSHIELD=adafruit_2_8_tft_touch_v2

Jan

On Mon, Aug 17, 2020 at 10:49 PM Lazar Chervenkov <lazar.chervenkov@...> wrote:
Hi Carles,

I don't understand how to select which driver is used for the current project, as all are listed in the kconfig.

Thanks!

On Tue, 4 Aug 2020, 16:59 Cufi, Carles, <Carles.Cufi@...> wrote:

Hi there,

 

LVGL has been updated to version 7 in master:

https://github.com/zephyrproject-rtos/zephyr/pull/26982

 

Changing the display driver is done in Kconfig (and I assume Devicetree):

 

https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/display/Kconfig

 

Carles

 

 

From: devel@... <devel@...> On Behalf Of lazar.chervenkov via lists.zephyrproject.org
Sent: 04 August 2020 14:27
To: devel@...
Subject: [Zephyr-devel] LVGL support and more examples

 

Hi there,

I've been using LVGL for creating GUIs together with Nordic nRF5 SDK. I have to move to nRF Connect SDK for developing with nRF53 (which is actually based on Zephyr project). I'm quite new to Zephyr and I opened the LVGL example for nRF52840. But I'm using a different display driver and I cannot find a way how to change it. The information in the documentation is quite poor for this topic. Is there a plan to also move to LVGL version 7, as the one that is used now is version 6. 

Many thanks!


Re: LVGL support and more examples

Lazar Chervenkov <lazar.chervenkov@...>
 

Hi Carles,

I don't understand how to select which driver is used for the current project, as all are listed in the kconfig.

Thanks!

On Tue, 4 Aug 2020, 16:59 Cufi, Carles, <Carles.Cufi@...> wrote:

Hi there,

 

LVGL has been updated to version 7 in master:

https://github.com/zephyrproject-rtos/zephyr/pull/26982

 

Changing the display driver is done in Kconfig (and I assume Devicetree):

 

https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/display/Kconfig

 

Carles

 

 

From: devel@... <devel@...> On Behalf Of lazar.chervenkov via lists.zephyrproject.org
Sent: 04 August 2020 14:27
To: devel@...
Subject: [Zephyr-devel] LVGL support and more examples

 

Hi there,

I've been using LVGL for creating GUIs together with Nordic nRF5 SDK. I have to move to nRF Connect SDK for developing with nRF53 (which is actually based on Zephyr project). I'm quite new to Zephyr and I opened the LVGL example for nRF52840. But I'm using a different display driver and I cannot find a way how to change it. The information in the documentation is quite poor for this topic. Is there a plan to also move to LVGL version 7, as the one that is used now is version 6. 

Many thanks!


API meeting agenda: 2020-08-18

Peter A. Bigot
 

Carles has asked me to stand in for him again in coordinating this week's API telecon.
 
Topics include:
 
https://github.com/zephyrproject-rtos/zephyr/pull/25049 on USB include files, which I propose to move from Triage to In Progress.
 
https://github.com/zephyrproject-rtos/zephyr/pull/27624 which records my recollection of the consensus decision on certain API design policies.  Please add comments on the PR.
 
https://github.com/zephyrproject-rtos/zephyr/pull/25851 for JEDEC Serial Flash Discoverable Parameters inspection to confirm that it will support the various QSPI driver initiatives that are ongoing.
 
A status update on those QSPI driver initiatives.
 
Any other topics requested on the #api channel on slack or at the start of the meeting.
 
If time allows, a check on the status of in-progress issues and PRs in https://github.com/zephyrproject-rtos/zephyr/projects/18.
 
We are less than three weeks away from 2.4 feature freeze.  If you have enhancements or new capabilities you want in 2.4, please mark them with the 2.4 milestone on github.
 
If you want a PR or issue to be tracked in this meeting, please add it to the GitHub project.  If it's already there and you want it discussed in the next meeting, please say so via the #api channel on slack.
 
Teams link: https://teams.microsoft.com/l/meetup-join/19%3ameeting_NWU2MjZlYWEtZDcwMi00MWQzLTgwMjEtNDdkYjQwMjBjMmFj%40thread.v2/0?context=%7b%22Tid%22%3a%22af0096d9-700c-411a-b795-b3dd7122bad2%22%2c%22Oid%22%3a%22841a7c92-7816-4faf-9887-5e334e88f6d8%22%7d
 
https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-meeting
https://github.com/zephyrproject-rtos/zephyr/projects/18


Re: [LWM2M] Client example - QEMU x86

Guillaume PAQUET <guillaume.paquet@...>
 

Robert,

Thanks again for your help.
It works fine.
I just flush dev tap0 and it is ok now in IPv4 and IPv6.

There is just one issue in strdup allocation. Default size is too small (we need more than 4 buffers, for ref I put 100. i don't try less)
CONFIG_LOG_STRDUP_BUF_COUNT=100

Rgds,

Guillaume


On Mon, Aug 17, 2020 at 4:47 PM Guillaume PAQUET <guillaume.paquet@...> wrote:
Hi Robert,

I think I saw what is wrong for me.
I have bad configuration on tap0.
Indeed, I have not the good inet addr. Here is my output : 
tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.7.1  netmask 255.255.255.255  broadcast 192.168.7.255
        inet6 fe80::36:65ff:fe12:f27  prefixlen 64  scopeid 0x20<link>
        inet6 2001:db8::2  prefixlen 64  scopeid 0x0<global>
        ether 02:36:65:12:0f:27  txqueuelen 1000  (Ethernet)
        RX packets 33899  bytes 4153906 (4.1 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 38604  bytes 86555696 (86.5 MB)
        TX errors 0  dropped 10 overruns 0  carrier 0  collisions 0

Thanks for this. I'll let you know

Rgds,

Guillaume

On Mon, Aug 17, 2020 at 4:33 PM Lubos, Robert <Robert.Lubos@...> wrote:

Hi Guillaume,

 

I’ve just verified the sample with current master (4bd247af700a88df3d5f2cca60e46b5669b4aa71), and it works fine on my machine.

 

Please double check if:

  1. The tap0 interface is up before running the sample (for instance with `ifconfig` command, it should have 192.0.2.2 IPv4 address assigned). Perhaps there were some errors during initialization? For me the output looks like this:

$ sudo ./loop-slip-tap.sh

********SLIP started on ``/tmp/slip.dev''

slipfd and inslip reopened

ip neigh flush dev tap0

Cannot find device "tap0"

opened tap device ``/dev/tap0''

ifconfig tap0 up

ip -6 route add 2001:db8::/64 dev tap0

ip -6 addr add 2001:db8::2/64 dev tap0

ip route add 192.0.2.0/24 dev tap0

ip addr add 192.0.2.2/24 dev tap0

ifconfig tap0

 

tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.0.2.2  netmask 255.255.255.0  broadcast 0.0.0.0

        inet6 fe80::207d:e5ff:fef5:83b8  prefixlen 64  scopeid 0x20<link>

        inet6 2001:db8::2  prefixlen 64  scopeid 0x0<global>

        ether 22:7d:e5:f5:83:b8  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

       TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

  1. Probably you’ve overwritten the default port number somehow? ` CONFIG_LWM2M_PEER_PORT` shall be set to 5683 (default Leshan configuration).
  2. Leshan server is actually running (not sure how to verify this properly, maybe by opening its web GUI in the web browser, localhost:8080 by default).

 

You may also monitor the traffic on the tap0 interface with wireshark easily.

 

Regards,

Robert

From: devel@... [mailto:devel@...] On Behalf Of Guillaume PAQUET via lists.zephyrproject.org
Sent: Monday, August 17, 2020 11:22
To: devel@...
Subject: Re: [Zephyr-devel] [LWM2M] Client example - QEMU x86

 

Hi,

 

Sorry for bad manipulation, my previous mail was not finished ...

So to complete it, I run ./loop-socat.sh and sudo ./loop-slip-tap.sh in net-tools to be able to run QEMU x86 properly.

 

Thanks for your help

 

Rgds

 

Guillaume

 

On Mon, Aug 17, 2020 at 11:20 AM Guillaume PAQUET <guillaume.paquet@...> wrote:

Hello Zephyr Community,

 

I am Guillaume Paquet, I worked for STIMIO company and I am now working for SMILE company, specialised in Linux Open Source Embedded topics.

I tried to run LWM2M client demo on QEMU x86 target : https://github.com/zephyrproject-rtos/zephyr/tree/master/samples/net/lwm2m_client
I tried to connect to local leshan server but I don't achieve to register. i have always the following error

[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/1, buf:0x00144373, buflen:1
[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/10, buf:0x001443b2, buflen:2
[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:1/0/1, buf:0x0013dea0, buflen:4
[00:00:37.230,000] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'qemu_x86' with client lifetime 30
[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_parse_peerinfo: Parse url: coap://192.0.2.2
[00:00:37.230,000] <dbg> net_lwm2m_rd_client.sm_send_registration: registration sent [192.0.2.2]
[00:00:39.590,000] <inf> net_lwm2m_engine: Resending message: 0x0013b4a0
[00:00:44.280,000] <inf> net_lwm2m_engine: Resending message: 0x0013b4a0
[00:00:53.660,000] <inf> net_lwm2m_engine: Resending message: 0x0013b4a0
[00:01:12.420,000] <wrn> net_lwm2m_rd_client: Registration Timeout
[00:01:12.420,000] <dbg> net_lwm2m_client_app.rd_client_event: Disconnected
[00:01:12.420,000] <dbg> net_lwm2m_client_app.rd_client_event: Registration failure!

 

I only activated IPv4 (I also tried IPv6 and it does not work too).

Maybe I missed something in configuration.

For information, I run ./loop-socat.sh a

--

SMILE

10-12 rue Nicolas Appert
44100 NANTES

Guillaume PAQUET

Tech Manager

 

 

TwitterFacebookLinkedInGithub

 

ecoPour la planète, n'imprimez ce mail que si c'est nécessaire


 

--

SMILE

10-12 rue Nicolas Appert
44100 NANTES

Guillaume PAQUET

Tech Manager

 

 

TwitterFacebookLinkedInGithub

 

ecoPour la planète, n'imprimez ce mail que si c'est nécessaire



--
SMILE

10-12 rue Nicolas Appert
44100 NANTES

Guillaume PAQUET
Tech Manager


Twitter Facebook LinkedIn Github


eco Pour la planète, n'imprimez ce mail que si c'est nécessaire


--
SMILE

10-12 rue Nicolas Appert
44100 NANTES

Guillaume PAQUET
Tech Manager


Twitter Facebook LinkedIn Github


eco Pour la planète, n'imprimez ce mail que si c'est nécessaire


Re: [LWM2M] Client example - QEMU x86

Guillaume PAQUET <guillaume.paquet@...>
 

Hi Robert,

I think I saw what is wrong for me.
I have bad configuration on tap0.
Indeed, I have not the good inet addr. Here is my output : 
tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.7.1  netmask 255.255.255.255  broadcast 192.168.7.255
        inet6 fe80::36:65ff:fe12:f27  prefixlen 64  scopeid 0x20<link>
        inet6 2001:db8::2  prefixlen 64  scopeid 0x0<global>
        ether 02:36:65:12:0f:27  txqueuelen 1000  (Ethernet)
        RX packets 33899  bytes 4153906 (4.1 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 38604  bytes 86555696 (86.5 MB)
        TX errors 0  dropped 10 overruns 0  carrier 0  collisions 0

Thanks for this. I'll let you know

Rgds,

Guillaume

On Mon, Aug 17, 2020 at 4:33 PM Lubos, Robert <Robert.Lubos@...> wrote:

Hi Guillaume,

 

I’ve just verified the sample with current master (4bd247af700a88df3d5f2cca60e46b5669b4aa71), and it works fine on my machine.

 

Please double check if:

  1. The tap0 interface is up before running the sample (for instance with `ifconfig` command, it should have 192.0.2.2 IPv4 address assigned). Perhaps there were some errors during initialization? For me the output looks like this:

$ sudo ./loop-slip-tap.sh

********SLIP started on ``/tmp/slip.dev''

slipfd and inslip reopened

ip neigh flush dev tap0

Cannot find device "tap0"

opened tap device ``/dev/tap0''

ifconfig tap0 up

ip -6 route add 2001:db8::/64 dev tap0

ip -6 addr add 2001:db8::2/64 dev tap0

ip route add 192.0.2.0/24 dev tap0

ip addr add 192.0.2.2/24 dev tap0

ifconfig tap0

 

tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.0.2.2  netmask 255.255.255.0  broadcast 0.0.0.0

        inet6 fe80::207d:e5ff:fef5:83b8  prefixlen 64  scopeid 0x20<link>

        inet6 2001:db8::2  prefixlen 64  scopeid 0x0<global>

        ether 22:7d:e5:f5:83:b8  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

       TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

  1. Probably you’ve overwritten the default port number somehow? ` CONFIG_LWM2M_PEER_PORT` shall be set to 5683 (default Leshan configuration).
  2. Leshan server is actually running (not sure how to verify this properly, maybe by opening its web GUI in the web browser, localhost:8080 by default).

 

You may also monitor the traffic on the tap0 interface with wireshark easily.

 

Regards,

Robert

From: devel@... [mailto:devel@...] On Behalf Of Guillaume PAQUET via lists.zephyrproject.org
Sent: Monday, August 17, 2020 11:22
To: devel@...
Subject: Re: [Zephyr-devel] [LWM2M] Client example - QEMU x86

 

Hi,

 

Sorry for bad manipulation, my previous mail was not finished ...

So to complete it, I run ./loop-socat.sh and sudo ./loop-slip-tap.sh in net-tools to be able to run QEMU x86 properly.

 

Thanks for your help

 

Rgds

 

Guillaume

 

On Mon, Aug 17, 2020 at 11:20 AM Guillaume PAQUET <guillaume.paquet@...> wrote:

Hello Zephyr Community,

 

I am Guillaume Paquet, I worked for STIMIO company and I am now working for SMILE company, specialised in Linux Open Source Embedded topics.

I tried to run LWM2M client demo on QEMU x86 target : https://github.com/zephyrproject-rtos/zephyr/tree/master/samples/net/lwm2m_client
I tried to connect to local leshan server but I don't achieve to register. i have always the following error

[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/1, buf:0x00144373, buflen:1
[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/10, buf:0x001443b2, buflen:2
[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:1/0/1, buf:0x0013dea0, buflen:4
[00:00:37.230,000] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'qemu_x86' with client lifetime 30
[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_parse_peerinfo: Parse url: coap://192.0.2.2
[00:00:37.230,000] <dbg> net_lwm2m_rd_client.sm_send_registration: registration sent [192.0.2.2]
[00:00:39.590,000] <inf> net_lwm2m_engine: Resending message: 0x0013b4a0
[00:00:44.280,000] <inf> net_lwm2m_engine: Resending message: 0x0013b4a0
[00:00:53.660,000] <inf> net_lwm2m_engine: Resending message: 0x0013b4a0
[00:01:12.420,000] <wrn> net_lwm2m_rd_client: Registration Timeout
[00:01:12.420,000] <dbg> net_lwm2m_client_app.rd_client_event: Disconnected
[00:01:12.420,000] <dbg> net_lwm2m_client_app.rd_client_event: Registration failure!

 

I only activated IPv4 (I also tried IPv6 and it does not work too).

Maybe I missed something in configuration.

For information, I run ./loop-socat.sh a

--

SMILE

10-12 rue Nicolas Appert
44100 NANTES

Guillaume PAQUET

Tech Manager

 

 

TwitterFacebookLinkedInGithub

 

ecoPour la planète, n'imprimez ce mail que si c'est nécessaire


 

--

SMILE

10-12 rue Nicolas Appert
44100 NANTES

Guillaume PAQUET

Tech Manager

 

 

TwitterFacebookLinkedInGithub

 

ecoPour la planète, n'imprimez ce mail que si c'est nécessaire



--
SMILE

10-12 rue Nicolas Appert
44100 NANTES

Guillaume PAQUET
Tech Manager


Twitter Facebook LinkedIn Github


eco Pour la planète, n'imprimez ce mail que si c'est nécessaire