Date   

GSM modem AT commands

Gordon Klaus <gordon@...>
 

Hello,

 

I have successfully made a network connection using MODEM_GSM_PPP.  Now, I would like to reduce power consumption by using power saving mode (PSM).  What is the recommended way to send the AT commands to achieve this?

 

Can I send AT commands to the UART device after gsm_ppp_start has been called?  How would I handle the response when the modem driver is already listening to that UART?  Is this what GSM_MUX is for?  I don’t see any documentation for how do use GSM mux.  Can I attach another UART mux to the device?  Can I pick an arbitrary unused DLCI?

 

I see that the modem driver has code to simplify handling AT responses, but this code is private to the driver.  Why is this code not available for general purpose AT command handling?  Is it planned to be made available?

 

Best regards,

Gordon


Zephyr Developer Survey: Your Input Requested by Thursday, May 19

Brett Preston
 

(TSC Members/Alternates, Maintainers, Collaborators please follow link that were sent to you)


Members of the Zephyr Community,


We have assembled a Developer Survey to help us understand what is working well in the Zephyr Project, and what could be improved. The summary information will be shared with the TSC, and used to help the project figure out where to focus going forward. Responses are captured anonymously.


It would be very helpful to the project if you could take the time to share your thoughts in the survey at https://linuxfoundation.surveymonkey.com/r/25MM7CR. There are 35 questions, and we estimate it should probably take about 10 minutes to fill it in.


Responses are requested by end-of-day on Thursday, May 19.


If you have any questions, please don’t hesitate to reach out to one of us.


Thanks, 



Anas, Kate & Brett

--
Brett Preston
Sr. Program Manager
The Linux Foundation
+1 (971) 303-9030


Reminder to Register: Zephyr Developer Summit

Brett Preston
 

Members of the Zephyr Community,


The Zephyr Developer Summit is now less than a month away!


Have you completed your registration yet? https://events.linuxfoundation.org/zephyr-developer-summit/register/


All sessions will be streamed live for Virtual Attendees.


The Full Schedule is available at https://events.linuxfoundation.org/zephyr-developer-summit/program/schedule/


Session videos will be posted to YouTube post-event on a rolling cadence, but your best opportunity to experience the content, without delay, will be via In-Person or Virtual attendance.


For those newer to Zephyr, we’ve got events scheduled for Tuesday, June 7 – including a Hands-on Tutorial


For questions, please email events@...


We look forward to seeing you at the event!



Zephyr Project


Join us in Discord: https://chat.zephyrproject.org/ (Dev Summit channel - # zds2022)


--
Brett Preston
Sr. Program Manager
The Linux Foundation
+1 (971) 303-9030


Re: How to access the child nodes in a device tree (DTS) in Zephyr using DT_FOREACH_CHILD #dts #nrf52

unsunk.ship@...
 

The results from previous code were OK, I think it's a bug in the debugger. I posted the details here [^].
BR.


How to access the child nodes in a device tree (DTS) in Zephyr using DT_FOREACH_CHILD #dts #nrf52

unsunk.ship@...
 

Hi,
I originally posted this question to stackoverflow [^] so I think its better not to duplicate the whole story here.
Supposing I have a DTS file with a content like this one below:

n: detectors {
    compatible = "foo-detectors";
        
    // Definition of first channel
    det0: det_0 {
        irq-pins = <13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
        label = "Bar detector channel 1";
    };
    // Definition of second channel
    det1: det_1 {
        irq-pins = <17 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
        label = "Bar detector channel 2";
    };
};
And a structure like here below:
struct foo_detector_desc { 
    int irqpin; 
    int irqpin_flags;
}
How can I use macro DT_FOREACH_CHILD for populating an array with one item for each child of node detectors?

I tried this code below but, yet it compiled, the results where not what I wanted.

#define PIN_INFO_AND_COMMA(node_id) \
    { \
        .pin=DT_PROP_BY_IDX(node_id, irq_pins, 0),\
        .flags=DT_PROP_BY_IDX(node_id, irq_pins, 1),\
    },

const struct detector_data _det_data[] = {
    DT_FOREACH_CHILD(DT_NODELABEL(n), PIN_INFO_AND_COMMA)
};

BR.


Re: Scheduler/Thread Status #api

Andy Ross
 

Not public ones, no.  You can check kernel/include/ksched.h for the internal API for this.  I guess the immediate question has to be "what are you trying to do"?  Recognize that any decision made on the basis of this kind of stuff is going to be inherently racy without access to the scheduler's own synchronization (though on a single CPU device, just holding an interrupt lock is enough to be safe).

