Date   

Golioth, the Zephyr-enabled cloud, is generally available and offers a free tier

Jonathan Beri
 

Hello! 

We're excited to announce that Golioth is now generally available and includes a free tier! We believe that Golioth is the easiest way to connect Zephyr-based devices to the cloud and we'd love for the Zephyr community to try it out.

This means anyone can get started with Golioth immediately, for free. Pick from 100s of boards, grab our open source SDK, check out our docs, and sign up at console.golioth.io.

P.S. we're also on Discord, come hang out! https://discord.gg/shmgwqZuqM

~Jonathan Beri, CEO at Golioth


STM32G0B0 unable to enumerate USB device #usb

arve@...
 

Hi!

I'm currently trying to get USB on a STM32G0B0 running. While booting i get the following error on the Linux Workstation:

[  691.189913] usb 1-5.2: new full-speed USB device number 15 using xhci_hcd
[  691.277922] usb 1-5.2: device descriptor read/64, error -32
[  691.469995] usb 1-5.2: device descriptor read/64, error -32
[  691.661146] usb 1-5.2: new full-speed USB device number 16 using xhci_hcd
[  691.737987] usb 1-5.2: device descriptor read/64, error -32
[  691.929996] usb 1-5.2: device descriptor read/64, error -32
[  692.042587] usb 1-5-port2: attempt power cycle
[  692.661884] usb 1-5.2: new full-speed USB device number 17 using xhci_hcd
[  692.662050] usb 1-5.2: Device not responding to setup address.
[  692.870040] usb 1-5.2: Device not responding to setup address.
[  693.077908] usb 1-5.2: device not accepting address 17, error -71
[  693.157913] usb 1-5.2: new full-speed USB device number 18 using xhci_hcd
[  693.158048] usb 1-5.2: Device not responding to setup address.
[  693.366043] usb 1-5.2: Device not responding to setup address.
[  693.573869] usb 1-5.2: device not accepting address 18, error -71
[  693.574633] usb 1-5-port2: unable to enumerate USB device

I use the following dev tree clock config:
/* clock config for external 8 MHz crystal and 48 MHz system clock for USB */

&clk_hse {
    status = "okay";
    clock-frequency = <DT_FREQ_M(8)>;
};


&pll {
    div-m = <1>;
    mul-n = <12>;
    div-p = <2>;
    div-q = <2>;
    div-r = <2>;
    clocks = <&clk_hse>;
    status = "okay";
};

&rcc {
    clocks = <&pll>;
    clock-frequency = <DT_FREQ_M(48)>;
    ahb-prescaler = <1>;
    apb1-prescaler = <1>;
};

/ {
    chosen {
        zephyr,console = &cdc_acm_uart0;
    };
};

with the following app overlay:

&zephyr_udc0 {
    cdc_acm_uart0: cdc_acm_uart0 {
        compatible = "zephyr,cdc-acm-uart";
        label = "CDC_ACM_0";
    };
};

the following def and project configuration is applied:

# Zephyr Kernel Configuration
CONFIG_SOC_SERIES_STM32G0X=y
CONFIG_SOC_STM32G0B0XX=y

# Enable MPU
CONFIG_ARM_MPU=y

# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# Pinmux Driver
CONFIG_PINMUX=y

# GPIO Controller
CONFIG_GPIO=y

# Enable Clocks
CONFIG_CLOCK_CONTROL=y

# 48 MHz system clock (48 MHz is max for USB)
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000


# config peripherals
CONFIG_GPIO=y
CONFIG_SERIAL=y
CONFIG_SPI=n
CONFIG_I2C=n

# configs for USB console
# CONFIG_USB=y
CONFIG_USB_DEVICE_DRIVER=y
CONFIG_USB_DC_STM32=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="#arve USB console"
CONFIG_USB_CDC_ACM=y
CONFIG_USB_UART_CONSOLE=y
CONFIG_USB_CDC_ACM_LOG_LEVEL_ERR=y

CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
#CONFIG_UART_CONSOLE_ON_DEV_NAME="CDC_ACM"


CONFIG_USB_COMPOSITE_DEVICE=n
CONFIG_USB_MASS_STORAGE=n


# config logging
CONFIG_LOG=y
CONFIG_PRINTK=y
CONFIG_LOG_PRINTK=y
CONFIG_LOG_BUFFER_SIZE=2048


The application is a simple blinky with usb console which works perfectly on an STM32H743vi.
The STM32G0B0 is on a custom boad which seems to work perfectly with internal and external clock.

