Sleep current on
#nrf52480
Fabien Lepoutre
Hi all, I've ran some power consumption tests with Zephyr 1.12 #... a00646a5 Using the samples/boards/nrf52/pwr_mgr at lowest power mode, I find that the nrf52840 has a sleep current of ~550uA. When I run simple power management code with Nordic SDK in sleep mode, I get about ~30uA. To run these tests, I used the PCA52840 PDK board and measured the current using the Nordic Power Profiler Kit and also a third party solution. I'm confident the current numbers are right. Has anyone ran sleep power measurements on the nrf52840 and have different results? I would like to understand the discrepancy between Zephyr OS and nordic SDK to bring down my current power numbers to the SDK ones. Thanks a lot! |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: SODAQ One V3 porting
Léonard Bise <leodido99@...>
I'm having difficulties trying to communicate with the LoRa UART interface. I set it up like so: pinmux.c #if CONFIG_UART_SAM0_SERCOM2_BASE_ADDRESS /* SERCOM2 LoRa UART on RX=PA13/pad 1, TX=PA12/pad 0 */ pinmux_pin_set(muxa, 12, PINMUX_FUNC_C); pinmux_pin_set(muxa, 13, PINMUX_FUNC_C); #endif board.h /* SERCOM2 LoRa UART on RX=PA13/pad 1, TX=PA12/pad 0 */ #define CONFIG_UART_SAM0_SERCOM2_PADS \ (SERCOM_USART_CTRLA_RXPO(1) | SERCOM_USART_CTRLA_TXPO(0)) sodaq_one_v3.dts &sercom2 { status = "ok"; compatible = "atmel,sam0-uart"; current-speed = <57600>; }; I created a test program similar to samples/subsys/usb/cdc_arm In my test program I get the device like so. lora = device_get_binding(ATMEL_SAM0_UART_42001000_LABEL); I didn't find any documentation on how to determine the device names and I'm not sure it's the correct one, could someone enlighten me? However as soon as I enable the RX or TX IRQ I'm stuck in an interruption loop so I guess something must be off with my configuration. Best regards, Léonard. On 1 June 2018 at 19:03, Henrik Brix Andersen <henrik@...> wrote: Hi Léonard |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[Zephyr-users] OpenThread example from embedded world conf
#nrf52840
vikrant8051 <vikrant8051@...>
---------- Forwarded message ---------- From: Lubos, Robert <Robert.Lubos@...> Date: Thu, Jun 28, 2018 at 1:14 PM Subject: RE: [Zephyr-users] OpenThread example from embedded world conf #nrf52840 To: vikrant8051 <vikrant8051@...>, "Cufi, Carles" <Carles.Cufi@...> Cc: Eric <ericmdwest@...>, "users@..." <users@...> Hello,
I’ll try address unanswered questions:
You’re right, you need a Border Router to use the Commissioning App. OpenThread provides an Open Source reference design for Border Router, you’ll need a Raspberry Pi 3B and for example Nordic’s nRF52840 DK (for Network Co-Processor). A guide on how to setup a Border Router and how to use the Commissioning App can be found on OpenThread wiki: https://openthread.io/guides/ https://openthread.io/guides/
Note though, that Zephyr samples with OpenThread are pre-comissioned, so in case you would like to do the commissioning procedure again, you’ll have to perform specific actions to stop the network, I’ve described it here: https://github.com/
That’s where commissioning comes in. Zephyr samples are pre-comissioned (they have hardcoded Network Key, PAN ID and channel), hence they form/join network rightaway. In real world you’ll need a commissioner though, that’ll allow new nodes to obtain these values from the network. You have several options for commissioning procedure:
Thread commissioning is complex topic, that might be hard to understand without diving in into Thread Specification. You can check this page for some more information about it: https://openthread.io/guides/
If you refer to the Commissioning App here, it communicates with Thread Nodes via Wi-Fi. In this scenario Border Router serves as a proxy, that forwards relevant Wi-Fi traffic to 802.15.4.
Currently there is no support for 802.15.4/BLE multiprotocol operation in Zephyr.
Regards, Robert
From: users@... [mailto:users@lists.
Sent: Wednesday, June 27, 2018 20:49 To: Cufi, Carles <Carles.Cufi@...> Cc: Eric <ericmdwest@...>; users@... Subject: Re: [Zephyr-users] OpenThread example from embedded world conf #nrf52840
Hi Charles,
> Use the prj_nrf52840_ot.conf files in both.
Is that means we have to rename it as prj.conf ?
Thread Group has recently released Thread Commissioning App. How we can use it for exploring further things? I think Border router will be required in that case.
How any node becomes a part of #ThreadMesh network ?
How to access thread NODEs using smart phone ? Is Bluetooth PHY & 802.15.4 co-exit for provided sample App ?
Thanks !!
On Wed, Jun 27, 2018, 11:59 PM Cufi, Carles <carles.cufi@...> wrote:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Mbedtls_pk_verify error
There are still buffer/variable overflow problems, so I would make sure those are fixed before trying to figure out why else it might not be working. For example:
char buffer[2]; ... snprintk(buffer, SHA256_SIZE, "%02x", rsp_hash[i]); in this case, the buffer is 2 characters, yet you are passing a much larger value as the buffer's size. In this case the "%02x" will add two hex characters, and a terminating null, which will overflow the 2 character buffer, overwriting something else that is on the stack. There are other things like using memcmp to compare a single character, instead of memcmp(&msg[i], "U", sizeof(msg[i])), just use (msg[i] == 'U'). Beyond that, you'll probably have to start stepping through the code with a debugger to find out what is happening. But, I would work on the overflows and such first, since those can cause very confusing behavior. David From: Zephyr Devel <devel@...> on behalf of christian tavares <christiantavarest@...> Date: Monday, June 11, 2018 at 11:04 AM To: Zephyr Devel <devel@...> Subject: Re: [Zephyr-devel] Mbedtls_pk_verify error Thanks for you answer me. I followed your tips and corrected that problems and I resolved to simplify the code removing the server side and letting just application working. But the problem doesn't resolve yet If you could see again o code modified I'll be grateful to help me. Thanks again. https://github.com/chtavares592/verify_signature/blob/master/verify_signature/src/main.c |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: SODAQ One V3 porting
Léonard Bise <leodido99@...>
I'm back again! I think I sent the last mail only to Brix by mistake. I'm happy to say that I fixed my issue... I needed to set my pin mux function as D not C. #if CONFIG_UART_SAM0_SERCOM5_BASE_ADDRESS /* SERCOM5 on RX=PB3/pad 1, TX=PB2/pad 0 */ pinmux_pin_set(muxb, 2, PINMUX_FUNC_D); pinmux_pin_set(muxb, 3, PINMUX_FUNC_D); #endif ***** Booting Zephyr OS v1.12.0-333-g2c8c1310f ***** Hello World! arm Now I'm going to try to communicate with the RN2483 chip through an UART device Best regards, Léonard. On 1 June 2018 at 19:03, Henrik Brix Andersen <henrik@...> wrote: Hi Léonard |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: zephyr question
Carles Cufi
Hi there,
I just tried this but instead of using menuconfig I changed my prj.conf like this:
diff --git a/samples/bluetooth/peripheral_hr/prj.conf b/samples/bluetooth/peripheral_hr/prj.conf index 08ebfd7e4..77e989c84 100644 --- a/samples/bluetooth/peripheral_hr/prj.conf +++ b/samples/bluetooth/peripheral_hr/prj.conf @@ -4,3 +4,6 @@ CONFIG_BT_SMP=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_DEVICE_NAME="Zephyr Heartrate Sensor" CONFIG_BT_DEVICE_APPEARANCE=833 + +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n
With this I ran samples/bluetooth/peripheral_hr 5 times on a PCA10040 and tested it (connecting with an iPhone running LightBlue) and had no issues at all.
Which Zephyr version are you using? I tried the latest master.
Regards,
Carles
From: devel@... <devel@...>
On Behalf Of Hsu, Hanyu
Sent: 26 June 2018 16:29 To: zephyr-devel@... Cc: Dunk Chen <dunk.chen@...>; Bochang Lian (連柏蒼) (bochang_lian@...) <bochang_lian@...> Subject: [Zephyr-devel] zephyr question
Hi Sir,
We occurred some question when we use zephyr in nRF52832.
We found there were some chips cannot boot-up w/ Zephyr sample code (disable UART), but can boot up well w/ Nordic original sample code (ble_app_hrs). But if we enabled the UART function of Zephyr sample code, the failure chip can boot up well.
Below is our test environment and procedure.
For attached file, - peripheral_hr_uart: The board configuration of PCA10040 in Zephy. - peripheral_hr_no_uart: The board configuration of Nordic PCA1004. Disable UART through “menuconfig”
1) make BOARD=nrf52_pca10040 menuconfig 2) Disable ‘Console drivers', 'Serial Drivers': Enter path “Device Drivers” 3) make BOARD=nrf52_pca10040 -> for the firmware of “peripheral_hr_no_uart”
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: advertising data
Hi Tamra,
toggle quoted message
Show quoted text
The format of the data (behind ad->data with length ad->len) is specified in the Bluetooth Core Specification (5.0) Volume 3, Part C, section 11 (page 2086 in the pdf). In practice it's just a sequence of <1 byte length><1 byte type><N byte payload> elements, and you can use the recently added bt_data_parse() API to help parse these. You'll find defines for the various data types in include/bluetooth/hci.h with the prefix BT_DATA_*. The actual formats and meanings of the different types are defined in the Core Specification Supplement document. Both the Core Specification and the Supplement can be found here: https://www.bluetooth.com/specifications/bluetooth-core-specification Johan On Tue, Jun 26, 2018, Tamra Oyama wrote:
Hi all, |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: advertising data
Zou, Jun Qing
You might also want to try Nordic’s “nRF Connect” on Android. It could show you all the details of hex received in advertising and scan response packet, in raw and parsed mode.
BR, zou
From: devel@... [mailto:devel@...]
On Behalf Of Tamra
Sent: Wednesday, June 27, 2018 10:01 AM To: Johan Hedberg <johan.hedberg@...> Cc: Luiz Augusto von Dentz <luiz.dentz@...>; Zephyr Devel <devel@...> Subject: Re: [Zephyr-devel] advertising data
Hi all,
Thanks for the help. From what I can tell "ad" from "struct net_buf_simple *ad" is the payload, and so I'm wondering what format is the payload in. (i.e if i convert it to binary where in the Bluetooth spec can I find what these values mean?
Thanks, Tamra
On Tue, Jun 26, 2018 at 6:37 AM, Johan Hedberg <johan.hedberg@...> wrote:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: advertising data
Tamra <tamrako@...>
Hi all, Thanks for the help. From what I can tell "ad" from "struct net_buf_simple *ad"
is the payload, and so I'm wondering what format is the payload in.
(i.e if i convert it to binary where in the Bluetooth spec can I find
what these values mean? Thanks, Tamra On Tue, Jun 26, 2018 at 6:37 AM, Johan Hedberg <johan.hedberg@...> wrote: Hi, |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
zephyr question
Hsu, Hanyu <Hanyu.Hsu@...>
Hi Sir,
We occurred some question when we use zephyr in nRF52832.
We found there were some chips cannot boot-up w/ Zephyr sample code (disable UART), but can boot up well w/ Nordic original sample code (ble_app_hrs). But if we enabled the UART function of Zephyr sample code, the failure chip can boot up well.
Below is our test environment and procedure.
1. We use zephyr sample 'peripheral_hr' to test and the result as below. For attached file, - peripheral_hr_uart: The board configuration of PCA10040 in Zephy. - peripheral_hr_no_uart: The board configuration of Nordic PCA1004. Disable UART through “menuconfig”
2. For the block in red, we dump the debug information of back trace through J-link.
3. Test procedure of Zephyr: a. Download and install zephyr SDK and zephyr ( http://docs.zephyrproject.org/1.8.0/getting_started/getting_started.html) b. Enter samples/bluetooth/peripheral_hr c. Create the firmware of peripheral_hr: make BOARD=nrf52_pca10040 -> It’s the firmware of “peripheral_hr_uart” (w/ UART). d. Create the firmware of “peripheral_hr” that remove UART: procedure as below. 1) make BOARD=nrf52_pca10040 menuconfig 2) Disable ‘Console drivers', 'Serial Drivers': Enter path “Device Drivers” 3) make BOARD=nrf52_pca10040 -> for the firmware of “peripheral_hr_no_uart”
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Release readiness meeting cancelled
Carles Cufi
Hi all,
We have had to cancel the Release Readiness meeting today due to technical issues with the conferencing system. Apologies for the late notice. Regards, Carles |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: advertising data
Hi,
On Tue, Jun 26, 2018, Luiz Augusto von Dentz wrote: I'd like to add here that we've just merged a new helper API for parsingOn Tue, Jun 26, 2018 at 3:55 AM, Tamra <tamrako@...> wrote:Actually the event type is no the AD type, sorry about that, so 0x03I'm looking at the central_hr example. I was wondering what information isThe type you will be able to find in the assigned number for GAP: the advertising data: https://github.com/zephyrproject-rtos/zephyr/pull/8560 This pull request also included updating the central_hr sample, so you might want to take a second look at that code. Johan |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Carles Cufi
Hi there,
I copied Vinayak who is the original author of the ticker. There is no real material available publicly at this point.
Regards,
Carles
From: devel@... <devel@...>
On Behalf Of swapnil
Sent: 26 June 2018 13:12 To: devel@... Subject: [Zephyr-devel] ticker timer #ble #nrf52832 #nrf52840
Hello, I am trying to understand ticker timer. and have confusion between user id's, what is the difference between RADIO_TICKER_USER_ID_WORKER and RADIO_TICKER_USER_ID_APP? |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
swapnil <swapnil2007kadam@...>
Hello, I am trying to understand ticker timer. and have confusion between user id's, what is the difference between RADIO_TICKER_USER_ID_WORKER and RADIO_TICKER_USER_ID_APP?
is there any material available to understand the ticker timer? Thank you in advance |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: advertising data
Luiz Augusto von Dentz
Hi Tamra,
On Tue, Jun 26, 2018 at 11:35 AM, Luiz Augusto von Dentz <luiz.dentz@...> wrote: Hi Tamra,Actually the event type is no the AD type, sorry about that, so 0x03 refers to BT_LE_ADV_NONCONN_IND. Thank you, -- Luiz Augusto von Dentz |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: advertising data
Luiz Augusto von Dentz
Hi Tamra,
On Tue, Jun 26, 2018 at 3:55 AM, Tamra <tamrako@...> wrote: Hi all,The type you will be able to find in the assigned number for GAP: https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile AD payload format for each type is described in the CSS, for instance type 3 is <<Complete List of 16-bit Service UUIDs>> which consists in a list of 16-bit Service UUIDs. Thank you, -- Luiz Augusto von Dentz |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
advertising data
Tamra <tamrako@...>
Hi all, I'm looking at the central_hr example. I was wondering what information is packed into the net_buf_simple *ad? The function and output is below. static void device_found(const bt_addr_le_t *addr, s8_t rssi, u8_t type, struct net_buf_simple *ad) [DEVICE]: 34:3c:99:ab:65:6d (random), AD evt type 3, AD data len 31, RSSI -83 data: 2818606536 Thank you, Tamra |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Json descripte
Leandro Pereira
Christian,
On 06/25/2018 11:13 AM, christian tavares wrote: Hello! I have a json and I would like to descript it, but the problem that json is a array objects of array objects. I was seeing the include/json.h and I can't find the way to describe that json.The JSON parser is quite unorthodox, so it can be quite tricky to declare the descriptor. However, it's quite efficient, type-safe, and can also be used to generate JSON, so once you get the hang of it. you'll see it's not that hard to use, all things considered. The first step is identifying how to lay the structs down. It's maybe a good idea to start with the innermost struct; please disregard the names, I don't have a lot of context to come up with better ones: struct product { const char *test; const char *mode; }; Then you can create an struct containing these structs. Since you're going to have an array, you also need a size_t item to hold the number of elements in that array; you'll see it referenced down below when the descriptors are being declared: #define PRODUCT_LIST_MAX_ITEMS 32 struct product_list { struct product products[PRODUCT_LIST_MAX_ITEMS]; size_t products_len; }; And another one, containing the manifest of product lists: struct manifest { struct product_list items[PRODUCT_LIST_MAX_ITEMS]; size_t items_len; }; (In this case, you'll have space for 1024 (32 * 32) items, which might be a *lot* to allocate, in say, the stack of your typical thread in Zephyr; please adjust as required, maybe using different constants for different structs... I would need more context to come up with better sizes.) Once you have all this, you can start working by defining the descriptors. I usually start with the simplest structs (the ones without nested objects, such as other objects, or arrays): static const struct json_obj_descr product_desc[] = { JSON_OBJ_DESCR_PRIM(struct product, test, JSON_TOK_STRING), JSON_OBJ_DESCR_PRIM(struct product, mode, JSON_TOK_STRING), }; (I don't know much how the JSON you're working with is generated, but if you have the choice of using stronger types -- instead of strings -- please do it. The parser will refuse to parse values that have types different than the ones declared in the descriptors.) Then define the descriptor for the product_list struct: static const struct json_obj_descr product_list_desc[] = { JSON_OBJ_DESCR_ARRAY(struct product_list, products, PRODUCT_LIST_MAX_ITEMS, products_len, product_desc, ARRAY_SIZE(product_desc)), }; Then define the descriptor for the manifest struct: static const struct json_obj_descr manifest_desc[] = { JSON_OBJ_DESCR_ARRAY(struct manifest, items, PRODUCT_LIST_MAX_ITEMS, items_len, product_list_desc, ARRAY_SIZE(product_list_desc)), }; Then you can just use json_obj_parse() by pointing it to manifest_desc as the descriptor array, and a pointer to a struct manifest allocated somewhere. Also note that I wrote this directly while composing the message; I haven't compiled this. So there might be some mismatched parenthesis or missing punctuation somewhere. Hope this helps, Leandro |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Json descripte
christian tavares
Hello! I have a json and I would like to descript it, but the problem that json is a array objects of array objects. I was seeing the include/json.h
and I can't find the way to describe that json. The format is : {
"product":[
[
{
"test":"1",
"mode":"test",
}
],
[
{
"test":"2",
"mode":"test",
}
]
]
}
Someone could help me ?
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Pairing method table
Szymon Janc
Hi,
On Thursday, 21 June 2018 10:57:24 CEST Zou, Jun Qing wrote: Hi,This is for Secure Simple Pairing (SSP) which is used only on BR/EDR. BLE pairing is done in host via Security Manager (SMP) and you can find equivalent tables in subsys/bluetooth/host/smp.c -- pozdrawiam Szymon Janc |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|