Also, just to clarify: k_sched_lock() doesn't mutate "scheduler" state at all, it's implemented via a trick that essentially elevates the current thread priority to a cooperative level, preventing preemption.

Andy


Scheduler/Thread Status #api

Casey Shea
 

Are there any API calls for retrieving thread and scheduler status?  I'm looking for something that would indicate the following:

  • Is the scheduler locked?
  • What is the thread status? (Ready, Waiting, Suspended)


Thanks!


Re: Implementation of Zephyr on custom board

Murphy, Lauren
 

Hi Bharath,

 

(1) I’ll look more into this and email you 1:1.

 

(2) Could you explain what you mean by “build the code without any board dependencies in West”? The module (if you’re using the module) can build for any board; see the Hello World sample. If you’re trying to use a custom board, you need definitions for the board + an overlay to make Zephyr aware of sensors you’re using.

 

Sincerely,

Lauren Murphy

 

From: users@... <users@...> On Behalf Of Bharath V
Sent: Wednesday, May 4, 2022 4:37 AM
To: users@...
Subject: [Zephyr-users] Implementation of Zephyr on custom board

 

Dear Team

 

I am currently working on implementing Zephyr RTOS with Tensorflow lite on a custom board (RISC-V based). I am facing the few issues such as

 

(i) Unable to avoid the use of standard C++ libraries.

(ii) Can we build the code without any board dependencies in west.

 

Kindly requesting for assistance.

 

Thanks and regards

Bharath V


Profiling tools

Guy Morand
 

Hi Zephyr users!

I would like to profile my application and was wondering if there are tools available such as the famous ``perf``?

I have found ``THREAD_ANALYZER`` that is very useful but I would need more information about which functions is called and how long.

Happy hacking!

Guy


Implementation of Zephyr on custom board

Bharath V <bk.fml95@...>
 

Dear Team

I am currently working on implementing Zephyr RTOS with Tensorflow lite on a custom board (RISC-V based). I am facing the few issues such as

(i) Unable to avoid the use of standard C++ libraries.
(ii) Can we build the code without any board dependencies in west.

Kindly requesting for assistance.

Thanks and regards
Bharath V


Re: designing a message "bus"

Guy Morand
 

Hi Yshragai,

Small correction on my previous statement. As stated in the documentation, broadcasting is not possible:

Each message may be received by only one thread (i.e.
point-to- multipoint and broadcast messaging is not supported).
We had a small internal discussion about a similar topic this morning and for this reason, we decided to implement our own observer pattern by sending events to a dispatcher using message queue.

Anyway, if you have a better approach, I'm eager to hear more!

Best regards,

Guy


On 5/4/22 09:31, Guy Morand via lists.zephyrproject.org wrote:
Hi Yshragai,
Have you looked at 'k_mbox' data structure? It seems you can set a destination thread or broadcast messages with 'K_ANY':
https://docs.zephyrproject.org/latest/kernel/services/data_passing/mailboxes.html Hope this helps,
regards,
Guy
On 5/3/22 23:20, yshragai.firmware@... wrote:
Hi,
I'm wanting to design a firmware, for a small low-power embedded system, with an architecture that features a "bus" over which the firmware modules communicate. I'm wondering how to design this "bus".
Basically what I'm envisioning is modules sending messages over this bus that contain an address or module ID of some sort or another; the module that matches this address or ID would pick up the message off the bus.
One brute-force way to design this is a queue (such as a FIFO) per target module. This is not the most elegant or scalable solution, but it'll work... Is there a way to design this that's more scalable, and maybe even elegant?
I wish there were a mechanism in Zephyr by which a thread could subscribe to messages in a given queue not by sender ID (as is possible with a mailbox) but by some identifying characteristic of the message (e.g., by the value in the "info" field).
Thanks!
--
bytes at work
Technoparkstrasse 7
CH-8406 Winterthur
Switzerland

phone: +41 52 213 79 79


Re: designing a message "bus"

Guy Morand
 

Hi Yshragai,

Have you looked at 'k_mbox' data structure? It seems you can set a destination thread or broadcast messages with 'K_ANY':
https://docs.zephyrproject.org/latest/kernel/services/data_passing/mailboxes.html

Hope this helps,
regards,

Guy