Many thanks for your help in advance!
BR
Thomas


I2c_api #i2c

Makavaz
 

Please help. I cannot get the I2c-api in the folder "tests/drivers" to work.
When I compile it tells me the error: #error "Please set the correct I2C device".
I am using the nrf52840dk_nrf52840

What configuration value should I change to allow the i2c driver to work on this device.


Zephyr SDK 0.13.2 Release

Stephanos Ioannidis
 

Hi,

 

Zephyr SDK 0.13.2 has been released.

 

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

 

This release contains several bug fixes and enhancements:

 

  • gcc:
    • Added multilibs for the RISC-V RV32E targets.
    • Disabled MIPS GP register optimisation, which is not supported by the
      Zephyr MIPS architecture port.
  • newlib:
    • Enabled C99 format specifier support for newlib full variant.
  • qemu:
    • Added MIPS little endian emulation
    • Update xilinx qemu to 5.1.0
    • Added Xilinx MicroBlaze little endian emulation
  • openocd:
    • Fixed missing DBG clock on STM32G0/L0.
    • Fixed image verification for ARC.

 

Please try it out and report if you find any issues.

 

Thanks to everyone who contributed to this SDK release.

 

Regards,

 

Stephanos

 


Hawkbit sample functionality #networking #mcuboot #mcumgr

Brenton Chetty
 

Hi, I am trying to learn how to perform an OTA update for my nrf5340dk. I was initially planning to use the "big_http_download" sample to download the update file, and then flash that image into slot1 using MCUBoot and MCUMgr flash commands. I managed to get the NRF5340dk to download the update file by integrating the "gsm_modem" sample with my Ublox Lara-R211 modem.

But then I came across the hawkbit sample, however I am not sure how to use it.
I changed the "CONFIG_HAWKBIT_SERVER" variable in the prj.conf to match my online hawkbit server's address
And I changed the "config HAWKBIT_PORT" variable from the Kconfig file in "zephyr/subsys/mgmt/hawkbit" to match my port for the server

But for some reason I cannot connect to my online kapua server (the hawkbit server is hosted online and not local). Does anyone have any suggestions on any possible steps I could have missed?
My board has internet connectivity.

Regards
Brenton


Re: Zephyr escaping its virtual environment

Jason Bens
 

Hey Marti, thanks for the advice.

In this case specifically, I tracked it down to a pretty silly mistake. I was using the nRF extension for VS Code, but also had the CMake extension installed. I had been hitting the CMake extension's build button, not the nRF extension's, without realizing it was bypassing west. So, an easy enough fix once I realized it.

- Jason

-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@...>
Sent: Friday, November 12, 2021 6:53 PM
To: Jason Bens <Jason.Bens@...>; users@...
Subject: RE: [Zephyr-users] Zephyr escaping its virtual environment

External Email:

Hi,

It's hard to diagnose issues like this remotely, and especially with so few details.

If you are looking for general advice:

- check your PATH for where west is installed
- check things like 'py -3 -m pip freeze' inside and outside
your virtual environment to check what is installed where
- uninstall any pythons on your system, making sure you do not have
'west' on your PATH, then reinstalling them

Using Zephyr with a python virtual environment is supported, does work, and is my strong personal recommendation. Unfortunately, if you have been inconsistent about using venvs, it can leave your system in a mixed state that you will need to untangle.

I have been pushing for virtual environments to be the default recommendation in the getting started guide for years, but other maintainers have disagreed with me, and it hasn't happened. Sorry for any inconvenience.

Marti

On Fri, Nov 12 2021, Jason Bens wrote:
Hey Marti,

As far as I can tell, I don't have west currently installed outside of the virtual environment. This project I'm trying to get going predates a tonne of build environment issues I've been fixing for the past couple weeks, though. When I first started, there was no venv, and python was on the normal windows path. Could it be that the original path has been stored somewhere and survived the purge?

Jason


-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@...>
Sent: Thursday, November 11, 2021 6:40 PM
To: Jason Bens <Jason.Bens@...>; users@...
Subject: Re: [Zephyr-users] Zephyr escaping its virtual environment

External Email:

Hi, I use zephyr exclusively within virtual environments.

Did you install west outside of the venv? If you build with west, Zephyr tries to use the same python from the build system that you used for running west.

On Thu, Nov 11 2021, Jason Bens via lists zephyrproject org wrote:
Hi.

