Topics

Zephyr Sample Demo with nrf52840 Dongle


Muhammad Muh <muhammad.muh83@...>
 

Dear,


I am totally new in Zephyr. I am new in the field of IoT programming. I have gone through the tutorial of zephyr. Learned some things. But now i want to go through the Sample examples of Blink LED and Mesh Demo so that i can have a start off. I have tried to run the sample as per the instructions given in the tutorial but not successful. I will be grateful if you can help me in this regards. Waiting for the kind reply. Thank you in advance.


Regards

Muhammad.


Serafin
 

Hi Muhammad


I doubt anyone here can give you a better general write up then the documentation. So you need to provide information about the specific problem.

  • Which exact instructions are you following
  • What is your operating System and Toolchain
  • Which version of Zephyr are you running
  • Which steps are unclear / make you problems
  • Where does it fail? What is the error output.
  • Additional information

Best regards

Serafin


On 24/07/2019 03:52, Muhammad Muh wrote:

Dear,


I am totally new in Zephyr. I am new in the field of IoT programming. I have gone through the tutorial of zephyr. Learned some things. But now i want to go through the Sample examples of Blink LED and Mesh Demo so that i can have a start off. I have tried to run the sample as per the instructions given in the tutorial but not successful. I will be grateful if you can help me in this regards. Waiting for the kind reply. Thank you in advance.


Regards

Muhammad.


Lars Knudsen
 

Hi Muhammad,

I have an example project that needs a few changes to be compatible with the latest master (was using 1.14-rc) - but maybe it can be used for inspiration:


br
Lars

On Wed, Jul 24, 2019 at 9:17 AM Serafin <serafin@...> wrote:

Hi Muhammad


I doubt anyone here can give you a better general write up then the documentation. So you need to provide information about the specific problem.

  • Which exact instructions are you following
  • What is your operating System and Toolchain
  • Which version of Zephyr are you running
  • Which steps are unclear / make you problems
  • Where does it fail? What is the error output.
  • Additional information

Best regards

Serafin


On 24/07/2019 03:52, Muhammad Muh wrote:

Dear,


I am totally new in Zephyr. I am new in the field of IoT programming. I have gone through the tutorial of zephyr. Learned some things. But now i want to go through the Sample examples of Blink LED and Mesh Demo so that i can have a start off. I have tried to run the sample as per the instructions given in the tutorial but not successful. I will be grateful if you can help me in this regards. Waiting for the kind reply. Thank you in advance.


Regards

Muhammad.


Muhammad Muh <muhammad.muh83@...>
 

Dear All,


In reference to the NRF52840 Dongle Example, yesterday i send you the problem with the first step i.e.

west build -b nrf52840_pca10059 zephyr/samples/basic/blinky
Now this step is going smoothly..
The second step (
nrfutil pkg generate --hw-version 52 --sd-req=0x00 \
        --application build/zephyr/zephyr.hex \
        --application-version 1 blinky.zip)
is giving the error message which is as follows:
~/zephyrproject/zephyr/samples/basic/blinky$ nrfutil pkg generate --hw-version 52 --sd-req=0x00 \
>         --application build/zephyr/zephyr.hex \
>         --application-version 1 blinky.zip

|===============================================================|
|##      ##    ###    ########  ##    ## #### ##    ##  ######  |
|##  ##  ##   ## ##   ##     ## ###   ##  ##  ###   ## ##    ## |
|##  ##  ##  ##   ##  ##     ## ####  ##  ##  ####  ## ##       |
|##  ##  ## ##     ## ########  ## ## ##  ##  ## ## ## ##   ####|
|##  ##  ## ######### ##   ##   ##  ####  ##  ##  #### ##    ## |
|##  ##  ## ##     ## ##    ##  ##   ###  ##  ##   ### ##    ## |
| ###  ###  ##     ## ##     ## ##    ## #### ##    ##  ######  |
|===============================================================|
|You are not providing a signature key, which means the DFU     |
|files will not be signed, and are vulnerable to tampering.     |
|This is only compatible with a signature-less bootloader and is|
|not suitable for production environments.                      |
|===============================================================|

Traceback (most recent call last):
  File "/home/muhammad/.local/bin/nrfutil", line 11, in <module>
    sys.exit(cli())
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/muhammad/.local/lib/python3.6/site-packages/nordicsemi/__main__.py", line 867, in generate
    package.generate_package(zipfile_path)
  File "/home/muhammad/.local/lib/python3.6/site-packages/nordicsemi/dfu/package.py", line 403, in generate_package
    for key, firmware_data in self.firmwares_data.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Thank you for your help.
Regards






From: Muhammad Muh
Sent: Wednesday, July 24, 2019 9:52 AM
To: devel@... <devel@...>
Subject: Zephyr Sample Demo with nrf52840 Dongle
 

Dear,


I am totally new in Zephyr. I am new in the field of IoT programming. I have gone through the tutorial of zephyr. Learned some things. But now i want to go through the Sample examples of Blink LED and Mesh Demo so that i can have a start off. I have tried to run the sample as per the instructions given in the tutorial but not successful. I will be grateful if you can help me in this regards. Waiting for the kind reply. Thank you in advance.


Regards

Muhammad.


Lars Knudsen
 

Hi Muhammad,

it seems like you are depending on python 3.6 - I don't have my env on the machine I'm using right now, but seem to remember you need python 2 (I might be wrong)

br
Lars

On Wed, Jul 24, 2019 at 2:19 PM Muhammad Muh <muhammad.muh83@...> wrote:

Dear All,


In reference to the NRF52840 Dongle Example, yesterday i send you the problem with the first step i.e.