On 5/3/22 23:20, yshragai.firmware@... wrote:
Hi,
I'm wanting to design a firmware, for a small low-power embedded system, with an architecture that features a "bus" over which the firmware modules communicate. I'm wondering how to design this "bus".
Basically what I'm envisioning is modules sending messages over this bus that contain an address or module ID of some sort or another; the module that matches this address or ID would pick up the message off the bus.
One brute-force way to design this is a queue (such as a FIFO) per target module. This is not the most elegant or scalable solution, but it'll work... Is there a way to design this that's more scalable, and maybe even elegant?
I wish there were a mechanism in Zephyr by which a thread could subscribe to messages in a given queue not by sender ID (as is possible with a mailbox) but by some identifying characteristic of the message (e.g., by the value in the "info" field).
Thanks!
--
bytes at work
Technoparkstrasse 7
CH-8406 Winterthur
Switzerland

phone: +41 52 213 79 79


Re: designing a message "bus"

Jason Bens <jason.bens@...>
 

I’m sure you’ll get a slew of possible implementations, but have you considered implementing the observer pattern?  https://en.wikipedia.org/wiki/Observer_pattern .  If I were to implement this, I’d give each module an event queue to receive messages on, and a list containing pointers to the event queues of other interested modules (the observers).  Observers are notified by iterating over the list and sending the event to each one.  Unfortunately, the granularity of this approach is only to the module level, and so may not meet your needs as described.

 

  • Jason

 

From: users@... <users@...> On Behalf Of yshragai.firmware@...
Sent: May 3, 2022 11:20 PM
To: users@...
Subject: [Zephyr-users] designing a message "bus"

 

External Email:

Hi,

I'm wanting to design a firmware, for a small low-power embedded system, with an architecture that features a "bus" over which the firmware modules communicate. I'm wondering how to design this "bus".

 

Basically what I'm envisioning is modules sending messages over this bus that contain an address or module ID of some sort or another; the module that matches this address or ID would pick up the message off the bus.

 

One brute-force way to design this is a queue (such as a FIFO) per target module. This is not the most elegant or scalable solution, but it'll work... Is there a way to design this that's more scalable, and maybe even elegant?

 

I wish there were a mechanism in Zephyr by which a thread could subscribe to messages in a given queue not by sender ID (as is possible with a mailbox) but by some identifying characteristic of the message (e.g., by the value in the "info" field).

 

Thanks!


designing a message "bus"

yshragai.firmware@...
 

Hi,
I'm wanting to design a firmware, for a small low-power embedded system, with an architecture that features a "bus" over which the firmware modules communicate. I'm wondering how to design this "bus".
 
Basically what I'm envisioning is modules sending messages over this bus that contain an address or module ID of some sort or another; the module that matches this address or ID would pick up the message off the bus.
 
One brute-force way to design this is a queue (such as a FIFO) per target module. This is not the most elegant or scalable solution, but it'll work... Is there a way to design this that's more scalable, and maybe even elegant?
 
I wish there were a mechanism in Zephyr by which a thread could subscribe to messages in a given queue not by sender ID (as is possible with a mailbox) but by some identifying characteristic of the message (e.g., by the value in the "info" field).
 
Thanks!


Re: Connecting to a private resolvable address found using bt_le_scan_start

Chettimada, Vinayak Kariappa
 

Hi Jason,

 

Without bonding (connect, pair, encrypt and distribute keys) with the device, IRK cannot be obtained from the remove device.

 

Regards,

Vinayak

 

From: users@... <users@...> On Behalf Of Jason Bens via lists.zephyrproject.org
Sent: 02 May 2022 12:03
To: users@...
Subject: [Zephyr-users] Connecting to a private resolvable address found using bt_le_scan_start

 

Hi,

 

I’m writing some firmware for both sides of a BLE link.  I would like to scan for advertisers, filter the results to find my device, then store the address to be connected later, without necessarily connecting at the moment.  I think this is possible if I use static addresses, but I would prefer to use a private resolvable address.  What is the process to use the bt_le_address_t returned in the info struct of the .recv callback to get the IRK so I can connect to the remote device at a later time?

 

Thanks,

 

  • Jason


Connecting to a private resolvable address found using bt_le_scan_start

Jason Bens <jason.bens@...>
 

Hi,

 

I’m writing some firmware for both sides of a BLE link.  I would like to scan for advertisers, filter the results to find my device, then store the address to be connected later, without necessarily connecting at the moment.  I think this is possible if I use static addresses, but I would prefer to use a private resolvable address.  What is the process to use the bt_le_address_t returned in the info struct of the .recv callback to get the IRK so I can connect to the remote device at a later time?

 