I’m trying to build zephyr inside a python virtual environment. It looks like it’s somehow pulling in the base python interpreter, rather than the fake one provided in the virtual environment. This manifests as zephyr\scripts\dts\python-devicetree\src\devicetree\edtlib.py failing to import yaml (my base python environment is pretty barebones). It looks like the python path is picked up in python.cmake:

foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")
find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})
if(PYTHON_PREFER_EXECUTABLE) <…snip>

I haven’t defined PYTHON_PREFER or WEST_PYTHON, and don’t see any documentation suggesting I ought to. I don’t fully understand how find_program is finding the executable, but had assumed it would check my path at some point. I’ve confirmed that .venv\Scripts is the first entry in my path. `where python´ from my virtual environment returns the following:

C:\Users\<name>\Projects\<project_name>\.venv\Scripts\python.exe
C:\Users\<name>\AppData\Local\Programs\Python\Python39\python.exe

I’m working with version 2.6.99. Before I file it as an issue, is this something that is fixed in 2.7.99? Is there some known configuration stuff I’m failing to do?

Thanks,


* Jason



Re: Zephyr for ARM A53

Manivannan Sadhasivam <mani@...>
 

On Fri, Nov 12, 2021 at 11:29:52AM +0000, Sandeep Kulkarni via lists.zephyrproject.org wrote:
Hello all,

This is Sandeep from Maxlinear Technologies.

We are building a solution using ARM A53 - Wherein we plan to run RTOS on a couple of cores for time critical functions and we also need openAMP support.
Currently we are exploring the options - FreeRTOS, Zephyr, Threadx etc

Zephyr seems to support most of what we need in-terms of features/functionality, but I don't find much information for Zephyr with A53 on web, only thing I see is the QEMU support.
So need your guidance on this topic.
Zephyr has support for multiple ARMv8 based SoCs/boards. Take a look at:
https://github.com/zephyrproject-rtos/zephyr/tree/main/soc/arm64
https://github.com/zephyrproject-rtos/zephyr/tree/main/boards/arm64

There is also an ongoing PR to support NXP IMX8M SoC that has ARM Cortex A53.

* Has anyone tried Zephyr on A53 hardware ? Rpi or any other platforms?
* Is this stable?
Support for ARM64 is still new compared to ARM32 in Zephyr but if you find
something is missing or broken, let us know :)

* How is the community support for this?
There is some interest but it is still picking up pace.

* OpenAMP b/n Zephyr and Zephyr on A53
This one works pretty well and I've tested it on STM32MP platform.

* OpenAMP b/n Linux and Zephyr on A53
This should also work but I haven't tested personally.

Thanks,
Mani



Thanks,
Sandeep







#customboard Linker Error with Custom Board #customboard

mbarrett@...
 

I copied the board files from mimxrt1050_evk, and renamed them to my own board, basically just changing the names. When I do I get the following linker error:
/opt/toolchains/zephyr-sdk-0.13.1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(soc_rt10xx.c.obj):(.boot_hdr.ivt+0xc): undefined reference to `dcd_data'

The Kconfig.board file looks as follows (where I changed the first two lines)
config BOARD_MIMXRT1050_ODB
bool "MIMXRT1050-ODB"
depends on SOC_SERIES_IMX_RT
select SOC_PART_NUMBER_MIMXRT1052DVL6A

I keep looking at all fields I've changed but can't find any issue. Any guidance on how to troubleshoot this?

Thanks!


Re: Zephyr escaping its virtual environment

Bolivar, Marti
 

Hi,

It's hard to diagnose issues like this remotely, and especially with so
few details.

If you are looking for general advice:

- check your PATH for where west is installed
- check things like 'py -3 -m pip freeze' inside and outside
your virtual environment to check what is installed where
- uninstall any pythons on your system, making sure you do not have
'west' on your PATH, then reinstalling them

Using Zephyr with a python virtual environment is supported, does work,
and is my strong personal recommendation. Unfortunately, if you have
been inconsistent about using venvs, it can leave your system in a mixed
state that you will need to untangle.

I have been pushing for virtual environments to be the default
recommendation in the getting started guide for years, but other
maintainers have disagreed with me, and it hasn't happened. Sorry for
any inconvenience.

Marti

On Fri, Nov 12 2021, Jason Bens wrote:
Hey Marti,

As far as I can tell, I don't have west currently installed outside of the virtual environment. This project I'm trying to get going predates a tonne of build environment issues I've been fixing for the past couple weeks, though. When I first started, there was no venv, and python was on the normal windows path. Could it be that the original path has been stored somewhere and survived the purge?