west build -b nrf52840_pca10059 zephyr/samples/basic/blinky
Now this step is going smoothly..
The second step (
nrfutil pkg generate --hw-version 52 --sd-req=0x00 \
        --application build/zephyr/zephyr.hex \
        --application-version 1 blinky.zip)
is giving the error message which is as follows:
~/zephyrproject/zephyr/samples/basic/blinky$ nrfutil pkg generate --hw-version 52 --sd-req=0x00 \
>         --application build/zephyr/zephyr.hex \
>         --application-version 1 blinky.zip

|===============================================================|
|##      ##    ###    ########  ##    ## #### ##    ##  ######  |
|##  ##  ##   ## ##   ##     ## ###   ##  ##  ###   ## ##    ## |
|##  ##  ##  ##   ##  ##     ## ####  ##  ##  ####  ## ##       |
|##  ##  ## ##     ## ########  ## ## ##  ##  ## ## ## ##   ####|
|##  ##  ## ######### ##   ##   ##  ####  ##  ##  #### ##    ## |
|##  ##  ## ##     ## ##    ##  ##   ###  ##  ##   ### ##    ## |
| ###  ###  ##     ## ##     ## ##    ## #### ##    ##  ######  |
|===============================================================|
|You are not providing a signature key, which means the DFU     |
|files will not be signed, and are vulnerable to tampering.     |
|This is only compatible with a signature-less bootloader and is|
|not suitable for production environments.                      |
|===============================================================|

Traceback (most recent call last):
  File "/home/muhammad/.local/bin/nrfutil", line 11, in <module>
    sys.exit(cli())
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/muhammad/.local/lib/python3.6/site-packages/nordicsemi/__main__.py", line 867, in generate
    package.generate_package(zipfile_path)
  File "/home/muhammad/.local/lib/python3.6/site-packages/nordicsemi/dfu/package.py", line 403, in generate_package
    for key, firmware_data in self.firmwares_data.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Thank you for your help.
Regards






From: Muhammad Muh
Sent: Wednesday, July 24, 2019 9:52 AM
To: devel@... <devel@...>
Subject: Zephyr Sample Demo with nrf52840 Dongle
 

Dear,


I am totally new in Zephyr. I am new in the field of IoT programming. I have gone through the tutorial of zephyr. Learned some things. But now i want to go through the Sample examples of Blink LED and Mesh Demo so that i can have a start off. I have tried to run the sample as per the instructions given in the tutorial but not successful. I will be grateful if you can help me in this regards. Waiting for the kind reply. Thank you in advance.


Regards

Muhammad.


Carles Cufi
 

Hi there,

 

nrfutil does not support Python 3 for now. You will need to install Python 2 and then install nrfutil with its pip2.

 

Carles

 

From: devel@... <devel@...> On Behalf Of via Lists.Zephyrproject.Org
Sent: 24 July 2019 09:15
To: devel@...
Cc: devel@...
Subject: Re: [Zephyr-devel] Zephyr Sample Demo with nrf52840 Dongle

 

Dear All,

 

In reference to the NRF52840 Dongle Example, yesterday i send you the problem with the first step i.e.

west build -b nrf52840_pca10059 zephyr/samples/basic/blinky

Now this step is going smoothly..

The second step (

nrfutil pkg generate --hw-version 52 --sd-req=0x00 \
        --application build/zephyr/zephyr.hex \
        --application-version 1 blinky.zip)

is giving the error message which is as follows:

~/zephyrproject/zephyr/samples/basic/blinky$ nrfutil pkg generate --hw-version 52 --sd-req=0x00 \
>         --application build/zephyr/zephyr.hex \
>         --application-version 1 blinky.zip

|===============================================================|
|##      ##    ###    ########  ##    ## #### ##    ##  ######  |
|##  ##  ##   ## ##   ##     ## ###   ##  ##  ###   ## ##    ## |
|##  ##  ##  ##   ##  ##     ## ####  ##  ##  ####  ## ##       |
|##  ##  ## ##     ## ########  ## ## ##  ##  ## ## ## ##   ####|
|##  ##  ## ######### ##   ##   ##  ####  ##  ##  #### ##    ## |
|##  ##  ## ##     ## ##    ##  ##   ###  ##  ##   ### ##    ## |
| ###  ###  ##     ## ##     ## ##    ## #### ##    ##  ######  |
|===============================================================|
|You are not providing a signature key, which means the DFU     |
|files will not be signed, and are vulnerable to tampering.     |
|This is only compatible with a signature-less bootloader and is|
|not suitable for production environments.                      |
|===============================================================|
Traceback (most recent call last):
  File "/home/muhammad/.local/bin/nrfutil", line 11, in <module>
    sys.exit(cli())
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/muhammad/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/muhammad/.local/lib/python3.6/site-packages/nordicsemi/__main__.py", line 867, in generate
    package.generate_package(zipfile_path)
  File "/home/muhammad/.local/lib/python3.6/site-packages/nordicsemi/dfu/package.py", line 403, in generate_package
    for key, firmware_data in self.firmwares_data.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
 
Thank you for your help.
 
Regards
 

 

 

 


From: Muhammad Muh
Sent: Wednesday, July 24, 2019 9:52 AM
To: devel@... <devel@...>
Subject: Zephyr Sample Demo with nrf52840 Dongle

 

Dear,

 

I am totally new in Zephyr. I am new in the field of IoT programming. I have gone through the tutorial of zephyr. Learned some things. But now i want to go through the Sample examples of Blink LED and Mesh Demo so that i can have a start off. I have tried to run the sample as per the instructions given in the tutorial but not successful. I will be grateful if you can help me in this regards. Waiting for the kind reply. Thank you in advance.

 

Regards

Muhammad.