Re: NRF52840 Timer driver
#nrf52840
Rodrigo Peixoto <rodrigopex@...>
Hi, Phil. Have you tried to use the timer API (https://docs.zephyrproject.org/latest/kernel/timing/timers.html?highlight=timer)? Did you face issues? There is already an implementation for it (timer driver for NRF) as you can see at the link https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/timer/nrf_rtc_timer.c. Best regards, Rodrigo Peixoto Co-founder and Technical advisor +55 (82) 98144-8585 http://ayna.tech | Skype: rodrigopex ![]() Em seg, 19 de nov de 2018 às 07:56, Phil Hipp <finke@...> escreveu:
Any suggestions on this topic?
|
|
Re: Reconnect to a provisioned node in Mesh BLE
#bluetoothmesh
#ble
#meshctl
Uilter Witte
I discovered what I forgot to do. The provisioner, in my case the RPI, lost the connection with the network. When it happens you just need to execute the command: [meshctl]# connect [net_idx] [dst] //Connect to mesh network or node on network Where [net_idx] is the number of the network that want to connect, what in my case is 0. Thanks. Em seg, 19 de nov de 2018 às 11:32, Uilter Witte <uilter.witte@...> escreveu:
--
-- Uilter Witte
|
|
COAP Client and server examples over BLE
#nrf52-pca10040
#ble
swapnil <swapnil2007kadam@...>
Hello,
I have been trying to use COAP server and client examples over BLE for the last few days but not able to communicate between server and client. I will be grateful if I get help me with the following doubts. I tried ipsp example from Bluetooth examples and it worked fine with the nrf52 dk. I thought of using the coap client and server from net examples with the two nrf52 DK, one for the client and another for Server. first, i compiled the client application with prj_bt.conf and after flashing it, bt shell opened. I followed the same procedure which i followed for the ipsp example and i was able to ping the client from Linux host. furthermore, I flashed coap server in another nrf52 DK. As there is no shell configured in conf file, nothing was on a screen. To get an access to the Bluetooth i configured bt shell for the server as well, but with that, i wasn't able to turn on the advertisement.
Thank you in advance. regards, Swapnil
|
|
Bluetooth: Mesh: APP key & Mesh initialisation delay related issue
vikrant8051 <vikrant8051@...>
Hi, 1) If we, (provision -> unprovision -> provision) the Bluetooth Mesh Node which is based on onoff_level_lighting_vnd_app then in case of some arbitrary available Model APP key not get save on SoC persistent storage during "any" reprovision event. After reboot we have to reassign APP key to things get work. 2) Still facing Mesh initialisation delay. This is because of some recent commits. There could be problem in commits which are merged after 46386522142e546c6e028db0f560c6db25a02d06 Thank You !!
|
|
Reconnect to a provisioned node in Mesh BLE
#bluetoothmesh
#ble
#meshctl
Uilter Witte
Hi,
I'm working with Zephyr Project to study and build light solutions using Mesh BLE.
To proof the concept I'm using the following setup:
- 2 boards of Nordic with nRF52832 model PCA10040;
- Raspberry Pi Zero W with Bluez 5.50;
I build the sample of mesh application to nRF52: https://docs.zephyrproject.
It worked without problems.
I'm using Zephyr Kernel v1.13.0 and Zephyr SDK 0.9.5.
My first objective is been able to provisioning and control the nodes through linux using the bluez.
Today I can do that, but I'm experiencing some problems in the reconnection phase of the node when I fully power it off.
How can I reconnect the node through bluez and control it again?
I'm not find any tips on internet or something like that.
Thank very much to tips or advice.
Regards,
Uilter Witte
|
|
Phil Hipp
Thanks, I#ll give this a try.
|
|
Power Management with minimum residency smaller than 1s
#nrf52840
Phil Hipp
Hey everybody,
I'm currently working on the OS controlled power management (CONFIG_PM_CONTROL_OS) on the nrf52840. We need the OS to switch to Low Power when it's idle for around 100ms, but the minimum residency that can be configured is 1s. Is there any possibility to lower the minimum residency per configuration?
|
|
Vinayak Kariappa
Hi, There is no public interface to the controller to do so, but there is this internal ISR context radio_active_callback that can be configured to execute on every BLE radio event enable and disable at the end of the event. You could give a semaphore in that ISR callback and take actions in a thread. Regards, Vinayak
On Mon, Nov 19, 2018 at 11:57 AM Phil Hipp <finke@...> wrote: Any suggestions on this topic?
|
|
Phil Hipp
Any suggestions on this topic?
|
|
Re: NRF52840 Timer driver
#nrf52840
Phil Hipp
Any suggestions on this topic?
|
|
Re: Firmware Updates via I2C/SPI
Marti Bolivar <marti@...>
Hi Evan,
On Thu, Nov 15, 2018 at 10:36 AM Evan Gates <evan.gates@gmail.com> wrote: You will need some code which can write to the MCUboot slot 1 (not slot 0, where you run out of) on flash based on data received from I2C or SPI. I don't think there is any code for this in Zephyr, but nothing is preventing it. The underlying APIs in <dfu/flash_img.h> and <dfu/mcuboot.h> are agnostic to the transport. You can use any protocol you like, including I2C and SPI. My company uses TCP and UDP for this, for example. To clear slot 1, use boot_erase_img_bank(). You then need to set up a struct flash_img_context (using flash_img_init() after obtaining a pointer to your flash device with device_get_binding()), then call flash_img_buffered_write() in your I2C or SPI handlers as you receive the new image data. When you are done getting the image data, use boot_request_upgrade() to mark slot 1 as bootable on the next reset, then perform the reset itself. We use sys_reboot(SYS_REBOOT_WARM) from <misc/reboot.h> for that. The above description is how I would set that up. NVS is not relevant to this. Nor is mcumgr (unless you want to implement an I2C or SPI transport for that protocol). You'll need to dig around in the menuconfig to enable these APIs. Hope this helps, Marti
|
|
Firmware Updates via I2C/SPI
evan.gates@...
I have an STM32F091VCH6 running Zephyr 1.12 with mcuboot 1.2.0. I have
another processor running linux with connections to the STM over both I2C and SPI. I want to be able to send firmware upgrades from linux over I2C or SPI. Is there an existing way to do this? In my quick searches I didn't find anything. I see that zephyr has a Device Firmware Upgrade subsystem. As far as I can tell both this subsystem and the dfu-util to use it are designed for use over USB. Is there an existing solution to use DFU and dfu-util over I2C/SPI? If not would it be difficult to write a driver/interface for it? Would it be better to use the Non Volatile Storage subsystem to write to the flash manually? Just start a thread that reads in from I2C/SPI and writes to the correct place in flash? Thanks, Evan
|
|
Reconnect to a provisioned node in Mesh BLE
Uilter Witte
Hi, I'm working with Zephyr Project to study and build light solutions using Mesh BLE. To proof the concept I'm using the following setup: - 2 boards of Nordic with nRF52832 model PCA10040; - Raspberry Pi Zero W with Bluez 5.50; I build the sample of mesh application to nRF52: https://docs.zephyrproject.org/1.13.0/samples/boards/nrf52/mesh/onoff-app/README.html It worked without problems. I'm using Zephyr Kernel v1.13.0 and Zephyr SDK 0.9.5. My first objective is been able to provisioning and control the nodes through linux using the bluez. Today I can do that, but I'm experiencing some problems in the reconnection phase of the node when I fully power it off. How can I reconnect the node through bluez and control it again? I'm not find any tips on internet or something like that. Thank very much to tips or advice. Regards, Uilter Witte
|
|
nRF52840: Current in sleep
Christoph Schramm <schramm@...>
Hi All,
we’ve built a custom board around nRF52840 and have now included an external 20ppm crystal. Running the pwr_mgmt sample, I still see an avg current of 380uA (measured with OTII Arc which is confirmed to be nearly exact). Has anyone a custom board running and would be willing to share his or her observations on current?
Thanks, Chris
|
|
marcus
Hi,
|
|
Re: [mBed][TLS][MQTT][sam_e70_xplained]
Prabhu Vinod, Karthik
Never mind…I found the error. I had to diff conf-tls1_2_generic.h and other config and add the remaining ones to user config file. Also remove #define MBEDTLS_CONFIG_H from the tls user config file so that they are included.
Sorry and Thanks.
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: <users@...> on behalf of "Karthik Prabhu Vinod (Intel)" <karthik.prabhu.vinod@...>
Hi,
I am trying to build the mqtt_publisher_subscriber app for sam_e70_xplained board. I was successfully able to connect to a cloud via TLS_v1_2 using a DER format.
But now, I am trying to switch to a more friendly PEM format by of course looking at the samples and it fails to connect. Also, unable to turn on the LOGGING for MBEDTLS modules, I wasn’t sure what’s causing the failure after the change to how logging works for NET & MBEDTLS modules
This is how I am assigning my PEM buffer
static const unsigned char ca_certificate[]= "-----BEGIN CERTIFICATE-----\r\n" "MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh\r\n" "MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\r\n" "d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD\r\n" "QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT\r\n" "MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\r\n" "b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG\r\n" "9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB\r\n" "CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97\r\n" "nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt\r\n" "43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P\r\n" "T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4\r\n" "gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO\r\n" "BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR\r\n" "TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw\r\n" "DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr\r\n" "hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg\r\n" "06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF\r\n" "PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls\r\n" "YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\r\n" "CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n" "-----END CERTIFICATE-----\r\n";
Building my CA chain:
ret = mbedtls_x509_crt_parse(ca_cert, ca_certificate, sizeof(ca_certificate));
When I run build, the linker errors:
libzephyr.a(net_app.c.obj): In function `_net_app_tls_init': /Users/kprabhuv/new_zephyr/subsys/net/lib/app/net_app.c:2221: undefined reference to `mbedtls_entropy_init' /Users/kprabhuv/new_zephyr/subsys/net/lib/app/net_app.c:2230: undefined reference to `mbedtls_entropy_add_source' /Users/kprabhuv/new_zephyr/subsys/net/lib/app/net_app.c:2358: undefined reference to `mbedtls_entropy_func' libzephyr.a(net_app.c.obj): In function `_net_app_tls_handler_stop': /Users/kprabhuv/new_zephyr/subsys/net/lib/app/net_app.c:2365: undefined reference to `mbedtls_entropy_free' collect2: error: ld returned 1 exit status make[2]: *** [zephyr/zephyr_prebuilt.elf] Error 1 make[1]: *** [zephyr/CMakeFiles/zephyr_prebuilt.dir/all] Error 2 make: *** [all] Error 2
Please look forward to some tips or advice.
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.
|
|
[mBed][TLS][MQTT][sam_e70_xplained]
Prabhu Vinod, Karthik
Hi,
I am trying to build the mqtt_publisher_subscriber app for sam_e70_xplained board. I was successfully able to connect to a cloud via TLS_v1_2 using a DER format.
But now, I am trying to switch to a more friendly PEM format by of course looking at the samples and it fails to connect. Also, unable to turn on the LOGGING for MBEDTLS modules, I wasn’t sure what’s causing the failure after the change to how logging works for NET & MBEDTLS modules
This is how I am assigning my PEM buffer
static const unsigned char ca_certificate[]= "-----BEGIN CERTIFICATE-----\r\n" "MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh\r\n" "MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\r\n" "d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD\r\n" "QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwM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d8tbQk\r\n" "CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n" "-----END CERTIFICATE-----\r\n";
Building my CA chain:
ret = mbedtls_x509_crt_parse(ca_cert, ca_certificate, sizeof(ca_certificate));
When I run build, the linker errors:
libzephyr.a(net_app.c.obj): In function `_net_app_tls_init': /Users/kprabhuv/new_zephyr/subsys/net/lib/app/net_app.c:2221: undefined reference to `mbedtls_entropy_init' /Users/kprabhuv/new_zephyr/subsys/net/lib/app/net_app.c:2230: undefined reference to `mbedtls_entropy_add_source' /Users/kprabhuv/new_zephyr/subsys/net/lib/app/net_app.c:2358: undefined reference to `mbedtls_entropy_func' libzephyr.a(net_app.c.obj): In function `_net_app_tls_handler_stop': /Users/kprabhuv/new_zephyr/subsys/net/lib/app/net_app.c:2365: undefined reference to `mbedtls_entropy_free' collect2: error: ld returned 1 exit status make[2]: *** [zephyr/zephyr_prebuilt.elf] Error 1 make[1]: *** [zephyr/CMakeFiles/zephyr_prebuilt.dir/all] Error 2 make: *** [all] Error 2
Please look forward to some tips or advice.
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.
|
|
Re: DFU over UART
#nrf52832
gurpreet+zephy@...
I tried this with v1.2.0 of mcuboot, as well as the latest master code.
|
|
Re: DFU over UART
#nrf52832
gurpreet+zephy@...
I've made some progress.
Once I get the device in serial mode I am able to start the mcumgr upload, but it constantly times out. The RTT output from the dev board: ***** Booting Zephyr OS zephyr-v1.13.0-49-g121f323de *****
[MCUBOOT] [INF] main: Enter the serial recovery mode
[MCUBOOT] [INF] boot_serial_output: TX
And the mcumgr logs with debug ON: zephyr (dfu_expt) 15:22:55>mcumgr -ldebug -t 60 --conntype=serial --connstring='dev=/dev/ttyACM0,baud=115200' image upload signed-hello1.bin
DEBU[2018-11-12 15:23:01.044] Using connection profile: name=unnamed type=serial connstring=dev=/dev/ttyACM0,baud=115200
DEBU[2018-11-12 15:23:01.044] {add-oic-listener} [transceiver.go:64] token=[]
DEBU[2018-11-12 15:23:01.044] {add-oic-listener} [transceiver.go:64] token=[]
0 / 47864 [---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0.00%DEBU[2018-11-12 15:23:01.044] {add-nmp-listener} [serial_sesn.go:217] seq=66
DEBU[2018-11-12 15:23:01.045] Encoded &{NmpBase:{hdr:{Op:2 Flags:0 Len:0 Group:1 Seq:66 Id:5}}} to:
00000000 a0 |.|
DEBU[2018-11-12 15:23:01.045] Encoded:
00000000 02 00 00 01 00 01 42 05 a0 |......B..|
DEBU[2018-11-12 15:23:01.045] Tx NMP request: 00000000 02 00 00 01 00 01 42 05 a0 |......B..|
DEBU[2018-11-12 15:23:01.045] Base64 encoding request:
00000000 02 00 00 01 00 01 42 05 a0 |......B..|
DEBU[2018-11-12 15:23:01.045] Tx serial
00000000 06 09 |..|
DEBU[2018-11-12 15:23:01.045] Tx serial
00000000 41 41 73 43 41 41 41 42 41 41 46 43 42 61 44 4d |AAsCAAABAAFCBaDM|
00000010 6f 51 3d 3d |oQ==|
DEBU[2018-11-12 15:23:01.045] Tx serial
00000000 0a |.|
DEBU[2018-11-12 15:23:01.053] Rx serial:
00000000 06 09 41 42 41 44 41 41 41 47 41 41 46 34 65 44 |..ABADAAAGAAF4eD|
0 B / 46.74 KiB [----------------] 0.00%
DEBU[2018-11-12 15:23:28.019] Rx serial: 0 B / 46.74 KiB [----------------] 0.00%
This shows that the initial frame seems to be sent (as per https://github.com/apache/mynewt-mcumgr/blob/master/transport/smp-console.md#overview), but mcumgr fails to send the remaining bytes. Is there something I'm missing? -Gurpreet
|
|
Re: getting started setting up Zephyr build environment on Ubuntu...errors
Robert Berger
Hi Eric,
I'm on Ubuntu 18.04 running on an Odroid xU4. The reason I'm using this SBC is so I can make an image of the eMMc when it's all setup and I hope I won't have to go through this again. And other people can spend $110 on the Odroid xU4 and just download the image and also be on their way in less than 10 minutes. Totally worth it.Well I tend to disagree on that since the way you hacked up your SD card is most likely totally non reproduce-able. Also building stuff on the SD card is not reproduce-able. Anyways. If you want to come up with a development environment which can be shared and re-used I would look e.g. into containers e.g. something like this[1] (which seems a bit bit-rotten). [1] https://github.com/crops/zephyr-container Regards, Robert
|
|