Jason


-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@...>
Sent: Thursday, November 11, 2021 6:40 PM
To: Jason Bens <Jason.Bens@...>; users@...
Subject: Re: [Zephyr-users] Zephyr escaping its virtual environment

External Email:

Hi, I use zephyr exclusively within virtual environments.

Did you install west outside of the venv? If you build with west, Zephyr tries to use the same python from the build system that you used for running west.

On Thu, Nov 11 2021, Jason Bens via lists zephyrproject org wrote:
Hi.

I’m trying to build zephyr inside a python virtual environment. It looks like it’s somehow pulling in the base python interpreter, rather than the fake one provided in the virtual environment. This manifests as zephyr\scripts\dts\python-devicetree\src\devicetree\edtlib.py failing to import yaml (my base python environment is pretty barebones). It looks like the python path is picked up in python.cmake:

foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")
find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})
if(PYTHON_PREFER_EXECUTABLE) <…snip>

I haven’t defined PYTHON_PREFER or WEST_PYTHON, and don’t see any documentation suggesting I ought to. I don’t fully understand how find_program is finding the executable, but had assumed it would check my path at some point. I’ve confirmed that .venv\Scripts is the first entry in my path. `where python´ from my virtual environment returns the following:

C:\Users\<name>\Projects\<project_name>\.venv\Scripts\python.exe
C:\Users\<name>\AppData\Local\Programs\Python\Python39\python.exe

I’m working with version 2.6.99. Before I file it as an issue, is this something that is fixed in 2.7.99? Is there some known configuration stuff I’m failing to do?

Thanks,


* Jason



Zephyr for ARM A53

Sandeep Kulkarni <skulkarni@...>
 

Hello all,

 

This is Sandeep from Maxlinear Technologies.

 

We are building a solution using ARM A53 – Wherein we plan to run RTOS on a couple of cores for time critical functions and we also need openAMP support.

Currently we are exploring the options – FreeRTOS, Zephyr, Threadx etc

 

Zephyr seems to support most of what we need in-terms of features/functionality, but I don’t find much information for Zephyr with A53 on web, only thing I see is the QEMU support.

So need your guidance on this topic.

  • Has anyone tried Zephyr on A53 hardware ? Rpi or any other platforms?
    • Is this stable?
    • How is the community support for this?
  • OpenAMP b/n Zephyr and Zephyr on A53
  • OpenAMP b/n Linux and Zephyr on A53

 

 

Thanks,
Sandeep

 

 


Re: Zephyr escaping its virtual environment

Jason Bens
 

Hey Marti,

As far as I can tell, I don't have west currently installed outside of the virtual environment. This project I'm trying to get going predates a tonne of build environment issues I've been fixing for the past couple weeks, though. When I first started, there was no venv, and python was on the normal windows path. Could it be that the original path has been stored somewhere and survived the purge?

Jason

-----Original Message-----
From: Bolivar, Marti <Marti.Bolivar@...>
Sent: Thursday, November 11, 2021 6:40 PM
To: Jason Bens <Jason.Bens@...>; users@...
Subject: Re: [Zephyr-users] Zephyr escaping its virtual environment

External Email:

Hi, I use zephyr exclusively within virtual environments.

Did you install west outside of the venv? If you build with west, Zephyr tries to use the same python from the build system that you used for running west.

On Thu, Nov 11 2021, Jason Bens via lists zephyrproject org wrote:
Hi.

I’m trying to build zephyr inside a python virtual environment. It looks like it’s somehow pulling in the base python interpreter, rather than the fake one provided in the virtual environment. This manifests as zephyr\scripts\dts\python-devicetree\src\devicetree\edtlib.py failing to import yaml (my base python environment is pretty barebones). It looks like the python path is picked up in python.cmake:

foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")
find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})
if(PYTHON_PREFER_EXECUTABLE) <…snip>

I haven’t defined PYTHON_PREFER or WEST_PYTHON, and don’t see any documentation suggesting I ought to. I don’t fully understand how find_program is finding the executable, but had assumed it would check my path at some point. I’ve confirmed that .venv\Scripts is the first entry in my path. `where python´ from my virtual environment returns the following:

C:\Users\<name>\Projects\<project_name>\.venv\Scripts\python.exe
C:\Users\<name>\AppData\Local\Programs\Python\Python39\python.exe

