Date   

Re: Multiple Instances of Drivers

Tomasz Bursztyka
 

Hi,

There is already an on-going work on how devices (aka driver instance)
are generated.

See issue:
https://github.com/zephyrproject-rtos/zephyr/issues/6293

Especially, check for b0661 and erwango PRs

Br,


Tomasz

I have a question about the current plan to allow multiple instances
of a driver.

For example, say we have two sx1509b devices as opposed to the
currently supported single instance:
&i2c0 {
status = "ok";
clock-frequency = <I2C_BITRATE_FAST>;

sx1509b: sx1509b@3e {
compatible = "semtech,sx1509b";
reg = <0x3e>;
label = "GPIO_P0";
};

sx1509b: sx1509b@3f {
compatible = "semtech,sx1509b";
reg = <0x3f>;
label = "GPIO_P1";
};
};

Only the one one whose .fixup defines CONFIG_GPIO_SX1509B_* gets an
instance, while the other doesn't. To add two devices, I would have
to
hack the driver + fixup to define the correct configuration
information.

I just want to know the current plan to address this and how drivers
need to be written going forward. I couldn't find an issue that
address this, but I could easily have missed it and am just "looking
in the other pocket for my keys".

- Pushpal



Multiple Instances of Drivers

Pushpal Sidhu
 

I have a question about the current plan to allow multiple instances
of a driver.

For example, say we have two sx1509b devices as opposed to the
currently supported single instance:
&i2c0 {
status = "ok";
clock-frequency = <I2C_BITRATE_FAST>;

sx1509b: sx1509b@3e {
compatible = "semtech,sx1509b";
reg = <0x3e>;
label = "GPIO_P0";
};

sx1509b: sx1509b@3f {
compatible = "semtech,sx1509b";
reg = <0x3f>;
label = "GPIO_P1";
};
};

Only the one one whose .fixup defines CONFIG_GPIO_SX1509B_* gets an
instance, while the other doesn't. To add two devices, I would have to
hack the driver + fixup to define the correct configuration
information.

I just want to know the current plan to address this and how drivers
need to be written going forward. I couldn't find an issue that
address this, but I could easily have missed it and am just "looking
in the other pocket for my keys".

- Pushpal


Storing data in flash at powerfail on nrf51/nrf52

laczenJMS
 

For bluetooth mesh it would be good to save the replay protection list
to a dedicated flash page. This save would only be done in the case of
a powerfail or a reboot.

nrf51/nrf52 have a powerfail warning but it is unclear to me how to
use it. I know that if the powerfail warning appears writes to flash
are disabled. So to make it work I would:

a. set the powerfail at a rather high voltage level -> how to do that ?
b. if the powerfail is triggered, disable it, clear it, set it at a
lower voltage level, and then do the writing to flash.

Are there any examples on how to use the powerfail mechanism on nrf51/nrf52 ?

Kind regards,

Jehudi


echo_client and echo_server run in the same board

Diana Rivera
 

Hello,

I am currently trying to run an nrf52 board as both client and server at the same time (based on echo_client and echo_server samples). I've gone through their configuration files, and have found that CONFIG_NET_APP_CLIENT=y is enabled in the client, and CONFIG_NET_APP_SERVER=y is enabled in the server. According to Zephyr's documentation, this configurations need to be set to "y" to enable the respective client and server's net app library APIs.
However, when enabling both CONFIG_NET_APP_SERVER=y and CONFIG_NET_APP_CLIENT=y, the following errors appear:

