Date   

API meeting cancelled today

Carles Cufi
 

Hi all,

I am cancelling the API meeting today due to a conflict and the fact that there were no scheduled discussions to take place besides going over the current open GitHub issues to fix for 2.5.

If you did have something you wanted to bring up, please let me know and I'll schedule it for next week.

Thanks,

Carles


Network forum agenda

Jukka Rissanen
 


undefined reference to `__bswapdi2' when trying to link tinycbor for RISC-V

Stefan Hristozov
 

I am getting undefined reference to `__bswapdi2' when I am trying to link tinycbor for RISC-V (west build -b=hifive1)
stefan@t460s:~/workspaces/oscore-edhoc/test$ west build -b=hifive1
[1/5] Linking C executable zephyr/zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf
: && ccache /opt/zephyr-sdk-0.11.3/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gcc    zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj  -o zephyr/zephyr_prebuilt.elf  -Wl,-T  zephyr/linker.cmd  -Wl,-Map=/home/stefan/workspaces/oscore-edhoc/test/build/zephyr/zephyr_prebuilt.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/riscv/core/libarch__riscv__core.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/lib/posix/liblib__posix.a  zephyr/boards/riscv/hifive1/libboards__riscv__hifive1.a  zephyr/subsys/testsuite/ztest/libsubsys__testsuite__ztest.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/spi/libdrivers__spi.a  zephyr/drivers/serial/libdrivers__serial.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/arch/riscv/core/offsets/offsets.c.obj  -L"/opt/zephyr-sdk-0.11.3/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/9.2.0"  -L/home/stefan/workspaces/oscore-edhoc/test/build/zephyr  -lgcc  -Wl,--print-memory-usage  ../build_lib_test/libtest.a  -mabi=ilp32  -march=rv32ima  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -no-pie  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn && :
Memory region         Used Size  Region Size  %age Used
             ROM:       73756 B        12 MB      0.59%
             RAM:       15600 B        16 KB     95.21%
        IDT_LIST:         553 B         2 KB     27.00/opt/zephyr-sdk-0.11.3/riscv64-zephyr-elf/bin/../lib/gcc/riscv64-zephyr-elf/9.2.0/../../../../riscv64-zephyr-elf/bin/ld: ../build_lib_test/libtest.a(cborencoder.o): in function `put64':
/home/stefan/workspaces/oscore-edhoc/test/lib_test/../../externals/tinycbor/src/cborencoder.c:255: undefined reference to `__bswapdi2'
collect2: error: ld returned 1 exit status
%
ninja: build stopped: subcommand failed.
With grep I can see that this function is available in libgcc.a for RISC-V
stefan@t460s:/opt/zephyr-sdk-0.11.3/riscv64-zephyr-elf$ grep -nrw '__bswapdi2'
Binary file lib/gcc/riscv64-zephyr-elf/9.2.0/rv32i/ilp32/libgcc.a matches
Binary file lib/gcc/riscv64-zephyr-elf/9.2.0/rv32iac/ilp32/libgcc.a matches
Binary file lib/gcc/riscv64-zephyr-elf/9.2.0/libgcc.a matches
Binary file lib/gcc/riscv64-zephyr-elf/9.2.0/rv32imac/ilp32/libgcc.a matches
Binary file lib/gcc/riscv64-zephyr-elf/9.2.0/rv64imafdc/lp64d/medany/libgcc.a matches
Binary file lib/gcc/riscv64-zephyr-elf/9.2.0/rv64imafdc/lp64d/libgcc.a matches
Binary file lib/gcc/riscv64-zephyr-elf/9.2.0/rv32imafc/ilp32f/libgcc.a matches
Binary file lib/gcc/riscv64-zephyr-elf/9.2.0/rv32im/ilp32/libgcc.a matches
Binary file lib/gcc/riscv64-zephyr-elf/9.2.0/rv64imac/lp64/medany/libgcc.a matches
Binary file lib/gcc/riscv64-zephyr-elf/9.2.0/rv64imac/lp64/libgcc.a matches
Binary file libexec/gcc/riscv64-zephyr-elf/9.2.0/lto1 matches
Binary file libexec/gcc/riscv64-zephyr-elf/9.2.0/cc1 matches
Binary file libexec/gcc/riscv64-zephyr-elf/9.2.0/cc1plus matches
How to tell my zephyr project to use libgcc?


NRF52832 - LPCOMP wakeup example

Martin Kozusky
 