I’m working with version 2.6.99. Before I file it as an issue, is this something that is fixed in 2.7.99? Is there some known configuration stuff I’m failing to do?

Thanks,


* Jason



Re: Zephyr escaping its virtual environment

Bolivar, Marti
 

Hi, I use zephyr exclusively within virtual environments.

Did you install west outside of the venv? If you build with west, Zephyr
tries to use the same python from the build system that you used for
running west.

On Thu, Nov 11 2021, Jason Bens via lists zephyrproject org wrote:
Hi.

I’m trying to build zephyr inside a python virtual environment. It looks like it’s somehow pulling in the base python interpreter, rather than the fake one provided in the virtual environment. This manifests as zephyr\scripts\dts\python-devicetree\src\devicetree\edtlib.py failing to import yaml (my base python environment is pretty barebones). It looks like the python path is picked up in python.cmake:

foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")
find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})
if(PYTHON_PREFER_EXECUTABLE) <…snip>

I haven’t defined PYTHON_PREFER or WEST_PYTHON, and don’t see any documentation suggesting I ought to. I don’t fully understand how find_program is finding the executable, but had assumed it would check my path at some point. I’ve confirmed that .venv\Scripts is the first entry in my path. `where python´ from my virtual environment returns the following:

C:\Users\<name>\Projects\<project_name>\.venv\Scripts\python.exe
C:\Users\<name>\AppData\Local\Programs\Python\Python39\python.exe

I’m working with version 2.6.99. Before I file it as an issue, is this something that is fixed in 2.7.99? Is there some known configuration stuff I’m failing to do?

Thanks,


* Jason



Zephyr escaping its virtual environment

Jason Bens
 

Hi.

 

I’m trying to build zephyr inside a python virtual environment.  It looks like it’s somehow pulling in the base python interpreter, rather than the fake one provided in the virtual environment.  This manifests as zephyr\scripts\dts\python-devicetree\src\devicetree\edtlib.py failing to import yaml (my base python environment is pretty barebones).  It looks like the python path is picked up in python.cmake:

 

foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")

  find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})

  if(PYTHON_PREFER_EXECUTABLE) <…snip>

 

I haven’t defined PYTHON_PREFER or WEST_PYTHON, and don’t see any documentation suggesting I ought to.  I don’t fully understand how find_program is finding the executable, but had assumed it would check my path at some point.  I’ve confirmed that .venv\Scripts is the first entry in my path.  `where python´ from my virtual environment returns the following:

 

C:\Users\<name>\Projects\<project_name>\.venv\Scripts\python.exe

C:\Users\<name>\AppData\Local\Programs\Python\Python39\python.exe

 

I’m working with version 2.6.99.  Before I file it as an issue, is this something that is fixed in 2.7.99?  Is there some known configuration stuff I’m failing to do?

 

Thanks,

 

  • Jason


Re: Easy way to setup Zephyr in VSCode?

Jonathan Beri
 

There are options! I'd recommend this discussion as a starting point. There are 3 solutions I know of:
  1. Nordic has their nRF Connect extension that works very well with Nordic-based boards, and can even be used with non-Nordic boards with a bit of effort.
  2. A project from Victor called Zephyrus looks promising.
  3. PlatformIO has support for many boards.
Hope that helps!


Easy way to setup Zephyr in VSCode?

markus.prager@...
 

Hi, I am trying to find a way to build my projects in VSCode. So far I have been manually building in my terminal using west.
Is there an easy way to change that and start building out of VSCode directly? I might have to add that I am working on a custom board, so I don't think something like platformio is a good solution for me. Any directions are very welcome, and thanks in advance for any tips!

kind regards,
Markus


Re: big_http_download sample localhost download

Lubos, Robert
 

Hi Brenton,

 

I don’t have exact answers for the issue you report, but some observations from my side, while I tried to find the root cause for the problem. The core reason http client disconnects is that we set the RX timeout on a socket (see the setsockopt calls). If you remove the timeout from a socket you’ll notice the connection remains, however the communication is extremely slow.

 

Now as for the reason of the sluggishness of the data transfer, I’ve noticed the following:

  1. The packets received by the e1000 driver tend to appear out of order, compared to what’s visible on wireshark (the server usually sends two packets at once after receiving ack)– this actually is not a big deal as Zephyr’s TCP implementation takes care of that,
  2. e1000 sometimes does not receive a packet, if a few of them were sent in a bulk – no RX irq is received at all for the lost packet. This also shouldn’t be a big deal, as retransmission at TCP level should kick in then. I’ve noticed however that the python HTTP server you use has some bizarre TCP retransmission delays (as if the delay was duplicated on each retransmission). This eventually leads to a timeout on a socket (if enabled).

 

