big_http_download sample localhost download
Hello,
I am attempting to download a file hosted on a localhost file server. - I am hosting a file named "Zephyr" using "python3 -m http.server 8980" - I am using a zeth interface and the "overlay-e1000.conf" to allow qemu to communicate with localhost. I successfully tested the LWM2M client example to ensure the connection was good. - I can download the Zephyr file when I input "http://192.0.2.2:8980/zephyr" into a web browser. - I attempted using the "overlay-ci.conf" file to perform the download. CONFIG_SAMPLE_BIG_HTTP_DL_URL="http://192.0.2.2:8980/zephyr" however I get the following error: Preparing HTTP GET request for http://192.0.2.2:8980/zephyr addrinfo @0x6da008: ai_family=1, ai_socktype=1, ai_protocol=6, sa_family=1, sin_port=1423 Iteration 1 of 1: sock = 0 [00:00:00.000,000] <inf> net_config: Initializing network [00:00:00.000,000] <inf> net_config: IPv4 address: 192.0.2.1 [00:00:00.000,000] <inf> net_config: Running dhcpv4 client... Error: connect(sock, ai->ai_addr, ai->ai_addrlen) exit I managed to get the example to download the online vmlinuz file, however I cannot get the sample to download via localhost. Do you have any suggestions on what steps I could have missed? Could it be a DNS issue? for downloading the online vmlinuz file I used 8.8.8.8 as CONFIG_DNS_SERVER1. For localhost, I left it at 192.0.2.2 With thanks Brenton
|
|
Re: Timer with fixed interrupt period
Henrik Brix Andersen
Hi,
toggle quoted messageShow quoted text
The counter API provides exactly that: https://docs.zephyrproject.org/latest/reference/peripherals/counter.html Brgds, Brix -- Henrik Brix Andersen
On 31 Oct 2021, at 20.46, Arsenii Soitu <seniasoitu@...> wrote:
|
|
Timer with fixed interrupt period
Arsenii Soitu
Hello. I use stm32f429 and Zephyr Os 2.7.0
Is there any API for timers with fixed interrupt period? I need to change PWM duty cycle exactly every 1000 us. In bare-metal I would have used general purpose timer with fixed interrupt period, and changed duty cycle in interrupt handler But how should I manage with such task under Zephyr Os? Thank you
|
|
USB OTG?
Dave Nadler
Does Zephyr support USB host mode and also USB-OTG? -- Dave Nadler, USA East Coast voice (978) 263-0097, drn@..., Skype Dave.Nadler1
|
|
stm32: PWM: "st,prescaler" pwm property moved to timers node
Alexandre BOURDIOL <alexandre.bourdiol@...>
Hi all,
I'd like to inform STM32 PWM users that I'm pushing a change [1] to move Device Tree property "st,prescaler" from pwm node to timers node. Benefit is that it reflect hardware reality, and prescaler is usable by other drivers based on timers (like counter with ongoing PR #39414)
This change will be hopefully integrated in the next Zephyr DV. Note that I temporarily avoid compatibility break: if "st,prescaler" is defined in PWM node, it will be the value used by PWM driver.
[1] https://github.com/zephyrproject-rtos/zephyr/pull/39628
Regards, Alexandre Bourdiol
|
|
Re: Setting MAC address at boot?
#stm32
Anders
Update! Problem solved. The function net_if_set_link_addr() sets the MAC address.
Why isn't the function named net_if_set_mac_addr()?
|
|
Re: MCUboot - Signing image for slot 1
#mcuboot
Adam Podogrocki
Hi Brenton, The only images you should flash are MCUboot and an image that goes to Slot#0. Any further operations should be conducted with the mcumgr tool. At least I used to do that. This tool gives you options to upload the new image (the first uploaded image should obviously be the one dedicated to slot#1), list already uploaded images, to check which slot is the current one, to boot from specified slot in test mode and finally to confirm, that the currently run image should become the active one. This tool performs swapping of images, so this is why you should also have a scratch_partition in your layout, e.g. partitions { boot_partition {}; slot0_partition {}; slot1_partition {}; scratch_partition {}; data_partition{}; // remaining space for application data purposes, optional }; When the image is confirmed, then swapping takes place and always the image from slot#0 is booted. At the time I used that tool UART and Bluetooth protocol were available. Cheers, Adam
On Thu, 28 Oct 2021 at 08:57, Brenton Chetty <brent7984@...> wrote:
|
|
Re: MCUboot - Signing image for slot 1
#mcuboot
Hi Adam Thank you for your reply. Sorry for the late response, as I have been getting sporadic results, i.e. sometimes the image upgrade works and most of the time it doesn't. I have been using the following commands to sign and flash the image: rm -r build && west build -p auto -b nrf52840dk_nrf52840 samples/zephyr/hello-world/ -DCONFIG_BOOTLOADER_MCUBOOT=y -DDTC_OVERLAY_FILE="boards/nrf52840dk_nrf52840.overlay" west sign -t imgtool -- --key ~/zephyrproject/bootloader/mcuboot/root-rsa-2048.pem --header-size 0x200 --align 8 --version 3.0.2+1 --slot-size 0x67000 --pad && west flash --skip-rebuild -- --hex-file build/zephyr/zephyr.signed.hex where the overlay file contains: / { chosen { zephyr,code-partition = &slot1_partition; }; }; I used --pad for both slots. I've noticed that sometimes when I flash to slot 1, sometimes the primary image swap_type=0x2 (test) and sometimes it's 0x4 (revert). I have confirmed that I am flashing my slot0 and slot1 images to the correct addresses (with padding). I am not sure if the Version number plays a role in my error. Do you have any suggestions on the top of your mind as to why I am getting sporadic results with the firmware upgrades? With thanks Brenton
On Tue, Oct 26, 2021 at 6:54 PM Adam Podogrocki <a.podogrocki@...> wrote:
|
|
Re: MCUboot - Signing image for slot 1
#mcuboot
Adam Podogrocki
Hi Brenton, please try similar command: imgtool.py sign --key root-rsa-2048.pem --header-size 0x200 --align 8 --version <YOUR_VERSION> --slot-size <YOUR_SLOT_SIZE_IN_HEX> ZEPHYR_BIN_FILE NAME_OF_THE_SIGNED_FILE Cheers, Adam
On Mon, 25 Oct 2021 at 13:40, Brenton Chetty <brent7984@...> wrote: 1. Hi, how do I go about signing an image for slot1 usage.
|
|
Re: MCUboot - Signing image for slot 1
#mcuboot
Martin Kozusky
Hi,
why do you want to compile it with
offset of slot1? Normaly you compile image for slot0, upload it to
slot1 and MCUboot will swap them after reboot.
Martin
Dne 25.10.2021 v 13:40 Brenton Chetty
napsal(a):
1. Hi, how do I go about signing an image for slot1 usage.
|
|
Setting MAC address at boot?
#stm32
Anders
Hi,
I'm new to Zephyr and is struggling with how to configure the MAC address for the ethernet interface on an STM32F767 based platform at boot. I have searched the internet and the Zephyr documentation for guidance but have not found anything useful. I have managed to set the MAC address at boot by modifying the function eth_initialize in eth_stm32_hal.c but there must be another way of doing this then modifying the driver or? Regards, Anders
|
|
MCUboot - Signing image for slot 1
#mcuboot
1. Hi, how do I go about signing an image for slot1 usage.
I used the following command for flashing into slot0 successfully: west sign -t imgtool -- --key ~/zephyrproject/bootloader/mcuboot/root-rsa-2048.pem && west flash --skip-rebuild -- --hex-file build/zephyr/zephyr.signed.hex I adjusted my nrf52840dk_nrf52840 config as follows to flash into slot1: chosen { zephyr,code-partition = &slot1_partition; }; however when signing the image after this change, the offsets remain the same as it should be for slot 0 === image configuration: partition offset: 49152 (0xc000) (slot 1 should start at 0x73000) partition size: 421888 (0x67000) rom start offset: 512 (0x200) 2. Is there any tutorials online for MCUboot usage on Zephyr? I am attempting to get OTA firmware upgrade on my dev kit and I am not sure about the basic commands (Config Variables) to utilize mcuboot on zephyr. Regards Brenton
|
|
Re: MCUboot "Image in the primary slot is not valid"
#mcuboot
Martin Kozusky
Hi,
may be you forgot to sign the image?
west sign -t imgtool -- --key
path_to_mcuboot\root-rsa-2048.pem (or other key that mcuboot is
using)
west flash --skip-rebuild -- --hex-file build/zephyr/zephyr.signed.hex Martin
Dne 21.10.2021 v 14:17 Brenton Chetty
napsal(a):
Hi there
|
|
Re: PlatformIO for flashing zephyr code on ESP 32
Komal Rajput-Hajare <komal.hajare5@...>
Thank you so much.
On Thu, Oct 21, 2021, 2:09 PM Raúl Sánchez Siles <rsanchezs@...> wrote:
|
|
MCUboot "Image in the primary slot is not valid"
#mcuboot
Hi there
I am having issues getting started with MCUboot. I flashed MCUboot version 1.8-dev onto my "nrf52840dk_nrf52840" and "nrf5340dk_nrf5340_cpuapp". I then flashed the hello_world sample to my boards. I added "CONFIG_BOOTLOADER_MCUBOOT=y" to the hello_world sample in prj.conf. I am using Zephyr 2.6. Is there some configuration that I am missing? *** Booting Zephyr OS build zephyr-v2.6.0-495-gf5b0f92bb718 *** I: Starting bootloader I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Boot source: none W: Failed reading image headers; Image=0 E: Image in the primary slot is not valid! E: Unable to find bootable image Any advice would be appreciated Regards Brenton
|
|
Re: PlatformIO for flashing zephyr code on ESP 32
Raúl Sánchez Siles
Hi Komal: Although I haven't used PlatformIO with Zephyr myself I know there is a documentation section about it: https://docs.zephyrproject.org/latest/guides/platformio/index.html HTH,
El jueves, 21 de octubre de 2021 4:35:26 (CEST) Komal Rajput-Hajare via lists.zephyrproject.org escribió:
Hello
I don't have idea about this error because I haven't try west tool on Ubuntu. Sorry for this. I am trying to flash the code( hello world) on esp32 using PlatformIO IDE on windows. Zephyr Version is 2.7.99. With the help of west tool on windows my team member successfully flash code on esp32. And platformIO even doesn't contain package of zephyr. what is the way to solve this problem. Kindly suggest any solution. Thank you and regards Komal On Wed, Oct 20, 2021, 3:47 PM Komal Rajput-Hajare <komal.hajare5@...> wrote:
Hello Zephyr foundation Currently I am working on ESP32 and zephyr RTOS. But using PlatformIO IDE. My client want zephyr RTOS on ESP32 but only via platform IO. I got sucess using west tool. But not by PlatformIO ide. I didn't found any support from zephyr for PlatformIO specially for esp32. Do any one have idea about it? how can I do that? Can you please help me in this. Thank you and Regards Komal Hajare AVISO LEGAL: Este mensaje y sus archivos adjuntos van dirigidos exclusivamente a su destinatario, pudiendo contener información confidencial sometida a secreto profesional. No está permitida su comunicación, reproducción o distribución sin autorización expresa. Si usted no es el destinatario final, por favor elimínelo e infórmenos por esta vía. PROTECCIÓN DE DATOS: De conformidad con lo dispuesto en la normativa de protección de datos personales, Reglamento (UE) 2016/679, le informamos que los datos personales y dirección de correo electrónico, serán tratados por K-LAGAN GROUP, S.L. y empresas del grupo con la finalidad de gestionar nuestra agenda de contactos, atender sus solicitudes por vía electrónica, así como a efectos históricos. Los datos se tratarán en base a su consentimiento, ejecución de un contrato, o el cumplimiento de obligaciones legales y los intereses legítimos de K-LAGAN GROUP, S.L y empresas del grupo. El plazo de conservación de los datos será el establecido en la normativa aplicable, como mínimo. Puede contactar con el responsable, así como ejercer los derechos de acceso, rectificación, supresión, portabilidad de datos, limitación, oposición y revocación del consentimiento en TRAVESERA DE GRACIA, 73 - 79 7ª PLANTA, 08006, BARCELONA, BARCELONA. Tienen derecho a realizar una reclamación ante las autoridades de protección de datos. Para más información consulte la política de privacidad en www.k-lagan.com -- Raúl Sánchez Siles SW Engineer K-LAGAN EID
|
|
Re: PlatformIO for flashing zephyr code on ESP 32
Komal Rajput-Hajare <komal.hajare5@...>
Hello I don't have idea about this error because I haven't try west tool on Ubuntu. Sorry for this. I am trying to flash the code( hello world) on esp32 using PlatformIO IDE on windows. Zephyr Version is 2.7.99. With the help of west tool on windows my team member successfully flash code on esp32. And platformIO even doesn't contain package of zephyr. what is the way to solve this problem. Kindly suggest any solution. Thank you and regards Komal
On Wed, Oct 20, 2021, 3:47 PM Komal Rajput-Hajare <komal.hajare5@...> wrote:
|
|
PlatformIO for flashing zephyr code on ESP 32
Komal Rajput-Hajare <komal.hajare5@...>
Hello Zephyr foundation Currently I am working on ESP32 and zephyr RTOS. But using PlatformIO IDE. My client want zephyr RTOS on ESP32 but only via platform IO. I got sucess using west tool. But not by PlatformIO ide. I didn't found any support from zephyr for PlatformIO specially for esp32. Do any one have idea about it? how can I do that? Can you please help me in this. Thank you and Regards Komal Hajare
|
|
Share variables between threads
Michael Federer
Hi all, is it possible to have some sort of global variables in Zephyr which can be shared between several threads? If yes, how can I create and access them? Thanks for your help. Cheers, Mike
|
|
Re: Two websocket connections at the same time
Michael Federer
Hi Robert, thanks a lot for your answer! Increasing CONFIG_WEBSOCKET_MAX_CONTEXTS to 2 solved it:) Cheers, Mike
|
|