Date   

hifive1 ble hci howto

alexander.2003@...
 

How can you get Bluetooth low energy working on the hifive1 using hci.


Re: West not installing; Alternative ways to install? #west

Marc Herbert
 

Hi,

 

   I think the current Getting Started guide really underestimates the importance of "pip[3]".

 

The zephyr repo has about 100 Python scripts now and counting and pip plays an incredibly crucial role in "Getting Started", it's like magic... until something breaks. Then it's like: "What was this pip thing again and what did it change on my system? Wait, *all that*?" Happened to me and apparently Johnnie too.

 

On Linux the interactions between Python packages installed by the Operating System vs the --user ones installed in ~/.local/bin can be especially fun, e.g. https://lwn.net/Articles/591421/

 

Reading the current https://docs.zephyrproject.org/latest/getting_started/getting_started.html from the start, the very first mention of pip for Windows and MacOS is:

 

Bootstrap west

Install the bootstrapper for Zephyr’s command-line tool, West (Zephyr’s meta-tool) in a shell or cmd.exe prompt:

# Linux

pip3 install --user west

 

# macOS and Windows

pip3 install west

 

... and then a forward-reference to installing more dependencies with pip. Not a word about what pip even is; into the deep end. Of course pip can easily be Googled, however one purpose of a Getting Started guide is IMHO to explain the bare minimum about every new critical thing without having to research it.

 

To avoid the forward reference and give pip a bit more of the credit it deserves, I think most things pip should be in a new, short but very first "PIP" section, in the main page and before anything about west considering west needs pip. This new and "true" PIP section can then have a very short introduction briefly describing what is and emphasizing how important it is and a link to its (good!) home page https://pip.pypa.io/en/stable/ in case something goes wrong. Such a "promotion" would hopefully encourage new users to pay a bit more attention to pip and for instance not dismiss any warning from it.

 

The slimmed down "Python Dependencies" section found later could then be downgraded to a one-line subsection of "Set Up a tool[chain]".

 

My 2 cents while I still remember about my "getting started" experience - this sort of experience tends to fade away very quickly :-)

 

Marc

 

 

From: <users@...> on behalf of "Birch Jr, Johnnie L" <johnnie.l.birch.jr@...>
Date: Sunday, 17 February 2019 at 12:01
To: Marti Bolivar <marti@...>
Cc: "users@..." <users@...>
Subject: Re: [Zephyr-users] West not installing; Alternative ways to install? #west

 

Hi Marti, all,

 

Thanks for the reply. There was something corrupt related to my pip/python install. Seems multiple versions of pip3 were found where version check at the command line would show version 3.5.2 while printing the version from a python statement would show 19.0.2. Ultimately I used some combination of commands using easy_install3 to get it installed instead of using pip.

 

Thanks,
Johnnie

 

From: Marti Bolivar [mailto:marti@...]
Sent: Friday, February 15, 2019 6:39 PM
To: Birch Jr, Johnnie L <johnnie.l.birch.jr@...>
Cc: users@...
Subject: Re: [Zephyr-users] West not installing; Alternative ways to install? #west

 

Hi Johnnie,

 

You can run "pip3 show -f west" to see where west was installed. Please make sure that is on your PATH. On Linux that is likely to be ~/.local/bin or so.

 

Marti

On Fri, Feb 15, 2019, 7:23 PM <johnnie.l.birch.jr@... wrote:

Hi All,

Getting started with zephyr, wanting to flash on an arduino 101 board for some experimentation. My host system is Mint 18.1 based on Ubuntu 16.04. I've followed steps to install the SDK and I assume that is installed correctly. Now I am following steps to install west from here: https://docs.zephyrproject.org/latest/getting_started/getting_started.html#get-the-source-code  but this step:

# Linux
pip3 install --user west


does not seem to do what it is intended. It leads to what looks like a successful install: 

jlb6740@yshou-mint:~$ pip3 install --user west
Collecting west
  Using cached https://files.pythonhosted.org/packages/7d/f7/228d4ba20feb2e2041abb2892b459e3bb7ddbfff28cc5963fb3787c92c46/west-0.5.4-py3-none-any.whl
Collecting colorama (from west)
  Using cached https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl
Collecting pykwalify (from west)
  Using cached https://files.pythonhosted.org/packages/36/9f/612de8ca540bd24d604f544248c4c46e9db76f6ea5eb75fb4244da6ebbf0/pykwalify-1.7.0-py2.py3-none-any.whl
Collecting PyYAML (from west)
Collecting python-dateutil>=2.4.2 (from pykwalify->west)
  Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting docopt>=0.6.2 (from pykwalify->west)
Collecting six>=1.5 (from python-dateutil>=2.4.2->pykwalify->west)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: colorama, six, python-dateutil, docopt, PyYAML, pykwalify, west
Successfully installed PyYAML-3.13 colorama-0.4.1 docopt-0.6.2 pykwalify-1.7.0 python-dateutil-2.8.0 six-1.10.0 west-0.5.4
You are using pip version 8.1.1, however version 19.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
jlb6740@yshou-mint:~$ westcos-tool ^C
jlb6740@yshou-mint:~/Downloads$ west --version
No command 'west' found, did you mean:
 Command 'test' from package 'coreutils' (main)