Now, I’m not sure what is the reason that not all packets reach the e1000 driver. It could be something with RX IRQ handling, or it could be a qemu issue not handling heavy traffic well. Perhaps someone more familiar with this device or qemu emulation could elaborate on the problem.

 

Regards,

Robert

 

From: Brenton Chetty <brent7984@...>
Sent: środa, 3 listopada 2021 19:10
To: Lubos, Robert <Robert.Lubos@...>
Cc: users@...
Subject: Re: [Zephyr-users] big_http_download sample localhost download

 

Hi Robert

 

Thank you for your assistance. I managed to get qemu to begin downloading a file on localhost.

However, the file downloads up to a maximum of 2680 bytes, then it fails, and restarts the download.

 

Do you have any suggestions on why this only happens when downloading on localhost?

 

Regards

Brenton

 

On Wed, Nov 3, 2021 at 2:45 PM Lubos, Robert <Robert.Lubos@...> wrote:

Hi Brenton,

 

The DNS server configuration shouldn’t be an issue in this case, as we provide the IP address of the server – in such case the DNS query isn’t even sent as we already know the IP address.

 

I’ve reproduced the problem locally, and it turned out there was a problem with ARP retransmission handling, wrong source address was selected for the retransmission, I’ve posted a PR with a fix proposal:

https://github.com/zephyrproject-rtos/zephyr/pull/40038

 

Another thing is that the reason for the ARP retransmission even being sent  is the fact that e1000 driver does not process any incoming packets early after boot (for about 1 second). I have to little knowledge the particular device/driver to figure out why is this happening, but I’ve asked the question in the aforementioned PR, perhaps we’ll get some answers there.

 

Regards,

Robert

 

From: users@... <users@...> On Behalf Of Brenton Chetty via lists.zephyrproject.org
Sent: wtorek, 2 listopada 2021 20:11
To: users@...
Subject: [Zephyr-users] 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: Setting MAC address at boot? #stm32

Anders
 

Hi again Jukka,

Thank you! Setting of MAC works fine now.

The CONFIG_NET_L2_ETHERNET_MGMT parameter did the trick!

/Anders


Re: Setting MAC address at boot? #stm32

Jukka Rissanen
 

Try to add also these two settings

CONFIG_NET_MGMT_EVENT=y
CONFIG_NET_L2_ETHERNET_MGMT=y


Jukka

On Thu, 2021-11-04 at 04:41 -0700, Anders wrote:
Thanks for helping me figure this out!

I have tried to use the proposed, proper way of doing this using:

net_mgmt(NET_REQUEST_ETHERNET_SET_MAC_ADDRESS, iface,
                       &params, sizeof(struct ethernet_req_params));

Unfortunately the build will fail due to: undefined reference to
`net_mgmt_NET_REQUEST_ETHERNET_SET_MAC_ADDRESS' when trying to use
it.

I have added CONFIG_NET_MGMT=y to prj.conf.

Do I have to add more or could it be that my platform (nucleo_f767zi)
lacks support for this feature?

/Anders





Re: Setting MAC address at boot? #stm32

Anders
 

Thanks for helping me figure this out!

I have tried to use the proposed, proper way of doing this using:

net_mgmt(NET_REQUEST_ETHERNET_SET_MAC_ADDRESS, iface,
&params, sizeof(struct ethernet_req_params));

Unfortunately the build will fail due to: undefined reference to `net_mgmt_NET_REQUEST_ETHERNET_SET_MAC_ADDRESS' when trying to use it.

I have added CONFIG_NET_MGMT=y to prj.conf.

Do I have to add more or could it be that my platform (nucleo_f767zi) lacks support for this feature?

/Anders


Re: Setting MAC address at boot? #stm32

Jukka Rissanen
 

Hi Anders,

there is also some info about MAC address setting in
https://github.com/zephyrproject-rtos/zephyr/discussions/39252

Note that if you are setting the MAC address from application, then
calling the net_if_set_link_addr() from app is not a proper way.

The MAC address is Ethernet concept, so we used the "link address" here
in order to use the same function in other network technologies.


Jukka

On Thu, 2021-10-28 at 23:39 -0700, Anders wrote:
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()?




261 - 280 of 3031