In function ‘close_net_ctx’:
/home/user/zephyr/subsys/net/lib/app/client.c:279:19: error: ‘struct <anonymous>’ has no member named ‘net_ctxs’
    if (ctx->server.net_ctxs[i]) {
                   ^
/home/user/zephyr/subsys/net/lib/app/client.c:280:32: error: ‘struct <anonymous>’ has no member named ‘net_ctxs’
     net_context_put(ctx->server.net_ctxs[i]);
                                ^
/home/user/zephyr/subsys/net/lib/app/client.c:281:16: error: ‘struct <anonymous>’ has no member named ‘net_ctxs’
     ctx->server.net_ctxs[i] = NULL;

Is it impossible to run both client and server in the same board at the same time? or is there a way to get around this problem?
I was thinking on running the client in a thread, and the server in another thread, but that would still imply having both CONFIG_NET_APP_SERVER=y and CONFIG_NET_APP_CLIENT=y enabled in the prj.conf file.

Thank you in advance for your help.

Best regards,
Diana 


Re: switching from #FCB to #NVS for #BluetoothMesh persistent storage #fcb #nvs #bluetoothmesh

Johan Hedberg
 

Hi Vikrant,

On Thu, May 17, 2018, vikrant8051 wrote:
Is #BluetoothMesh stack completely independent from persistence storage
mechanism used by #SettingLayer ?
Mesh will work with any settings backend (currently FCB and NFFS, and in
the future with NVS).

Johan


Re: switching from #FCB to #NVS for #BluetoothMesh persistent storage #fcb #nvs #bluetoothmesh

vikrant8051 <vikrant8051@...>
 

Hi Andrzej,

Is #BluetoothMesh stack completely independent from persistence storage mechanism used by #SettingLayer ?

If yes, then only it will possible.  😃

Thank You !!

On Thu, May 17, 2018 at 1:28 PM, Puzdrowski, Andrzej <Andrzej.Puzdrowski@...> wrote:

Hi.

 

I Think it will be possible – (but can’t be sure). At last Jehudi Maes (the NVS author) is considering right now ho to provide nvs-back-end for the setting (I’m in touch with him).

 

Andrzej

 

From: devel@... [mailto:devel@lists.zephyrproject.org] On Behalf Of vikrant8051
Sent: Wednesday, May 16, 2018 11:51 AM
To: devel@...; users@...
Subject: [Zephyr-devel] switching from #FCB to #NVS for #BluetoothMesh persistent storage

 

Hi,

 

will it be possible to choose between #FCB & #NVS for #BluetoothMesh persistence data storage using configuration options ?

 

Thank You !!

 

 

 

 

 



Re: switching from #FCB to #NVS for #BluetoothMesh persistent storage #fcb #nvs #bluetoothmesh

Puzdrowski, Andrzej
 

Hi.

 

I Think it will be possible – (but can’t be sure). At last Jehudi Maes (the NVS author) is considering right now ho to provide nvs-back-end for the setting (I’m in touch with him).

 

Andrzej

 

From: devel@... [mailto:devel@...] On Behalf Of vikrant8051
Sent: Wednesday, May 16, 2018 11:51 AM
To: devel@...; users@...
Subject: [Zephyr-devel] switching from #FCB to #NVS for #BluetoothMesh persistent storage

 

Hi,

 

will it be possible to choose between #FCB & #NVS for #BluetoothMesh persistence data storage using configuration options ?

 

Thank You !!

 

 

 

 

 


Re: LED API extension

Johannes Hutter
 

Hi Justin,

my proposal is:

typedef int (*led_api_brightness_fade(struct device *dev, u32_t led, u8_t start, u8_t stop, u32_t fade_time);

So it is similar to your approach, but the starting brightness would be part of it. With that additional parameter we don't have to track the current brightness to know whether to fade up or down for example.
I will post a PR today. Would be great, if you had a look at it. I doubt we will get it merged until friday, but it would be nice to work on it nonetheless.

Best Regards,
Joe


On Wed, May 16, 2018 at 8:36 PM Justin <jdemarti@...> wrote:

Hi Johannes,

I'd be interested in this as well.  I'm implementing something similar already using PWM API and a k_timer.  So I'm curious about what functionality you are proposing?
Would it be something like this
typedef int (*led_api_fade)(struct device *dev, u32_t led, u8_t value, u32_t msecs);
Where the led fades to value over msecs of time?

Thanks,
Justin


--

Johannes Hutter | Software Developer
Mail: johannes@... 


         Workaround GmbH (ProGlove)  
         Friedenstr. 4 | 81671 München

         Managing Director: Thomas Kirchner 
         HRB: 216605 | AG München 
         USt.-IdNr.: DE298859320



Re: Mailing list archives before 2017

Brett Preston
 

All - quick update in that we have identified what caused not all of the needed archives to be migrated over. Resolving this is both possible and should not take long. Task should be completed by EOD Thursday, May 17.

Thank you

On Wed, May 16, 2018 at 7:11 AM, Brett Preston <bpreston@...> wrote:
Thanks Carles. Checking with our IT team and will revert back once I have an update.

On Wed, May 16, 2018 at 7:10 AM, Cufi, Carles <Carles.Cufi@...> wrote:

+ Brett

 

From: devel@... <devel@...> On Behalf Of Erwan Gouriou
Sent: 16 May 2018 14:59
To: zephyr-devel <zephyr-devel@...ect.org>
Subject: [Zephyr-devel] Mailing list archives before 2017

 

Hi all,

 

I'm looking for mail archives of this mainling list before 2017.

Looking in https://lists.zephyrproject.org/g/devel, it only starts on Jan '17.

This might be because we changed mailinglist service recently.

 

Are there archives of archives?

 

Erwan

 

 




--
Brett Preston
The Linux Foundation
+1 (971) 303-9030
bpreston@...

Skype: bprestoncf



--
Brett Preston
The Linux Foundation
+1 (971) 303-9030
bpreston@...

Google Talk: bpreston@...
Skype: bprestoncf


Re: LED API extension

Justin
 

Hi Johannes,

I'd be interested in this as well.  I'm implementing something similar already using PWM API and a k_timer.  So I'm curious about what functionality you are proposing?
Would it be something like this
typedef int (*led_api_fade)(struct device *dev, u32_t led, u8_t value, u32_t msecs);
Where the led fades to value over msecs of time?

Thanks,
Justin



Re: Compiling mqtt_publisher example with ESP32

Leandro Pereira
 

Zach,

On 05/16/2018 10:32 AM, Zach wrote:
The example app implements TLS which is nice, but for Google IoT I need to be able to create JSON and JSON Web Tokens. Are there Zephyr libraries for either of these? Other than that I believe I just need to get the ESP32 connected to wifi, but I need to look into it more as that may be more of an espressif thing rather than a zephyr thing. Any help would be greatly appreciated!
WiFi on the ESP32 is not supported at the moment. Short answer: There are a few technical reasons for this, and making it work will require quite a bit of plumbing.

The long answer:

Zephyr is currently loaded by the first stage bootloader (in the ESP32 mask ROM) into RAM, and is executed from there. The instruction RAM (IRAM) is quite tiny, only a few kilobytes long.

The WiFi stack for ESP32 is immense in comparison. It's also only distributed as a binary object, and linked against Espressif's port of FreeRTOS, with the ABI defined by them, and requiring some features from that OS. Most of these things we can write shims for (e.g. synchronization primitives, memory allocation, this sort of thing), but Espressif is said to be working on an OS-agnostic version of their WiFi stack that would help in this scenario without any sort of hacks.

When you factor the IRAM size and the size of the WiFi stack, you'll end up finding that you need to enable a feature in the ESP32 SoC that's called "flash cache". The hardware will transparently fetch things from the flash memory into an IRAM chunk, execute it from there, and then you can have arbitrarily large code. Sort of, anyway... because this can get tricky with pages not being in the cache and interrupts happening... so we'll have to ensure that the whole Zephyr kernel is in IRAM (so that, for instance, interrupt handlers can use any of the Zephyr API without triggering an interrupt because parts of it aren't in the cached region yet; this can get tricky with our API, especially those with user-defined callbacks such as the GPIO API).

This also requires a second stage bootloader; in other words, ensuring that MCUBoot works on ESP32. It's not a difficult job, but it's one that has to be done to make all this work.

I've also stopped working on the ESP32 port due to many (unrelated) reasons, but I'll be glad to help with code and more details from my findings if anybody wants to take the torch, or coordinate with others that got my brain dump on the subject.

Cheers,
Leandro


Compiling mqtt_publisher example with ESP32

Zach
 

Hi All,

I'm trying to get a basic solution running, so if any of this is answered in the wiki I apologize. I'm looking to create an mqtt_client zephyr app running on an espressif ESP32. This is so that I can talk to Google IoT Core. I'm at the point where I have the mqtt_publisher example app compiling for the board, but now I'm running into more questions I was hoping I could get help with.

The example app implements TLS which is nice, but for Google IoT I need to be able to create JSON and JSON Web Tokens. Are there Zephyr libraries for either of these? Other than that I believe I just need to get the ESP32 connected to wifi, but I need to look into it more as that may be more of an espressif thing rather than a zephyr thing. Any help would be greatly appreciated!

Regards,
Zach Martin


Re: Mailing list archives before 2017

Brett Preston
 

Thanks Carles. Checking with our IT team and will revert back once I have an update.

On Wed, May 16, 2018 at 7:10 AM, Cufi, Carles <Carles.Cufi@...> wrote:

+ Brett

 

From: devel@... <devel@...> On Behalf Of Erwan Gouriou
Sent: 16 May 2018 14:59
To: zephyr-devel <zephyr-devel@lists.zephyrproject.org>
Subject: [Zephyr-devel] Mailing list archives before 2017

 

Hi all,

 

I'm looking for mail archives of this mainling list before 2017.

Looking in https://lists.zephyrproject.org/g/devel, it only starts on Jan '17.

This might be because we changed mailinglist service recently.

 

Are there archives of archives?

 

Erwan

 

 




--
Brett Preston
The Linux Foundation
+1 (971) 303-9030
bpreston@...

Google Talk: bpreston@...
Skype: bprestoncf


Re: Mailing list archives before 2017

Carles Cufi
 

+ Brett

 

From: devel@... <devel@...> On Behalf Of Erwan Gouriou
Sent: 16 May 2018 14:59
To: zephyr-devel <zephyr-devel@...>
Subject: [Zephyr-devel] Mailing list archives before 2017

 

Hi all,

 

I'm looking for mail archives of this mainling list before 2017.

Looking in https://lists.zephyrproject.org/g/devel, it only starts on Jan '17.

This might be because we changed mailinglist service recently.

 

Are there archives of archives?

 

Erwan

 

 


Mailing list archives before 2017

Erwan Gouriou
 

Hi all,

I'm looking for mail archives of this mainling list before 2017.
Looking in https://lists.zephyrproject.org/g/devel, it only starts on Jan '17.
This might be because we changed mailinglist service recently.

Are there archives of archives?

Erwan



switching from #FCB to #NVS for #BluetoothMesh persistent storage #fcb #nvs #bluetoothmesh

vikrant8051 <vikrant8051@...>
 

Hi,

will it be possible to choose between #FCB & #NVS for #BluetoothMesh persistence data storage using configuration options ?

Thank You !!






Doubt about good programming practice when setting https settings

christian tavares
 

Hello!! 

I have a doubt, I'm developing a library http_client with https. 

However I don't know if I should set the https config (HTTPS_STACK, K_THREAD_POOL..) on my library or I should define at app. 

What is the right way? Could someone help me? Thank you.  


Re: LED API extension

Carles Cufi
 

Hi Johannes,

 

The merge windows closes on Friday. You can of course try to post a PR as soon as possible and it might get merged before then depending on how the review goes.

 

Regards,

 

Carles

 

From: devel@... <devel@...> On Behalf Of Johannes Hutter
Sent: 15 May 2018 16:27
To: devel@...
Subject: [Zephyr-devel] LED API extension

 

Hi everyone,

I just saw that a LED subsystem was added for 1.12. Unfortunately we built our own API a while ago but were not able to contribute it. We have in addition to the upstream API support for fading the power of the LED up or down over a given time period. Do you think it would make sense to add this functionality to the API and if yes, would we be able to get this merged before the 1.12 window closes?

Best regards,

Joe

--

Johannes Hutter | Software Developer
Mail: johannes@... 

         Workaround GmbH (ProGlove)  
         Friedenstr. 4 | 81671 München

         Managing Director: Thomas Kirchner 
         HRB: 216605 | AG München 
         USt.-IdNr.: DE298859320


LED API extension

Johannes Hutter
 

Hi everyone,

I just saw that a LED subsystem was added for 1.12. Unfortunately we built our own API a while ago but were not able to contribute it. We have in addition to the upstream API support for fading the power of the LED up or down over a given time period. Do you think it would make sense to add this functionality to the API and if yes, would we be able to get this merged before the 1.12 window closes?

Best regards,
Joe
--

Johannes Hutter | Software Developer
Mail: johannes@... 


         Workaround GmbH (ProGlove)  
         Friedenstr. 4 | 81671 München

         Managing Director: Thomas Kirchner 
         HRB: 216605 | AG München 
         USt.-IdNr.: DE298859320



Re: OT Shell

Lubos, Robert
 

Hi Diana,

 

Sadly, I’m not able to reproduce issues you describe. I did a smoke test of examples that you mention (current master with nrf52840 pca10056), and shell worked on every single one out-of-the-box, no extra configuration needed. Therefore I’m afraid the problem lies somewhere in your local setup.

 

From my experience, I can tell  that I have occasional issue when connecting to pca10056 from my virtual machine (VMWare running Arch Linux). The problem I observe is that I can see the output from the board (from the logger), but cannot provide any input. For my case, switching board back to native Windows and power cycle on a board helps (no need to re-flash), so I assume it is a VM/JLink issue. Perhaps you observe something similar (but you mention that you can see local echo?). Maybe it would be a good idea to check examples with different terminal? I use PuTTY (speed 11520).  

 

Best regards,

Robert

 

From: devel@... [mailto:devel@...] On Behalf Of Diana Rivera
Sent: Monday, May 14, 2018 16:07
To: devel@...
Subject: [Zephyr-devel] OT Shell

 

Hi Jukka and Robert,

Thank you to both of you for your help.

Robert, I am currently using the latest Zephyr release, and the nrf52840 pca10056 platform. However, I have troubles using the shells for several subsystems. I have tried using the one for OpenThread, BT Mesh (tests/bluetooth/mesh_shell), and the samples/subsys/shell/shell_module shells, and so far, I haven't been able to make them work. The codes are compiled and are flashed with no problem; however, when it comes to writing to them, I'm able to see what I'm writing (after activating the local echo), but once I hit enter, the commands ('help' for example) have no effect.

Is there a specific way to run the shells? Or what could be the mistake or problem that might be happening?

Once again, Thank you in advance for your help!

Cheers,
Diana

3441 - 3460 of 8033