Hello,
does anybody have working example of using LPCOMP in NRF52832 to wakeup MCU from sleep mode (when input voltage gets above setup voltage) and then read somewhere that it has been woken by LPCOMP interrupt (and if possible, also the voltage of analog input when it was triggered, but I don't see register for this value in datasheet)

I see there is NRFX_LPCOMP config, but how can I use that?

Thank you,
Martin


Re: Azure MQTT with GSM modem over PPP #mqtt #modem #ppp #nrf52840

petrus.vanderwalt@...
 

Hi Jukka,

I only had to add a board overlay for my nRF52840 in order to get the gsm_modem sample up and running.  Drivers specifically for the Quectell BG 96 and Sara 412 are available in Zephyr.

I actually want to connect to azure on both methods, MQTT and HTTPS post.  I will try to use TagoIO as a base and see if it works with Azure configs and let you know if it works.

Thanks for telling me where to find the errors.  I was searching for them in the errorno.h.

Have a great day,
Jurgens 


Re: Azure MQTT with GSM modem over PPP #mqtt #modem #ppp #nrf52840

Jukka Rissanen
 

Hi Petrus,

On Thu, 2021-01-28 at 03:49 -0800, petrus.vanderwalt@... wrote:
Hi, Zephyr community.  I am trying to add Azure MQTT functionality to my project.  I am using an nRF52840 with a Quectel BG96/Sara R412M-02B.  I would also like to use the modem functionality to communicate to cellular towers over PPP.

Currently, I have the gsm_modem sample up and running for my Quectel BG96 and U-Blox SARA R412.  I also have the tagio_http_post sample up and running.  I would also want to adapt the tagio_http_post sample to work for Azure.  Would this be easy to do?  Have anyone tried to do this?

Did you need to do any changes to generic gsm modem in order to get the BG96 or SARA modem working. I do not have these modems, so would be interested to know if they worked ok without any special modifications.

To you other question, do you want to connect to azure without using mqtt? Then probably you could use the tagio as a base and change it according to relevant configs found in azure sample. If you get this working, it would be nice to have a separate sample for this.


I am now playing around with the mqtt_azure sample.  I have added PPP support by adding a modem overlay.  I had to disable the DHCPV4 and use a static IP address.  The sample
[00:00:13.283,172] <inf> modem_gsm: Manufacturer: u-blox
[00:00:13.362,243] <inf> modem_gsm: Model: SARA-R412M-02B
[00:00:13.442,871] <inf> modem_gsm: Revision: M0.10.00 [Mar 28 2019 17:13:41]
[00:00:13.523,864] <inf> modem_gsm: IMSI: 655014150468485
[00:00:13.604,797] <inf> modem_gsm: ICCID: 89415000000004684852
[00:00:13.685,394] <inf> modem_gsm: IMEI: 354679092855504
[00:00:13.847,473] <inf> modem_gsm: Attached to packet service!
[00:00:13.880,706] <inf> net_ppp: Initializing PPP to use UART_1
[00:00:13.904,815] <inf> net_config: Interface 1 (0x20000544) coming up
[00:00:13.931,030] <inf> net_config: IPv4 address: 192.0.2.1
[00:00:13.954,803] <dbg> mqtt_azure.main: Waiting for network to setup...
[00:00:15.979,888] <err> mqtt_azure: DNS not resolved for WCM.azure-devices.net:
[00:00:16.744,842] <inf> mqtt_azure: DNS resolved for WCM.azure-devices.net:8883
[00:00:16.770,294] <dbg> mqtt_azure.try_to_connect: attempting to connect...
[00:00:19.802,642] <err> mqtt_azure: mqtt_connect failed -116
[00:00:22.833,923] <err> mqtt_azure: mqtt_connect failed -116
[00:00:25.865,234] <err> mqtt_azure: mqtt_connect failed -116

I can not seem to find the definition of error -116.  Does anyone have an idea what this error is referring to?

The 116 errno is ETIMEDOUT and comes from newlib which can be found in Zephyr SDK.



Cheers,
Jukka


Azure MQTT with GSM modem over PPP #mqtt #modem #ppp #nrf52840

petrus.vanderwalt@...
 

Hi, Zephyr community.  I am trying to add Azure MQTT functionality to my project.  I am using an nRF52840 with a Quectel BG96/Sara R412M-02B.  I would also like to use the modem functionality to communicate to cellular towers over PPP.

Currently, I have the gsm_modem sample up and running for my Quectel BG96 and U-Blox SARA R412.  I also have the tagio_http_post sample up and running.  I would also want to adapt the tagio_http_post sample to work for Azure.  Would this be easy to do?  Have anyone tried to do this?

I am now playing around with the mqtt_azure sample.  I have added PPP support by adding a modem overlay.  I had to disable the DHCPV4 and use a static IP address.  The sample successfully resolves the DNS for azure.  The issue comes thereafter.  The sample fails to connect.  The following is the output I get:
[00:00:13.283,172] <inf> modem_gsm: Manufacturer: u-blox
[00:00:13.362,243] <inf> modem_gsm: Model: SARA-R412M-02B
[00:00:13.442,871] <inf> modem_gsm: Revision: M0.10.00 [Mar 28 2019 17:13:41]
[00:00:13.523,864] <inf> modem_gsm: IMSI: 655014150468485
[00:00:13.604,797] <inf> modem_gsm: ICCID: 89415000000004684852
[00:00:13.685,394] <inf> modem_gsm: IMEI: 354679092855504
[00:00:13.847,473] <inf> modem_gsm: Attached to packet service!
[00:00:13.880,706] <inf> net_ppp: Initializing PPP to use UART_1
[00:00:13.904,815] <inf> net_config: Interface 1 (0x20000544) coming up
[00:00:13.931,030] <inf> net_config: IPv4 address: 192.0.2.1
[00:00:13.954,803] <dbg> mqtt_azure.main: Waiting for network to setup...
[00:00:15.979,888] <err> mqtt_azure: DNS not resolved for WCM.azure-devices.net:
[00:00:16.744,842] <inf> mqtt_azure: DNS resolved for WCM.azure-devices.net:8883
[00:00:16.770,294] <dbg> mqtt_azure.try_to_connect: attempting to connect...
[00:00:19.802,642] <err> mqtt_azure: mqtt_connect failed -116
[00:00:22.833,923] <err> mqtt_azure: mqtt_connect failed -116
[00:00:25.865,234] <err> mqtt_azure: mqtt_connect failed -116

I can not seem to find the definition of error -116.  Does anyone have an idea what this error is referring to?

This is my Azure config:
#define CONFIG_SAMPLE_CLOUD_AZURE_USERNAME "XXX.azure-devices.net/Device-01/?api-version=2018-06-30"
#define CONFIG_SAMPLE_CLOUD_AZURE_PASSWORD "1XbHvFPxHZq1cD380GqCcCxUOAv3SXtecBRGGIXXXXg="
#define CONFIG_SAMPLE_CLOUD_AZURE_CLIENT_ID "Device-01"
#define CONFIG_SAMPLE_CLOUD_AZURE_HOSTNAME "XXX.azure-devices.net"
#define CONFIG_SAMPLE_CLOUD_AZURE_SERVER_ADDR "XXX.61.54.255"
#define CONFIG_SAMPLE_CLOUD_AZURE_SERVER_PORT 8883

My project config as follows:
CONFIG_NETWORKING=y
 
# Disable IPv6 support
CONFIG_NET_IPV6=n
 
# Enable IPv4 support
CONFIG_NET_IPV4=y
CONFIG_NET_IF_MAX_IPV4_COUNT=2
CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=3
 
# Enable TCP support
CONFIG_NET_TCP=y
 
# Enable Sockets support
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
 
# Disable DHCPv4 and use static address
CONFIG_NET_DHCPV4=n
 
# Use local DNS server on host
CONFIG_DNS_SERVER1="192.0.2.2"
 
# Configure static addresses
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
CONFIG_NET_CONFIG_MY_IPV4_GW="192.0.2.2"
 
# Enable SOCKS5 proxy support
CONFIG_SOCKS=n
 
# Enable MQTT Lib support
CONFIG_MQTT_LIB=y
CONFIG_MQTT_LIB_TLS=y
 
# Enable Mbed TLS configuration
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_BUILTIN=y
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=100000
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=10240
CONFIG_MBEDTLS_PEM_CERTIFICATE_FORMAT=y
 
# Network configuration
CONFIG_NET_CONFIG_SETTINGS=y
 
# Network connection manager
CONFIG_NET_CONNECTION_MANAGER=y
 
CONFIG_NET_MGMT_EVENT_STACK_SIZE=1024
CONFIG_NET_MGMT_EVENT_QUEUE_SIZE=5
CONFIG_NET_MGMT_EVENT_LOG_LEVEL_DBG=n
 
CONFIG_DNS_RESOLVER=y
CONFIG_DNS_SERVER_IP_ADDRESSES=y
CONFIG_DNS_SERVER1="8.8.8.8"
CONFIG_DNS_RESOLVER_ADDITIONAL_BUF_CTR=2
CONFIG_NEWLIB_LIBC=y
 
CONFIG_INIT_STACKS=y
CONFIG_NET_SHELL=y
 
CONFIG_MAIN_STACK_SIZE=4096
 
# Enable Logging support
CONFIG_LOG_IMMEDIATE=y
CONFIG_NET_LOG=y
CONFIG_NET_TCP_LOG_LEVEL_DBG=n
CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=n
CONFIG_MQTT_LOG_LEVEL_DBG=n
CONFIG_NET_DHCPV4_LOG_LEVEL_INF=y
CONFIG_NET_IF_LOG_LEVEL_DBG=n
CONFIG_MBEDTLS_DEBUG=n
#CONFIG_MBEDTLS_DEBUG_LEVEL=4
CONFIG_SOCKS_LOG_LEVEL_DBG=n
CONFIG_NET_CONFIG_LOG_LEVEL_DBG=y
CONFIG_NET_CONNECTION_MANAGER_LOG_LEVEL_DBG=n
CONFIG_DNS_RESOLVER_LOG_LEVEL_DBG=n
CONFIG_NET_CONTEXT_LOG_LEVEL_DBG=n

My modem overlay:
# UART support
CONFIG_SERIAL=y
 
# GSM modem support
CONFIG_MODEM=y
CONFIG_MODEM_SHELL=y
CONFIG_MODEM_CMD_HANDLER_MAX_PARAM_COUNT=20
CONFIG_MODEM_GSM_PPP=y
CONFIG_MODEM_GSM_RX_STACK_SIZE=1024
CONFIG_MODEM_GSM_UART_NAME="UART_1"
CONFIG_MODEM_GSM_APN="internet"
 
# Network management events
CONFIG_NET_CONNECTION_MANAGER=y
 
# PPP networking support
CONFIG_NET_NATIVE=y
CONFIG_NET_PPP=y
CONFIG_NET_L2_PPP=y
CONFIG_NET_L2_PPP_TIMEOUT=10000
 
CONFIG_DNS_RESOLVER_MAX_SERVERS=1
CONFIG_DNS_SERVER_IP_ADDRESSES=y
CONFIG_DNS_SERVER1="8.8.8.8"

My main.c stayed unchanged.  I am hoping someone in the community has done something similar and can maybe help me out.  Any help would be appreciated.

Thanks,
Jurgens


Re: Query regarding Bluetooth Controller Porting

Pankaj Singh <PANKAJ.SINGH@...>
 

Hi Carles,

Thanks for sharing the information. We are planning to use uart-H4 protocol and it’s a dual mode controller.

My understanding is that H4tl module on controller side will be interacting with Zephyr BT host over uart and hence there needs to be zephyr based hci driver needed in the controller as well. Please correct me if my understanding is wrong. The hci driver needs to register via bt_hci_driver_register(const struct bt_hci_driver *drv) to send/receive payload with zephyr bt host.
Zephyr Host -> custom controller payload flow :
bt_send() -> struct bt_hci_driver: h4_send() -> h4: net_buf_put() -> uart_tx_queue -> hci driver controller: struct bt_hci_driver drv: send() ->h4 custom controller for further processing.

Controller -> host payload flow :
H4 of custom controller -> hci driver controller: bt_buf_get_rx() -> bt_recv() -> bt_dev.rx_queue -> bt host: hci_rx_thread().

-thanks

-----Original Message-----
From: Cufi, Carles <Carles.Cufi@nordicsemi.no>
Sent: Wednesday, December 9, 2020 3:14 PM
To: kumar.gala@linaro.org; Pankaj Singh <PANKAJ.SINGH@onsemi.com>; devel@lists.zephyrproject.org
Cc: users@lists.zephyrproject.org
Subject: RE: [Zephyr-users] Query regarding Bluetooth Controller Porting

[External Email]: This email arrived from an external source - Please exercise caution when opening any attachments or clicking on links.

+ devel list

Pankaj,

If you are using a dual-chip solution, then as long as you controller complies with standard HCI there is no "porting" to do whatsoever.
In order to better understand what you need, can you let us know which transport do you plan on using (UART/H4, 3-wire/H3 or SPI) and whether it is a single-mode or dual-mode controller?

Unless your controllers has special requirements it should all be a matter of configuring the right Kconfig options and Devicetree nodes.

Carles

-----Original Message-----
From: users@lists.zephyrproject.org <users@lists.zephyrproject.org> On
Behalf Of Kumar Gala via lists.zephyrproject.org
Sent: 08 December 2020 15:08
To: Pankaj Singh <PANKAJ.SINGH@onsemi.com>
Cc: users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Query regarding Bluetooth Controller
Porting

You may want to ask this question on the devel list.
(devel@lists.zephyrproject.org)

- k

On Dec 8, 2020, at 12:02 AM, Pankaj Singh <PANKAJ.SINGH@onsemi.com>
wrote:

Hi,

We want to port our custom Bluetooth controller to run on Zephyr
RTOS
(not using the default zephyr ble controller support). I went through
the Bluetooth documentation
https://urldefense.proofpoint.com/v2/url?u=https-3A__eur03.safelinks.p
rotection.outlook.com_-3Furl-3Dhttps-253A-252F-252Fdocs.zep&d=DwIGaQ&c
=MHZppzMdXMt3JYjCV71UsQ&r=D1ATefx54IThv9ORLOcugPTkb_DOEyRHRjojSRtEnrU&
m=ZO-WCaqOoEicxTN4fmmF7-u-hHTdbZr5jne77OIy4Jw&s=QnUBxuLAcWGdBjnd5kZF9a
QHR7Sye63KYcAkpY4B_NQ&e=
hyrproject.org%2Flatest%2Fguides%2Fbluetooth%2Findex.html&amp;data=04%
7C01
%7Ccarles.cufi%40nordicsemi.no%7Cc35438a7065845415d0708d89b82c771%7C28
e5af
a2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637430333288501659%7CUnknown%7CTW
FpbG
Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
3D%7
C1000&amp;sdata=6J8jWeiNRxk3NPbnu1uQq0g01EaUG8wCYsQK58AFk6w%3D&amp;res
erve
d=0
,https://urldefense.proofpoint.com/v2/url?u=https-3A__eur03.safelinks.
protection.outlook.com_-3Furl-3Dhttps-253A-252F-252Fdocs.ze&d=DwIGaQ&c
=MHZppzMdXMt3JYjCV71UsQ&r=D1ATefx54IThv9ORLOcugPTkb_DOEyRHRjojSRtEnrU&
m=ZO-WCaqOoEicxTN4fmmF7-u-hHTdbZr5jne77OIy4Jw&s=8zzMc7KWKKqqJAICGpPLCZ
SdvQVNjcruY_9-MvJourM&e=
phyrproject.org%2Flatest%2Fguides%2Fbluetooth%2Fbluetooth-
arch.html&amp;data=04%7C01%7Ccarles.cufi%40nordicsemi.no%7Cc35438a7065
8454
15d0708d89b82c771%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C6374303
3328
8501659%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLC
JBTi
I6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=pzOa7iuR0SSOR59u4s5VE3LgNF5M
eoXR ku7XtLCnOWo%3D&amp;reserved=0. The link’s talks about Bluetooth
host in detail and it was helpful. We want to use Dual Chip
configuration mode (use Zephyr Bluetooth host + custom Bluetooth
controller support) .

From link it talks about various host only build configuration
o CONFIG_BT =y
o CONFIG_BT_HCI =y
o CONFIG_BT_CTLR =n


My query is in order to port custom controller what steps, build
configuration we need to take care of. If there is a link/document
that helps to describe porting of custom Bluetooth controller to
Zephyr it will be helpful.

-thanks




API meeting: agenda

Carles Cufi
 


SDK 0.12.2 Release

Kumar Gala
 

Hi,

Latest version of the SDK can be found here:

https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.12.2

Please download and try things out and report any issues.

[ I skipped the release announcement on SDK 0.12.1 so including the changes since 0.12.0 ]

* Add support for MIPS
* Enable EFI binary generation for x86_64 binutils
* Fix to Kconfig version

Thanks to all that contributed fixes and enhancements to this version of the SDK.

- k


CANopen error message

Cristian Anceschi
 

Hi all

I'm developing a CANOPEN node based on an nRF52DK nRF52832 (PCA10040) board  wired to a MCP2515 and a MCP2551 devices.
So far, through a CAN Interface for USB plugged to a PC, I can receive and transmit packets and command from and to the board

When I compile the project and launch the Zephyr debug, the first message received by the PC over the CAN bus is an error message (hex string). Received only once, at reset.

08A 00 61 01 2A 00 00 00 00 00

which means that the system it is unable to allocate memory for object (CO_EM_MEMORY_ALLOCATION_ERROR).
The log file at the boot is

  *** Booting Zephyr OS build v2.4.0-ncs1  ***
[00:00:02.737,579] [0m<inf> fs_nvs: 6 Sectors of 4096 bytes [0m
[00:00:02.737,579] [0m<inf> fs_nvs: alloc wra: 1, e90 [0m
[00:00:02.737,579] [0m<inf> fs_nvs: data wra: 1, 210 [0m
[00:00:02.739,776] [0m<dbg> canopen_storage.canopen_settings_set: restored object dictionary EEPROM entries [0m
[00:00:02.739,807] [0m<dbg> canopen_driver.CO_CANmodule_init: rxSize = 13, txSize = 9 [0m
[00:00:02.740,814] [1;31m<err> canopen_driver: failed to attach CAN rx isr, no free filter [0m
[00:00:02.740,875] [1;31m<err> canopen_driver: failed to attach CAN rx isr, no free filter [0m
[00:00:02.740,905] [1;31m<err> canopen_driver: failed to attach CAN rx isr, no free filter [0m

[00:00:02.740,966] [0m<inf> app: CANopen stack initialized [0m
 
After this a guard message (hex string) , every 1 second,  is received over the CAN bus

70A 7F

The node appears in pre-operational state.
No other error messages are shown by the PC via the Zephyr debug system.

In this condition, sending NMT commands, it is possible to force the node to:
  • Enter in STOP mode
  • Enter in Pre-operational mode (from STOP mode)
  • Reset node
  • Reset communication
The node however doesn't enter in operational mode.

Might the reason for this latest fact be, that there is an error at reset, so that the node won't enter in operational mode because of this?
What can be the cause of the error? Is there a THREAD STACK SIZE or some other parameter I have to change to solve the problem?

Or can I suppose that the error message can be overlooked because the node has to start and then everything works as expected? I mean, the node after all IS receiving commands like I said above.

In any case I believe that the node has to be moved away from the error condition in order to proceed. What should be the best way to do this?                                                                                                                                                                                                                            Thanks in advance for any hints and support                                                                                                                                                                                                                                    Kind regards

Cristian                                                                                           


Problem with ARP source address #ethernet #stm32

tobias.roehmel@...
 

Hi,

I am using an STM32F4 board with an ENC28J60 (Ethernet over SPI chip) and am trying to get the net/sockets/http_get sample to work. To make it easier I use a static IP of google instead of DNS. The Problem I am seeing, by using Wireshark, is that the first Ethernet packet is lost somewhere on the ENC28J60. I know that the driver received the packet but it never arrives on the other side of the ethernet cable. The network stack tries to resend the packet but now the Sender protocol address is set to all 0s (This happens in the function arp_prepare in arp.c). The ARP request is answered but sent with Target protocol address 0.0.0.0 and Zephyr seems to refuse to reply to IPs other than their own. I found 2 solutions to this, first adding a delay before accessing the socket, second changing the code in arp.c to not fill in 0s.
Am I doing something wrong? Is there a configuration I could change instead? Is this the intended behavior?

Kind regards,
Tobias Röhmel


sx126x device driver: adding power management to the #lora #driver

Diogo Correia
 

Hello,

I’m building a battery powered IoT device based on an nRF52832, with a small sensor (i2c) and a LoRa transceiver (sx126x). The device measures and sends the measured value every 12 hours and stays in sleep during the rest of time. The device is currently withdrawing ~360uA (during sleep) which is a lot when compared with the my initial estimation of ~15uA. I think the problem is in the sx126x driver and the its lack of SoC’s power management. I have tried to add this functionality to the driver, but had no success. I used device_set_power_state with all GPIOs and the SPI peripheral. When deactivating the first, nothing special appears to happen on the consumption. When I deactivate SPI, the consumption increases in the order of mA (guess is something related with the context loss that is described in zephyr documentation). Does anybody have any suggestions in how to address this issue?


Kind regards,
Diogo Correia


PS: snippets of the code are attached to the thread


API meeting: agenda

Carles Cufi
 


Re: Divide zephyr into libraries #west

Lukasz Iwaszkiewicz
 

Hi

Isn't `ninja menuconfig` what you are looking after? Link :
https://docs.zephyrproject.org/latest/guides/kconfig/menuconfig.html?highlight=menuconfig
.

Regards

On Tue, Jan 19, 2021 at 11:32 AM Nikos Karamolegkos <nkaram@ics.forth.gr> wrote:

Guys any extra information about this. It will really helps.

Thank you


On 12/1/21 4:23 μ.μ., Nikos Karamolegkos wrote:

Hello and Happy new year to everyone, I am working in project with target to use zephyr as base of any freestanding application. Specifically, I would like the developer to have the ability to choose the desired sub-modules (e.g from subsys folder), after creating a new application. For example, a developer can create a hello-world application and then to choose that is interested to use bluetooth or net functionalities (think it like inserting new libraries to the projects). Any ideas on how to implement that? I have seen the cmake files in the app directory (e.g hello world) which are really simple. Should I make this process through proj.conf file (and/or the overlay conf files) by setting the appropriate configs? (e.g CONFIG_BT, CONFIG_NET_BUF, etc)?

--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


Re: Divide zephyr into libraries #west

Nikos Karamolegkos
 

Guys any extra information about this. It will really helps.

Thank you


On 12/1/21 4:23 μ.μ., Nikos Karamolegkos wrote:
Hello and Happy new year to everyone, I am working in project with target to use zephyr as base of any freestanding application. Specifically, I would like the developer to have the ability to choose the desired sub-modules (e.g from subsys folder), after creating a new application. For example, a developer can create a hello-world application and then to choose that is interested to use bluetooth or net functionalities (think it like inserting new libraries to the projects). Any ideas on how to implement that? I have seen the cmake files in the app directory (e.g hello world) which are really simple. Should I make this process through proj.conf file (and/or the overlay conf files) by setting the appropriate configs? (e.g CONFIG_BT, CONFIG_NET_BUF, etc)?
-- 
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


True Random Number Generator #crypto

mohamed.belaroussi@...
 

Hello,

I am using a third party chriptographic engine that provides a dedicated hardware accelerator for AES-128 encryption based algorithms.

I am using this engine to encrypt and decrypt the data transmitted and received over RF. To make the data more secure I am looking at generating encryption 128-bits keys using a True Random Number Generator. Is there a way of achieving a true random number generation using nRF5340 with Zephyr?
Thank you.

Kind regards
Mohamed Belaroussi

 


Re: Embedded Border-Router - Route Thread-Protocol to Serialbus

Becker Markus
 

Hi.

 

> **Creating an Embedded Border-Router for Thread**

 

Currently there is support for the NCP as well as the RCP configuration of an OpenThread BR within Zephyr (https://openthread.io/platforms/co-processor) next to the router/end-device device types.

 

NCP as well as RCP already use UART (or SPI) as a lower layer to send IP messages to an application processor. Zephyr’s OpenThread UART adaptation is at https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/net/lib/openthread/platform/uart.c.

 

If you run the host-side BR tools also on the micro-controller, this would make a very cost-efficient BR, but also a more restricted one. E.g. it will be harder to do firewalling, routing, service discovery, and WebUI things. It is definitely possible. If you work on this, let the mailing list know.

 

> **Additional processors on a serial bus**

 

From the figure and the description, it seems that you want to use the serial link as a thread link. This is similar to the TREL feature Jonathan pointed out on the openthread mailing list. TREL is there to use Ethernet as a Thread link. Note that TREL is not (yet) included within OpenThread on Zephyr.

 

BR,

Markus

 

From: users@... <users@...> On Behalf Of Liechtenecker Heinz-Peter Ulrich via lists.zephyrproject.org
Sent: Samstag, 16. Jänner 2021 18:13
To: users@...
Subject: [Zephyr-users] Embedded Border-Router - Route Thread-Protocol to Serialbus

 

Hi,

I am currently investigating Zephyr and Thread for various use cases and I did a lot of research, but there are still a lot of open questions left. I tried to avoid opening an issue, but I am quite unsure. where to ask my questions. So, before I deep-dive into the Zephyr world, some advice and hints would be nice to have. 

 

**Creating an Embedded Border-Router for Thread**

As far as I understood, Zephyr uses OpenThread under the hood. Users can take advantage of the common Zephyr Networking API - they do not directly interact with the L2 layer (where OpenThread is actually hidden). So, Thread defines several roles - one is the Border Role. The Zephyr-Documentation states that I can activate multiple Network Interfaces at the same time, however, no automatic IP routing is done. So, it should be no great problem to implement a Thread Border router?

 

So far so good, for my specific needs I would like to implement a Border-Router based on e.g. Lairds Pinnacle 100. So, the Border-Router I am thinking about would be running Zephyr which would perform routing between Thread and the Modem (in an industrial environment, so I do not expect users to manually add devices, they may be pre-configured - so no HTML server etc. is necessary). 

 

- Which steps would I have to take to implement such an embedded border router? And is this even a good idea? Maybe some experts do have some advice. (I have seen that there are some commits in the latest OpenThreads commits addressing Border-Routing and Backbone-Routing - so maybe it would. be an idea to use OpenThreads routing capabilities?)

- How do I set the corresponding Thread-Role for my device? (Router, Border-Route, End-Device...)

- What about https://github.com/zephyrproject-rtos/zephyr/issues/3861 ? Which features shall be available through this management interface?

 

Zephyr greatly abstracts all network-related features, at the same time it makes using OpenThread somehow intransparent….

 

**Additional processors on a serial bus**

I really do like the idea of a transparent IPv6 based network down to each device/processor. My specific hardware may consist of several (and optional) processors - connected to e.g. a Nordic device using a serial bus. Each processor runs zephyr and hence has its own OpenThread Stack. However, the processors connected via serial act as **end devices** while the Nordic acts as a **router**. The router bridges messages to the serial bus and the radio at the same time. The following figure hopefully clarifies the topology:

If I get this to work, it would allow me to send e.g. FOTA updates to each processor without any additional protocol etc. - I am not sure if this question is more related to OpenThread or Zephyr. I would like to know if something similar has already been tested/implemented and if so, where to start? I think one would have to add an additional interfaces to OpenThread - so the Router would have to track where to send packages to. Maybe an expert has some better ideas to accomplish such a topology without adding a lot of additional protocols? 

 

I did also ask the question in the OpenThread [mailing list](https://groups.google.com/g/openthread-users/c/RwYZJS2_IfQ/m/S2qNRaQwBwAJ) - so it would be a good idea to focus on the Zephyr part of the question.


The contents of this e-mail and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this e-mail is received in error, please immediately notify the sender and delete the e-mail and attached documents. Please note that neither the sender nor the sender's company accept any responsibility for viruses and it is your responsibility to scan or otherwise check this e-mail and any attachments.


Embedded Border-Router - Route Thread-Protocol to Serialbus

Liechtenecker Heinz-Peter Ulrich <H.Liechtenecker@...>
 

Hi,
I am currently investigating Zephyr and Thread for various use cases and I did a lot of research, but there are still a lot of open questions left. I tried to avoid opening an issue, but I am quite unsure. where to ask my questions. So, before I deep-dive into the Zephyr world, some advice and hints would be nice to have. 

**Creating an Embedded Border-Router for Thread**
As far as I understood, Zephyr uses OpenThread under the hood. Users can take advantage of the common Zephyr Networking API - they do not directly interact with the L2 layer (where OpenThread is actually hidden). So, Thread defines several roles - one is the Border Role. The Zephyr-Documentation states that I can activate multiple Network Interfaces at the same time, however, no automatic IP routing is done. So, it should be no great problem to implement a Thread Border router?

So far so good, for my specific needs I would like to implement a Border-Router based on e.g. Lairds Pinnacle 100. So, the Border-Router I am thinking about would be running Zephyr which would perform routing between Thread and the Modem (in an industrial environment, so I do not expect users to manually add devices, they may be pre-configured - so no HTML server etc. is necessary). 

- Which steps would I have to take to implement such an embedded border router? And is this even a good idea? Maybe some experts do have some advice. (I have seen that there are some commits in the latest OpenThreads commits addressing Border-Routing and Backbone-Routing - so maybe it would. be an idea to use OpenThreads routing capabilities?)
- How do I set the corresponding Thread-Role for my device? (Router, Border-Route, End-Device...)
- What about https://github.com/zephyrproject-rtos/zephyr/issues/3861 ? Which features shall be available through this management interface?

Zephyr greatly abstracts all network-related features, at the same time it makes using OpenThread somehow intransparent….

**Additional processors on a serial bus**
I really do like the idea of a transparent IPv6 based network down to each device/processor. My specific hardware may consist of several (and optional) processors - connected to e.g. a Nordic device using a serial bus. Each processor runs zephyr and hence has its own OpenThread Stack. However, the processors connected via serial act as **end devices** while the Nordic acts as a **router**. The router bridges messages to the serial bus and the radio at the same time. The following figure hopefully clarifies the topology:
If I get this to work, it would allow me to send e.g. FOTA updates to each processor without any additional protocol etc. - I am not sure if this question is more related to OpenThread or Zephyr. I would like to know if something similar has already been tested/implemented and if so, where to start? I think one would have to add an additional interfaces to OpenThread - so the Router would have to track where to send packages to. Maybe an expert has some better ideas to accomplish such a topology without adding a lot of additional protocols? 

I did also ask the question in the OpenThread [mailing list](https://groups.google.com/g/openthread-users/c/RwYZJS2_IfQ/m/S2qNRaQwBwAJ) - so it would be a good idea to focus on the Zephyr part of the question.


Re: Ethernet and CAN on STM32 #can #ethernet

Erwan Gouriou
 

Hi Michael,

When available, peripheral drivers of one SoC series should work with all boards using SoC of this series.
Peripheral configuration is not done systematically on all the boards, as it requires time and having the boards to test the change.
To get a peripheral driver working on a board, it only requires to configure the board dts file: enable matching node and configure pinctrl.
In most cases you would not need to touch the Kconfig configuration:
CONFIG_CAN will be set by application and thanks to Kconfig mechanisms, requested STM32_CAN config will be enabled.

HIH

Erwan



On Fri, 15 Jan 2021 at 02:52, <schmid.enterprise@...> wrote:
Dear all,

I am new to Zephyr, I would like to use it on a STM32 for a Ethernet-to-CAN converter. While looking on the list of supported boards, and the supported feature, I can not find a single STM32 board what is listed to support both interfaces. Ether is only CAN supported, or Ethernet. The only board what is listed to support both is the K64.

Now I wonder, why for several STM32 boards CAN is listed, but for others of the same chip family is not. For example, the waveshare_open103z, stm32f3_disco, stm32f4_disco, nucleo_l432, nucleo_l433, nucleo_l452 and black_f407 are listed to support CAN, but other STM32 boards with F1xx, F3xx, F4xx L4xx not show support of CAN. As is understand, the IP of the CAN inferface is the same on all F1, for example. So all boards with an F1xx mcu should have an identical MCU interface, from software point of view. I understand, that not all boards have a CAN driver chip, as such difficult to test the CAN feature on a stock Nucleo or disco  board.

How difficult is it, to make CAN working on a STM32 board, what not explicit shows CAN as supported on the Zephyr documentation, but have a sibling what is listed as support CAN? For example, make CAN working on a STM32F412 board (the STM32F407 support CAN). Is it just enable the SM32_CAN in the configuration and then recompile? Or are there bigger problems to expect?  The same goes for other features like DAC, ADC, ect.

Best regards,
Michael 

181 - 200 of 2599