west: command not found
jlb6740@yshou-mint:~/Downloads$ 

 

but there is no "west" file to execute on my path. At the website for west the install command is slightly different:

pip3 install west


But again, nothing is found on my path. I tried to install the whl file, I also tried to install with sudo but nothing has given me an executable to move on to the next steps:

west init zephyrproject
cd zephyrproject
west update


What are some alternative ways to installing this west script? Even the "Using Zephyr with west" page seems to imply I will want it for flashing and debugging later so I assume this is not a step I should skip.

Thanks,
Johnnie

 

 


HCI_UART: Data Length Extension on NRF52840 make an error #ble #hci #uart #nrf52840

Nico.Platen@...
 

1.       Overview

1.1.   Hardware

-       nRF52840 DK (PC10056)

-       nRF52840 Module (u-blox NINA-B302)

1.2.   Software

1.2.1.   nRF52840 DK

-       zephyr 1.9.2

-       HCI_UART Example

-       nrf5.conf:

o   +CONFIG_BT_CTLR_TX_BUFFER_SIZE=251

o   +CONFIG_BT_RX_BUF_LEN=258

o   +CONFIG_BT_CTLR_DATA_LENGTH_MAX=251

o   (found in https://lists.zephyrproject.org/g/users/topic/data_length_extension_on/23297993?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,60,23297993)

1.2.2.   nRF52840 Module

-       Application created with Nordic SDK

1.2.3.   PC

-       Ubuntu 16.04

-       Bluez 5.48

-       Tools: btattach, gatttool

o   btattach –B /dev/ttyACM0 –S 1000000

o   gatttool –t random –b d8:74:5d:31:a7:73 –I

2.       Challenge

Attempting to use Data Length Extension (DLE) and set the message size to 247 bytes.

3.       Background

On the nRF52840 Module is a adapted Nordic example, with working DLE (tested with another BLE Dongle [no HCI])

For the first test, I use the btattach and gatttool tools for the communication. The normal communication with the default 27 bytes is working. In the next step (using DLE), the MTU Change Request is send, but never set. The transfer is with the default 27 bytes; see btmon log.

In the LL_LENGTH_REQ and LL_LENGTH_RSP both the RX/TX octets are 251 and in the LL_FEATURE_REQ and LL_FEATURE_RSP the DLE is true. Only the Sent Error Response - Request Not Supported shows that there is an error, but I down now why; see btmon log or Wireshark table.

4.       Info

4.1.   hciconfig

hci0:   Type: Primary  Bus: UART

        BD Address: E8:39:01:20:E0:39  ACL MTU: 251:7  SCO MTU: 0:0

        UP RUNNING

        RX bytes:252 acl:0 sco:0 events:19 errors:0

        TX bytes:139 acl:0 sco:0 commands:19 errors:0

        Features: 0x00 0x00 0x00 0x00 0x60 0x00 0x00 0x00

        Packet type: DM1 DH1 HV1

        Link policy:

        Link mode: SLAVE ACCEPT

 

4.2.   Wireshark (On Air)

No.

Time

Delta time (start to start)

Delta time (end to start)

Source

Destination

Protocol

Length

Info

11089

351.198.475

502

150

e8:39:00:20:e0:39

d8:74:5d:31:a7:73

LE LL

60

CONNECT_REQ

11091

351.199.263

230

150

Slave

Master

ATT

33

Rcvd Exchange MTU Request, Client Rx MTU: 247

11092

351.299.875

49769

49633

Master

Slave

LE LL

35

Control Opcode: LL_FEATURE_REQ

11093

351.300.528

302

150

Slave

Master

LE LL

35

Control Opcode: LL_LENGTH_REQ

11094

351.301.070

49697

49545

Master

Slave

LE LL

35

Control Opcode: LL_LENGTH_RSP

11097

351.403.509

230

150

Slave

Master

LE LL

35

Control Opcode: LL_FEATURE_RSP

11098

351.403.923

49768

49616

Master

Slave

ATT

35

Sent Error Response - Request Not Supported, Handle: 0x0000 (Unknown)

11288

356.215.909

230

150

Slave

Master

L2CAP

42

Connection Parameter Update Request

11289

356.216.315

49769

49561

Master

Slave

LE LL

38

Control Opcode: LL_CONNECTION_UPDATE_REQ

11291

356.217.089

230

150

Master

Slave

L2CAP

36

Connection Parameter Update Response (Accepted)

11292

356.318.420

49441

49281

Master

Slave

L2CAP

36

Connection Parameter Update Response (Accepted)

 

Frame 11098: 35 bytes on wire (280 bits), 35 bytes captured (280 bits) on interface 0

Nordic BLE Sniffer

Bluetooth Low Energy Link Layer

    Access Address: 0x59062c3c

    [Master Address: e8:39:00:20:e0:39 (e8:39:00:20:e0:39)]

    [Slave Address: d8:74:5d:31:a7:73 (d8:74:5d:31:a7:73)]

    Data Header: 0x0902

        .... ..10 = LLID: Start of an L2CAP message or a complete L2CAP message with no fragmentation (0x2)

        .... .0.. = Next Expected Sequence Number: 0

        .... 0... = Sequence Number: 0 [OK]

        ...0 .... = More Data: False

        000. .... = RFU: 0

        Length: 9

    [L2CAP Index: 1]

    CRC: 0xda49fb

Bluetooth L2CAP Protocol

Bluetooth Attribute Protocol

    Opcode: Error Response (0x01)

        0... .... = Authentication Signature: False

        .0.. .... = Command: False

        ..00 0001 = Method: Error Response (0x01)

    Request Opcode in Error: Exchange MTU Request (0x02)

        0... .... = Authentication Signature: False

        .0.. .... = Command: False

        ..00 0010 = Method: Exchange MTU Request (0x02)

    Handle in Error: 0x0000 (Unknown)

    Error Code: Request Not Supported (0x06)

    [Request in Frame: 11091]

 

0000  14 1c 00 02 5f 86 06 0a 03 0b 3c 04 00 d0 c1 00   ...._.....<.....

0010  00 3c 2c 06 59 02 09 05 00 04 00 01 02 00 00 06   .<,.Y...........

0020  5b 92 df                                          [..

 

4.3.   Btmon

MTU change:

> ACL Data RX: Handle 0 flags 0x02 dlen 7                  #15 [hci0] 17.474908

      ATT: Exchange MTU Request (0x02) len 2

        Client RX MTU: 247

> HCI Event: Command Status (0x0f) plen 4                  #16 [hci0] 17.476373

      LE Read Remote Used Features (0x08|0x0016) ncmd 1

        Status: Success (0x00)

> HCI Event: LE Meta Event (0x3e) plen 11                  #17 [hci0] 17.570383

      LE Data Length Change (0x07)

        Handle: 0

        Max TX octets: 251

        Max TX time: 2120

        Max RX octets: 251

        Max RX time: 2120

> HCI Event: LE Meta Event (0x3e) plen 12                  #18 [hci0] 17.622330

      LE Read Remote Used Features (0x04)

        Status: Success (0x00)

        Handle: 0

        Features: 0x25 0x49 0x00 0x00 0x00 0x00 0x00 0x00

          LE Encryption

          Extended Reject Indication

          LE Data Packet Length Extension

          LE 2M PHY

          LE Coded PHY

          Channel Selection Algorithm #2

< ACL Data TX: Handle 0 flags 0x00 dlen 9                  #19 [hci0] 17.622779

      ATT: Error Response (0x01) len 4

        Exchange MTU Request (0x02)

        Handle: 0x0000

        Error: Request Not Supported (0x06)

> HCI Event: Number of Completed Packets (0x13) plen 5     #20 [hci0] 17.672283

        Num handles: 1

        Handle: 0

        Count: 1

 

Data send:

< ACL Data TX: Handle 0 flags 0x00 dlen 5                 #73 [hci0] 546.735550

      ATT: Handle Value Confirmation (0x1e) len 0

> ACL Data RX: Handle 0 flags 0x02 dlen 27                #74 [hci0] 546.736425

      ATT: Handle Value Notification (0x1b) len 22

        Handle: 0x001d

          Data: 00000000fff870fff7dafff792fff7abfff828ff

> ACL Data RX: Handle 0 flags 0x02 dlen 27                #75 [hci0] 546.736524

      ATT: Handle Value Notification (0x1b) len 22

        Handle: 0x001d

          Data: 10000000f8effff9d0fffaa9fffb69fffc02fffc

 

5.       Question

Are in the Zephyr firmware other option to set the max DLE value?

What means the error Message (Frame 11098)? Are there more information, except that it does not work.

Is there a Project working with the nrf52840 with DLE?

Perhaps it is an issue in the bluez config, can be?


Thanks for help.


Re: West not installing; Alternative ways to install? #west

johnnie.l.birch.jr@...
 

Hi Marti, all,

 

Thanks for the reply. There was something corrupt related to my pip/python install. Seems multiple versions of pip3 were found where version check at the command line would show version 3.5.2 while printing the version from a python statement would show 19.0.2. Ultimately I used some combination of commands using easy_install3 to get it installed instead of using pip.

 

Thanks,
Johnnie

 

From: Marti Bolivar [mailto:marti@...]
Sent: Friday, February 15, 2019 6:39 PM
To: Birch Jr, Johnnie L <johnnie.l.birch.jr@...>
Cc: users@...
Subject: Re: [Zephyr-users] West not installing; Alternative ways to install? #west

 

Hi Johnnie,

 

You can run "pip3 show -f west" to see where west was installed. Please make sure that is on your PATH. On Linux that is likely to be ~/.local/bin or so.

 

Marti

On Fri, Feb 15, 2019, 7:23 PM <johnnie.l.birch.jr@... wrote:

Hi All,

Getting started with zephyr, wanting to flash on an arduino 101 board for some experimentation. My host system is Mint 18.1 based on Ubuntu 16.04. I've followed steps to install the SDK and I assume that is installed correctly. Now I am following steps to install west from here: https://docs.zephyrproject.org/latest/getting_started/getting_started.html#get-the-source-code  but this step:

# Linux
pip3 install --user west


does not seem to do what it is intended. It leads to what looks like a successful install: 

jlb6740@yshou-mint:~$ pip3 install --user west
Collecting west
  Using cached https://files.pythonhosted.org/packages/7d/f7/228d4ba20feb2e2041abb2892b459e3bb7ddbfff28cc5963fb3787c92c46/west-0.5.4-py3-none-any.whl
Collecting colorama (from west)
  Using cached https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl
Collecting pykwalify (from west)
  Using cached https://files.pythonhosted.org/packages/36/9f/612de8ca540bd24d604f544248c4c46e9db76f6ea5eb75fb4244da6ebbf0/pykwalify-1.7.0-py2.py3-none-any.whl
Collecting PyYAML (from west)
Collecting python-dateutil>=2.4.2 (from pykwalify->west)
  Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting docopt>=0.6.2 (from pykwalify->west)
Collecting six>=1.5 (from python-dateutil>=2.4.2->pykwalify->west)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: colorama, six, python-dateutil, docopt, PyYAML, pykwalify, west
Successfully installed PyYAML-3.13 colorama-0.4.1 docopt-0.6.2 pykwalify-1.7.0 python-dateutil-2.8.0 six-1.10.0 west-0.5.4
You are using pip version 8.1.1, however version 19.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
jlb6740@yshou-mint:~$ westcos-tool ^C
jlb6740@yshou-mint:~/Downloads$ west --version
No command 'west' found, did you mean:
 Command 'test' from package 'coreutils' (main)
west: command not found
jlb6740@yshou-mint:~/Downloads$ 

 

but there is no "west" file to execute on my path. At the website for west the install command is slightly different:

pip3 install west


But again, nothing is found on my path. I tried to install the whl file, I also tried to install with sudo but nothing has given me an executable to move on to the next steps:

west init zephyrproject
cd zephyrproject
west update


What are some alternative ways to installing this west script? Even the "Using Zephyr with west" page seems to imply I will want it for flashing and debugging later so I assume this is not a step I should skip.

Thanks,
Johnnie

 

 


Re: device_get_binding() returns NULL

Kumar Gala
 

How is CONFIG_GPIO_PCAL9535A_0_DEV_NAME getting set in your build?

- k

On Feb 16, 2019, at 10:55 AM, andreibolkonski1814@gmail.com wrote:

Hi,

I am testing Zephyr on an Intel Galileo Gen2. While trying to implement something similar to Blinky Application from Basic Samples, it seems that the API function device_get_binding() returns NULL, and I have no idea what I am doing wrong.
This is main.c
#include <zephyr.h>
#include <misc/printk.h>
#include <device.h>
#include <pwm.h>
//#include <board.h>

void main(void)
{
struct device *exp0 = device_get_binding(CONFIG_GPIO_PCAL9535A_0_DEV_NAME);
if (!exp0) {
printk("Error occured!\n");
return;
}
printk("This is never printed :(\n");
}

An the output is:

WARNING: no console will be available to OS
error: no suitable video mode found.
***** Booting Zephyr OS v1.14.0-rc1-60-g9072d34f30 *****
Error occured!

I tried to add CONFIG_GPIO_PCAL9535A_0=y to prj.conf, but that didn't solved the problem.
No need to mention that I am a newbie not only with Zephyr...


device_get_binding() returns NULL

andreibolkonski1814@...
 

Hi,

I am testing Zephyr on an Intel Galileo Gen2. While trying to implement something similar to Blinky Application from Basic Samples, it seems that the API function device_get_binding() returns NULL, and I have no idea what I am doing wrong.
This is main.c
#include <zephyr.h>
#include <misc/printk.h>
#include <device.h>
#include <pwm.h>
//#include <board.h>

void main(void)
{
	struct device *exp0 = device_get_binding(CONFIG_GPIO_PCAL9535A_0_DEV_NAME);
	if (!exp0) {
		printk("Error occured!\n");
		return;
	}
	printk("This is never printed :(\n");
}

An the output is:

WARNING: no console will be available to OS
error: no suitable video mode found.
***** Booting Zephyr OS v1.14.0-rc1-60-g9072d34f30 *****
Error occured!

I tried to add CONFIG_GPIO_PCAL9535A_0=y to prj.conf, but that didn't solved the problem.
No need to mention that I am a newbie not only with Zephyr...


Re: West not installing; Alternative ways to install? #west

Marti Bolivar <marti@...>
 

Hi Johnnie,

You can run "pip3 show -f west" to see where west was installed. Please make sure that is on your PATH. On Linux that is likely to be ~/.local/bin or so.

Marti


On Fri, Feb 15, 2019, 7:23 PM <johnnie.l.birch.jr@... wrote:

Hi All,

Getting started with zephyr, wanting to flash on an arduino 101 board for some experimentation. My host system is Mint 18.1 based on Ubuntu 16.04. I've followed steps to install the SDK and I assume that is installed correctly. Now I am following steps to install west from here: https://docs.zephyrproject.org/latest/getting_started/getting_started.html#get-the-source-code  but this step:

# Linux
pip3 install --user west


does not seem to do what it is intended. It leads to what looks like a successful install: 

jlb6740@yshou-mint:~$ pip3 install --user west
Collecting west Using cached https://files.pythonhosted.org/packages/7d/f7/228d4ba20feb2e2041abb2892b459e3bb7ddbfff28cc5963fb3787c92c46/west-0.5.4-py3-none-any.whl
Collecting colorama (from west) Using cached https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl Collecting pykwalify (from west) Using cached https://files.pythonhosted.org/packages/36/9f/612de8ca540bd24d604f544248c4c46e9db76f6ea5eb75fb4244da6ebbf0/pykwalify-1.7.0-py2.py3-none-any.whl Collecting PyYAML (from west) Collecting python-dateutil>=2.4.2 (from pykwalify->west) Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl Collecting docopt>=0.6.2 (from pykwalify->west) Collecting six>=1.5 (from python-dateutil>=2.4.2->pykwalify->west) Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl Installing collected packages: colorama, six, python-dateutil, docopt, PyYAML, pykwalify, west Successfully installed PyYAML-3.13 colorama-0.4.1 docopt-0.6.2 pykwalify-1.7.0 python-dateutil-2.8.0 six-1.10.0 west-0.5.4 You are using pip version 8.1.1, however version 19.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. jlb6740@yshou-mint:~$ westcos-tool ^C jlb6740@yshou-mint:~/Downloads$ west --version No command 'west' found, did you mean: Command 'test' from package 'coreutils' (main) west: command not found jlb6740@yshou-mint:~/Downloads$

 

but there is no "west" file to execute on my path. At the website for west the install command is slightly different:

pip3 install west


But again, nothing is found on my path. I tried to install the whl file, I also tried to install with sudo but nothing has given me an executable to move on to the next steps:

west init zephyrproject
cd zephyrproject
west update


What are some alternative ways to installing this west script? Even the "Using Zephyr with west" page seems to imply I will want it for flashing and debugging later so I assume this is not a step I should skip.

Thanks,
Johnnie

 

 


West not installing; Alternative ways to install? #west

johnnie.l.birch.jr@...
 

Hi All,

Getting started with zephyr, wanting to flash on an arduino 101 board for some experimentation. My host system is Mint 18.1 based on Ubuntu 16.04. I've followed steps to install the SDK and I assume that is installed correctly. Now I am following steps to install west from here: https://docs.zephyrproject.org/latest/getting_started/getting_started.html#get-the-source-code  but this step:

# Linux
pip3 install --user west


does not seem to do what it is intended. It leads to what looks like a successful install: 

jlb6740@yshou-mint:~$ pip3 install --user west
Collecting west Using cached https://files.pythonhosted.org/packages/7d/f7/228d4ba20feb2e2041abb2892b459e3bb7ddbfff28cc5963fb3787c92c46/west-0.5.4-py3-none-any.whl
Collecting colorama (from west) Using cached https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl Collecting pykwalify (from west) Using cached https://files.pythonhosted.org/packages/36/9f/612de8ca540bd24d604f544248c4c46e9db76f6ea5eb75fb4244da6ebbf0/pykwalify-1.7.0-py2.py3-none-any.whl Collecting PyYAML (from west) Collecting python-dateutil>=2.4.2 (from pykwalify->west) Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl Collecting docopt>=0.6.2 (from pykwalify->west) Collecting six>=1.5 (from python-dateutil>=2.4.2->pykwalify->west) Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl Installing collected packages: colorama, six, python-dateutil, docopt, PyYAML, pykwalify, west Successfully installed PyYAML-3.13 colorama-0.4.1 docopt-0.6.2 pykwalify-1.7.0 python-dateutil-2.8.0 six-1.10.0 west-0.5.4 You are using pip version 8.1.1, however version 19.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. jlb6740@yshou-mint:~$ westcos-tool ^C jlb6740@yshou-mint:~/Downloads$ west --version No command 'west' found, did you mean: Command 'test' from package 'coreutils' (main) west: command not found jlb6740@yshou-mint:~/Downloads$

 

but there is no "west" file to execute on my path. At the website for west the install command is slightly different:

pip3 install west


But again, nothing is found on my path. I tried to install the whl file, I also tried to install with sudo but nothing has given me an executable to move on to the next steps:

west init zephyrproject
cd zephyrproject
west update


What are some alternative ways to installing this west script? Even the "Using Zephyr with west" page seems to imply I will want it for flashing and debugging later so I assume this is not a step I should skip.

Thanks,
Johnnie

 

 


Re: pyocd with eclipse under Ubuntu18.04

Andy Gross
 

On Fri, 15 Feb 2019 at 14:24, Lawrence King <lawrence.king@irdeto.com> wrote:

That gets me past one error and opens a new one: when I try to start the debugger I get a message: “pyOCD GDB Server failed with code (2).” I suspect I have the Debug Configuration -> Debugger -> pyOCD Setup -> Executable set wrong. Should I be using “pyocd”, “pyocd-server”, or something else?
I use pyocd-gdbserver. Once you spawn that, you can connect to it via
`gdb target remote localhost:3333`.


If you get a chance can you update the documentation page at https://docs.zephyrproject.org/1.13.0/application/application.html#create-a-debugger-configuration for linux users so other people don’t have the same issues.
I'll take a look. Those docs usually get updated pretty regularly.

P.S. Andy - we have met several times at various Linaro Connects, however I was wearing a different hat at that time.
Yeah I recognized the name. Small world, huh? =D

Regards,

Andy


Re: pyocd with eclipse under Ubuntu18.04

Lawrence King
 

Thanks Andy,

 

That gets me past one error and opens a new one: when I try to start the debugger I get a message: “pyOCD GDB Server failed with code (2).” I suspect I have the  Debug Configuration -> Debugger -> pyOCD Setup -> Executable set wrong. Should I be using “pyocd”, “pyocd-server”, or something else?

 

If you get a chance can you update the documentation page at https://docs.zephyrproject.org/1.13.0/application/application.html#create-a-debugger-configuration for linux users so other people don’t have the same issues.

 

P.S. Andy - we have met several times at various Linaro Connects, however I was wearing a different hat at that time.

 

Lawrence King

Principal Developer

+1(416)627-7302

 

From: Andy Gross <andy.gross@...>
Sent: Friday, February 15, 2019 2:46 PM
To: Lawrence King <lawrence.king@...>
Cc: Zephyr-users@...
Subject: Re: [Zephyr-users] pyocd with eclipse under Ubuntu18.04

 

 

 

On Fri, 15 Feb 2019 at 13:39, Lawrence King <lawrence.king@...> wrote:

Dear All:

 

I am a bit of a newbie at Zephyr development, so I am just getting started. Last night my Nitrogen board arrived so I setup a development system on Ubuntu 18.04 following the instructions in the getting started guide here: https://docs.zephyrproject.org/1.13.0/getting_started/getting_started.html  and here: https://docs.zephyrproject.org/1.13.0/getting_started/installation_linux.html

 

Welcome to Zephyr, Lawrence!

 

All went well except for a couple small issues:

  1. The version of Cmake that apt-get installs is too old for the latest zephyr kernel so I had to download, build and install the latest cmake. No big problem, just annoying.
  2. I originally tried putting  the sdk in my bin directory, but no matter how many places I exported the ZEPHYR_SDK_INSTALL_DIR from cmake always insists on searching in /opt/zephyr-sdk. I gave up and simply installed the sdk in /opt and the problem went away.

 

I have successfully built the hello-world and created the zephyr.elf file. Now I want to setup Eclipse to load and debug it. “pyocd-flashtool -l”  successfully finds my Nitrogen board so that part is setup OK. Eclipse finds my project and builds it, the last step is getting eclipse to load the program to the Nitrogen and allow single-step/breakpoints in my code.

 

I have read the instructions for setting up Eclipse here: https://docs.zephyrproject.org/1.13.0/application/application.html#create-a-debugger-configuration most goes OK until I get to the “GDB Client Setup” step here I run into a small problem, I can’t find something equivalent to C:\gcc-arm-none-eabi-6_2017-q2-update\bin\arm-none-eabi-gdb.exe

 

Can someone point me to the correct executable for use under Ubuntu please? Is there something I didn’t install on Ubuntu?

 

 <SDK INSTALL DIR>sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gdb

 

Regards,

 

Andy Gross

Linaro

 

 


Re: pyocd with eclipse under Ubuntu18.04

Andy Gross
 



On Fri, 15 Feb 2019 at 13:39, Lawrence King <lawrence.king@...> wrote:

Dear All:

 

I am a bit of a newbie at Zephyr development, so I am just getting started. Last night my Nitrogen board arrived so I setup a development system on Ubuntu 18.04 following the instructions in the getting started guide here: https://docs.zephyrproject.org/1.13.0/getting_started/getting_started.html  and here: https://docs.zephyrproject.org/1.13.0/getting_started/installation_linux.html


Welcome to Zephyr, Lawrence!
 

All went well except for a couple small issues:

  1. The version of Cmake that apt-get installs is too old for the latest zephyr kernel so I had to download, build and install the latest cmake. No big problem, just annoying.
  2. I originally tried putting  the sdk in my bin directory, but no matter how many places I exported the ZEPHYR_SDK_INSTALL_DIR from cmake always insists on searching in /opt/zephyr-sdk. I gave up and simply installed the sdk in /opt and the problem went away.

 

I have successfully built the hello-world and created the zephyr.elf file. Now I want to setup Eclipse to load and debug it. “pyocd-flashtool -l”  successfully finds my Nitrogen board so that part is setup OK. Eclipse finds my project and builds it, the last step is getting eclipse to load the program to the Nitrogen and allow single-step/breakpoints in my code.

 

I have read the instructions for setting up Eclipse here: https://docs.zephyrproject.org/1.13.0/application/application.html#create-a-debugger-configuration most goes OK until I get to the “GDB Client Setup” step here I run into a small problem, I can’t find something equivalent to C:\gcc-arm-none-eabi-6_2017-q2-update\bin\arm-none-eabi-gdb.exe

 

Can someone point me to the correct executable for use under Ubuntu please? Is there something I didn’t install on Ubuntu?


 <SDK INSTALL DIR>sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-gdb

Regards,

Andy Gross
Linaro



pyocd with eclipse under Ubuntu18.04

Lawrence King
 

Dear All:

 

I am a bit of a newbie at Zephyr development, so I am just getting started. Last night my Nitrogen board arrived so I setup a development system on Ubuntu 18.04 following the instructions in the getting started guide here: https://docs.zephyrproject.org/1.13.0/getting_started/getting_started.html  and here: https://docs.zephyrproject.org/1.13.0/getting_started/installation_linux.html

 

All went well except for a couple small issues:

  1. The version of Cmake that apt-get installs is too old for the latest zephyr kernel so I had to download, build and install the latest cmake. No big problem, just annoying.
  2. I originally tried putting  the sdk in my bin directory, but no matter how many places I exported the ZEPHYR_SDK_INSTALL_DIR from cmake always insists on searching in /opt/zephyr-sdk. I gave up and simply installed the sdk in /opt and the problem went away.

 

I have successfully built the hello-world and created the zephyr.elf file. Now I want to setup Eclipse to load and debug it. “pyocd-flashtool -l”  successfully finds my Nitrogen board so that part is setup OK. Eclipse finds my project and builds it, the last step is getting eclipse to load the program to the Nitrogen and allow single-step/breakpoints in my code.

 

I have read the instructions for setting up Eclipse here: https://docs.zephyrproject.org/1.13.0/application/application.html#create-a-debugger-configuration most goes OK until I get to the “GDB Client Setup” step here I run into a small problem, I can’t find something equivalent to C:\gcc-arm-none-eabi-6_2017-q2-update\bin\arm-none-eabi-gdb.exe

 

Can someone point me to the correct executable for use under Ubuntu please? Is there something I didn’t install on Ubuntu?

 

Lawrence King

Principal Developer

Connected Transport Market Unit

https://www.Irdeto.com

+1(416)627-7302

 

1  2 - linkedin  3 - instagram  4 - youtube  6 - facebook  7

            

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.

 

 

 


Re: Driver development outside zephyr tree

Carles Cufi
 

Hi Venkat,

 

You might want to look at this GitHub issue and follow the discussion there:

https://github.com/zephyrproject-rtos/zephyr/issues/8379

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of Venkat Rao Vallapaneni
Sent: 12 February 2019 15:49
To: users@...
Subject: [Zephyr-users] Driver development outside zephyr tree

 

Hi,

I tried to add support for custom SoC and custom board without adding to zephyr tree and I could do that. I am able to compile hello_world by passing needed command line options to cmake (SOC_ROOT, BOARD_ROOT, DTS_APP_INCLUDE). I maintained similar directory structure as zephyr in my work area.

Now I needed to add drivers support. How do I add drivers support without adding them to zephyr tree?

I tried creating similar structure like drivers/i2c folder in my work area and added Kconfig.mysoc, CMakeLists.txt and my_i2c_driver.c. I have also created Kconfig and CMakeLists.txt under drivers folder also.

At my work area root level also, I have created CMakeLists.txt and Kconfig. I could enable config options by passing KCONFIG_ROOT to work area root.

Now the problem is with CMakeLists.txt. I tried to include my work area root CMakeLists.txt in samples and it didn't work.

What is the recommended way to develop drivers for custom soc without adding to zephyr tree?

Thanks,
Venkat.


Re: #mqtt_sock #user_mode_thread #mqtt_sock #user_mode_thread

Nashif, Anas
 

CONFIG_USERSPACE on its own will not do much.

 

Anas

 

From: users@... [mailto:users@...] On Behalf Of Prabhu Vinod, Karthik
Sent: Tuesday, February 12, 2019 10:21 AM
To: Boie, Andrew P <andrew.p.boie@...>; users@...
Subject: Re: [Zephyr-users] #mqtt_sock #user_mode_thread

 

Hi Andrew,

 

I tried only with that config option…did not launch a thread with K_USER perms. Maybe I will try that.

 

Many Regards,

Karthik Prabhu Vinod

 

Help save the planet by choosing not to use single use plastics. Pick paper, bamboo or metal cutlery and carry your own bag to the grocery store. Every little thing you do makes an impact.

 

From: "Boie, Andrew P" <andrew.p.boie@...>
Date: Monday, February 11, 2019 at 10:55 PM
To: "Karthik Prabhu Vinod (Intel)" <karthik.prabhu.vinod@...>, "users@..." <users@...>
Subject: RE: [Zephyr-users] #mqtt_sock #user_mode_thread

 

I'm not sure if anyone before you has tried this. We do have system calls for the socket APIs.

 

Ø  I tested out with CONFIG_USERSPACE=y

 

Did you do only this, or did you make API calls from a thread created with K_USER?

 

Andrew

 

From: users@... [mailto:users@...] On Behalf Of Prabhu Vinod, Karthik
Sent: Monday, February 11, 2019 9:26 PM
To: users@...
Subject: [Zephyr-users] #mqtt_sock #user_mode_thread

 

Can the current mqtt_sock implementation run in user mode thread? Are there obvious limitations that prevent it from running it in user mode?

When I tested, i didnt find any limitation . I tested out with CONFIG_USERSPACE=y

 


Re: #mqtt_sock #user_mode_thread #mqtt_sock #user_mode_thread

Prabhu Vinod, Karthik
 

Hi Andrew,

 

I tried only with that config option…did not launch a thread with K_USER perms. Maybe I will try that.

 

Many Regards,

Karthik Prabhu Vinod

 

Help save the planet by choosing not to use single use plastics. Pick paper, bamboo or metal cutlery and carry your own bag to the grocery store. Every little thing you do makes an impact.

 

From: "Boie, Andrew P" <andrew.p.boie@...>
Date: Monday, February 11, 2019 at 10:55 PM
To: "Karthik Prabhu Vinod (Intel)" <karthik.prabhu.vinod@...>, "users@..." <users@...>
Subject: RE: [Zephyr-users] #mqtt_sock #user_mode_thread

 

I'm not sure if anyone before you has tried this. We do have system calls for the socket APIs.

 

  • I tested out with CONFIG_USERSPACE=y

 

Did you do only this, or did you make API calls from a thread created with K_USER?

 

Andrew

 

From: users@... [mailto:users@...] On Behalf Of Prabhu Vinod, Karthik
Sent: Monday, February 11, 2019 9:26 PM
To: users@...
Subject: [Zephyr-users] #mqtt_sock #user_mode_thread

 

Can the current mqtt_sock implementation run in user mode thread? Are there obvious limitations that prevent it from running it in user mode?

When I tested, i didnt find any limitation . I tested out with CONFIG_USERSPACE=y


Driver development outside zephyr tree

Venkat Rao Vallapaneni <vallapaneni@...>
 

Hi,

I tried to add support for custom SoC and custom board without adding to zephyr tree and I could do that. I am able to compile hello_world by passing needed command line options to cmake (SOC_ROOT, BOARD_ROOT, DTS_APP_INCLUDE). I maintained similar directory structure as zephyr in my work area.

Now I needed to add drivers support. How do I add drivers support without adding them to zephyr tree?

I tried creating similar structure like drivers/i2c folder in my work area and added Kconfig.mysoc, CMakeLists.txt and my_i2c_driver.c. I have also created Kconfig and CMakeLists.txt under drivers folder also.

At my work area root level also, I have created CMakeLists.txt and Kconfig. I could enable config options by passing KCONFIG_ROOT to work area root.

Now the problem is with CMakeLists.txt. I tried to include my work area root CMakeLists.txt in samples and it didn't work.

What is the recommended way to develop drivers for custom soc without adding to zephyr tree?

Thanks,
Venkat.


Re: #mqtt_sock #user_mode_thread #mqtt_sock #user_mode_thread

Boie, Andrew P
 

I'm not sure if anyone before you has tried this. We do have system calls for the socket APIs.

 

Ø  I tested out with CONFIG_USERSPACE=y

 

Did you do only this, or did you make API calls from a thread created with K_USER?

 

Andrew

 

From: users@... [mailto:users@...] On Behalf Of Prabhu Vinod, Karthik
Sent: Monday, February 11, 2019 9:26 PM
To: users@...
Subject: [Zephyr-users] #mqtt_sock #user_mode_thread

 

Can the current mqtt_sock implementation run in user mode thread? Are there obvious limitations that prevent it from running it in user mode?

When I tested, i didnt find any limitation . I tested out with CONFIG_USERSPACE=y


#mqtt_sock #user_mode_thread #mqtt_sock #user_mode_thread

Prabhu Vinod, Karthik
 

Can the current mqtt_sock implementation run in user mode thread? Are there obvious limitations that prevent it from running it in user mode?

When I tested, i didnt find any limitation . I tested out with CONFIG_USERSPACE=y


Zephyr v1.14.0-rc1 Tagged

Kumar Gala
 

Hi all,

We have just tagged Zephyr 1.14.0-rc1.

All required features that have not been pushed out to 1.14 are now merged, and so we begin the stabilization phase that should run for around 4 weeks this time. We will now start working on filling in the existing skeleton for the release notes, and closing PRs that need to come into the release. A reminder that, starting with -rc1, we will only accept changes introducing bug fixes, documentation and test cases. Any additional features or enhancements will need to be approved by the TSC.

As this release is meant as our first LTS we will be going through a longer stabilization phase to work on reducing our bug counts. Please focus on bugs during this period. If you submit a PR please ensure that it has the ‘v1.14.0’ Milestone set and either ’Bug’ or ’TSC’ label set on it.

The final release is tentatively scheduled for the 5th of April.

The full release log can be found here:
https://github.com/zephyrproject-rtos/zephyr/releases/tag/v1.14.0-rc1

Thanks to everybody who contributed to this release!

Kumar


Re: Changing connection parameter in connected event from peripheral side seems to hang up system #ble #nrf52840

Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...>
 

Could you provide details on how to reproduce the issue you are facing? Which commit, boards and devices used etc.

 

 

From: users@... <users@...> On Behalf Of Phil Hipp
Sent: 06 February 2019 14:52
To: users@...
Subject: [Zephyr-users] Changing connection parameter in connected event from peripheral side seems to hang up system #ble #nrf52840

 

I'm trying to change the connection parameters from peripheral side right after the connection has been established (in the connected callback handler) using bt_conn_le_param_update.  But the system seems to hang up after this call. What would be the correct way to change the connection parameter right after he connection has been established?

1421 - 1440 of 2733