Thanks,

 

  • Jason


STM32 VS Code

mshary@...
 

Hello, can someone describe how to create a project for stm32f407 and Zephyr os with opportunity to flash and debug in VS code


Re: west flash issue

Anis
 

you need to have JLINK folder in your PATH.

see this link for how to add something to the path https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/

Anis

On 4/28/22 14:26, Yojanse Duarte wrote:

Hi,

Im trying to use zephyr os but I cant flash because im having problems with jlink, how can I solve It?

 

 

Yojanse Duarte
Ingeniero de Hardware
TripleCyber S.R.L.

RNC: 1-32-28980-3
Telefono: (829) 823-3481
yojanse.duarte@... | www.triplecyber.com

 

Visita a TripleCyber en redes sociales: 

Este correo electrónico y los archivos transmitidos con él son confidenciales y están destinados únicamente al uso de la persona o entidad a la que se dirigen. Si usted no es el destinatario previsto o la persona responsable de entregar el correo electrónico al destinatario previsto, tenga en cuenta que ha recibido este correo electrónico y cualquier archivo transmitido por error y que cualquier uso, difusión, reenvío, impresión o copia de este correo electrónico y / o dichos archivos está estrictamente prohibido. Si ha recibido este correo electrónico por error, notifique inmediatamente al remitente y destruya el mensaje original y todos los archivos adjuntos.

 


west flash issue

Yojanse Duarte <Yojanse.Duarte@...>
 

Hi,

Im trying to use zephyr os but I cant flash because im having problems with jlink, how can I solve It?

 

 

Yojanse Duarte
Ingeniero de Hardware
TripleCyber S.R.L.

RNC: 1-32-28980-3
Telefono: (829) 823-3481
yojanse.duarte@... | www.triplecyber.com

 

Visita a TripleCyber en redes sociales: 

Este correo electrónico y los archivos transmitidos con él son confidenciales y están destinados únicamente al uso de la persona o entidad a la que se dirigen. Si usted no es el destinatario previsto o la persona responsable de entregar el correo electrónico al destinatario previsto, tenga en cuenta que ha recibido este correo electrónico y cualquier archivo transmitido por error y que cualquier uso, difusión, reenvío, impresión o copia de este correo electrónico y / o dichos archivos está estrictamente prohibido. Si ha recibido este correo electrónico por error, notifique inmediatamente al remitente y destruya el mensaje original y todos los archivos adjuntos.

 


Re: Executing a Post Build Batch File using CMake

Bolivar, Marti
 

Hi Casey,

Did you have a look at the global 'extra_post_build_commands' and
'extra_post_build_byproducts' properties mentioned in
zephyr/CMakeLists.txt?

Try searching around the source tree to see how it is used and if you
can adapt it to your needs.

HTH,
Martí

On Wed, Apr 13 2022, Casey Shea via lists.zephyrproject.org wrote:
*Build Environment Details*

* Building Zephyr with CMake
* ARM Platform (Nordic nrf5340)
* Source and Build directories are out of tree.

* My build directory is ${ CMAKE_CURRENT_SOURCE_DIR }../../Executables
* My source directories are in several places, but all are in a sub-directory of ${ CMAKE_CURRENT_SOURCE_DIR }/../../../../

* CLion is my IDE of choice but I don't believe that matters for this discusson.

*What I am Trying to Achieve*
At the end of my build process, I would like to execute a batch file on the zephyr_final target that signs the final image.  This is different than the MCU Boot signature and is a custom proprietary signature.  I am unable to change the way in which this image is signed as it must be compatible with existing tools used with my product.

*Method in Which I am trying to Achieve*
Normally, I would do this using add_custom_command(TARGET target_name POST_BUILD
COMMAND "batchfile.bat" batchfile_arguments)

However, I don't believe that the final zephyr target is within the scope of the top-level CMakeLists.txt file.  That said, I do not have a lot of experience with CMake as most of my past development was within the IAR toolchain.  It's very possible that I am misinterpreting this.

Questions
1.  Will I be able to use the add_custom_command() CMake function to execute the batch file?  If so, can someone provide an example as to how I would do this and what Target I should be using.

2.  Is there a better, more appropriate method for doing this within the Zephyr environment.

Any help or guidance is much appreciated!