RE: Thread (Openthread) networking protocol & NuttX
Hi all, I am just checking in if in the meantime anybody has looked into using the Openthread protocol with NuttX? Specifically I am looking at the nRF52840 SoC with Thread support. Thanks! Max On 2021/01/21 22:06:49 Max Kriegleder wrote: > Hi all, > > I am currently looking into thread networking protocol for IoT > applications - https://openthread.io/. There are several design > approaches with System-on-Chip (SoC) and Co-Processor (RCP, NCP) > designs. Has anybody looked into integrating thread into NuttX > regardless of the design approach? I saw that Zephyr OS does support > thread > https://docs.zephyrproject.org/latest/reference/networking/thread.html > and I am hoping it wouldn't be too difficult to integrate it into NuttX. > > Thanks! > Max > >
Short delay
Hi All, For a specific use case I need to delay execution on the the order of 100 - 1 us. The obvious choice would be usleep however I noticed that depending on the platform I get something like 124-140 us instead of 100 us delay. I have created an issue on github for this https://github.com/apache/nuttx/issues/8207, but I think I understand by now why usleep cannot achieve what I am looking for - at least in the current implementation. I guess I need something along the lines of an alarm with very short alarm periods. I am using the tickless OS setting with 1 USEC_PER_TICK and ultimately I want to control a stepper motor where I need to delay toggling of pins for very short and accurate amounts of time to achieve a certain movement profile of the motor - just for information, maybe I am thinking in the wrong direction. Thanks! Max
Re: Error with stm32f4discovery:usbnsh
Hi Alan, I don't think that it is a config issue. I am on branch nuttx-10.0.1 for both my nuttx and apps repo, and I did $ make distclean $ ./tools/configure.sh stm32f4discovery:usbnsh $ make It compiles without errors (otherwise I could not have tested the code on my board). I assume the new symbols were introduced after release nuttx-10.0.1. As Masayuki pointed out, this issue was resolved but not backported. So I guess I am either waiting for the backport or the new release 10.1. Thanks! Max On 2021/04/22 15:12:42, Alan Carvalho de Assis wrote: > Hi Max,> > > it appears you are using an outdated NuttX and/or board config> > > During the compilation using out .config I got some errors:> > > In file included from nuttxspace/nuttx/sched/mqueue/mqueue.h:38,> > from group/group_leave.c:44:> > nuttxspace/nuttx/include/nuttx/mqueue.h:103:26: error:> > 'CONFIG_FS_MQUEUE_NPOLLWAITERS' undeclared here (not in a function);> > did you mean 'CONFIG_SERIAL_NPOLLWAITERS'?> > 103 | FAR struct pollfd *fds[CONFIG_FS_MQUEUE_NPOLLWAITERS];> > | ^> > | CONFIG_SERIAL_NPOLLWAITERS> > make[1]: *** [Makefile:57: group_leave.o] Error 1> > > > You config is missing some new symbols:> > CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=8> > CONFIG_FS_MQUEUE_NPOLLWAITERS=4> > etc> > > Please update ("git pull") you nuttx and apps and then execute:> > > $ make distclean> > $ ./tools/configure.sh stm32f4discovery:usbnsh> > $ make> > > Now everything will work correctly.> > > BR,> > > Alan> > > On 4/22/21, Max Kriegleder wrote:> > > Yes, I am getting this error.> > >> > > NuttShell (NSH) NuttX-10.1.0> > > nsh> nsh: nsh_session: readline failed: 9> > >> > > I haven't used NuttX on this board for a while, so I cannot say when> > > this broke. I have attached the .config file, should be the> > > auto-generated config file based on stm32f4discovery/configs/usbnsh> > >> > > Thanks!> > >> > >> > > On 2021/04/20 22:26:25, Alan Carvalho de Assis wrote:> > > > Are you getting this error:>> > > >> > > > "nsh> nsh: nsh_session: readline failed: 9">> > > >> > > > Could you please share your .config file?>> > > >> > > > BR,>> > > >> > > > Alan>> > > >> > > > On 4/20/21, Max Kriegleder wrote:>> > > > > Strange.. I have sent two mails prior to this one and apparently they>> > > > > did not make it to the list. Trying again:>> > > > >>> > > > > Were you able to fix this problem? I am running nuttx-10.0.1 on a>> > > > > stm32f4discovery board and I have the same issue.>> > > > >>> > > > > Thanks!>> > > > >>> > > > >>> > > > > On 2021/04/17 22:56:48, Alan Carvalho de Assis > > > wrote:>> > > > > > I just received it!>>> > > > > >>> > > > > > Try to submit a new email>>> > > > > >>> > > > > > On 4/17/21, Max Kriegleder wrote:>>> > > > > > > Is anybody reading this? I am not sure why my messages get> > > lost.. how>>> > > > > > > can I post to the message list?>>> > > > > > >>>> > > > > > > On 2020/12/13 22:19:01, Brennan Ashton >> > > > > wrote:>>> > > > > > > > Yeah 100% agree which is why I need to look when I have a> > > little>> > > > > more>>>> > > > > > > > time to understand what is going on.>>>> > > > > > > >>>> > > > > > > > On Sun, Dec 13, 2020 at 2:12 PM Gregory Nutt >> > > > > wrote:>>>> > > > > > > > >>>>> > > > > > > > > See>>>> > > > > > > > >>>> > > > > > >>> > > > >> > > https://mail-archives.apache.org/mod_mbox/nuttx-dev/202012.mbox/%3CCAKFLXYwes3pcDA2zXsL2FcwgCS4PecdmiP9srkGEtTaOoLEhMg%40mail.gmail.com%3E>>>> > >> > >> > > > >>> > > > >>> > > > > > >>>> > > > > > >>>> > > > > > > > >>>>> > > > > > > >
Mailing list usability
Hi all, I am an infrequent user of the mailing list, where I sometimes post issues and even more rarely pull request. Hence, I would rather not subscribe to the list because of spam (no pun intended!). However, I find it quite difficult to use the mailing list for my purposes without subscribing. Lately, some of my messages apparently got lost. Also, I cannot answer to specific messages on https://www.mail-archive.com/dev@nuttx.apache.org/ as the 'Reply via email to' button doesn't work in my browser (Firefox). I have tried http://mail-archives.apache.org, which doesn't have a search and reply functionality, and https://lists.apache.org/list.html?dev@nuttx.apache.org, which seems like the best alternative with search and reply functionality, but it doesn't seem to be in sync with the mailing list (or takes longer to do that). Are there other alternatives for my use case or do I really need to subscribe to the mailing list? Thanks! Max
Re: Error with stm32f4discovery:usbnsh
Yes, I am getting this error. NuttShell (NSH) NuttX-10.1.0 nsh> nsh: nsh_session: readline failed: 9 I haven't used NuttX on this board for a while, so I cannot say when this broke. I have attached the .config file, should be the auto-generated config file based on stm32f4discovery/configs/usbnsh Thanks! On 2021/04/20 22:26:25, Alan Carvalho de Assis wrote: > Are you getting this error:> > > "nsh> nsh: nsh_session: readline failed: 9"> > > Could you please share your .config file?> > > BR,> > > Alan> > > On 4/20/21, Max Kriegleder wrote:> > > Strange.. I have sent two mails prior to this one and apparently they> > > did not make it to the list. Trying again:> > >> > > Were you able to fix this problem? I am running nuttx-10.0.1 on a> > > stm32f4discovery board and I have the same issue.> > >> > > Thanks!> > >> > >> > > On 2021/04/17 22:56:48, Alan Carvalho de Assis wrote:> > > > I just received it!>> > > >> > > > Try to submit a new email>> > > >> > > > On 4/17/21, Max Kriegleder wrote:>> > > > > Is anybody reading this? I am not sure why my messages get lost.. how>> > > > > can I post to the message list?>> > > > >>> > > > > On 2020/12/13 22:19:01, Brennan Ashton > > > wrote:>> > > > > > Yeah 100% agree which is why I need to look when I have a little> > > more>>> > > > > > time to understand what is going on.>>> > > > > >>> > > > > > On Sun, Dec 13, 2020 at 2:12 PM Gregory Nutt > > > wrote:>>> > > > > > >>>> > > > > > > See>>> > > > > > >>> > > > >> > > https://mail-archives.apache.org/mod_mbox/nuttx-dev/202012.mbox/%3CCAKFLXYwes3pcDA2zXsL2FcwgCS4PecdmiP9srkGEtTaOoLEhMg%40mail.gmail.com%3E>>> > >> > >> > > > >>> > > > >>> > > > > > >>>> > > > > > > I don't think this is the correct solution since with Xiao> > > Xiang's>>> > > > > > > recent changes, stdin should never be closed. But it does give> > > some>>> > > > > > > clues about the nature of the problem: stdin is no valid;> > > stdout is>> > > > > okay>>> > > > > > >>>> > > > > > > On 12/13/2020 4:07 PM, Brennan Ashton wrote:>>> > > > > > > > This is impacting all the usbnsh configurations. I can take> > > another>>> > > > > > > > look later this evening>>> > > > > > > > https://github.com/apache/incubator-nuttx/pull/2526>>> > > > > > > >>>> > > > > > > > --Brennan>>> > > > > > > >>>> > > > > > > > On Fri, Dec 11, 2020 at 5:05 AM Gregory Nutt >> > > > > wrote:>>> > > > > > > >> Several other PRs specifically removed support for fclose>> > > > > (stdin). Are>>> > > > > > > >> you certain you want to restore it? I think this needs more>> > > > > analysis>>> > > > > > > >> and resolution with the previous changes that removed the>> > > > > fclose() of>>> > > > > > > >> stdin, stdout, and stderr.>>> > > > > > > >>>>> > > > > > > >> On 12/10/2020 5:37 PM, Masayuki Ishikawa wrote:>>> > > > > > > >>> Suzuki-san,>>> > > > > > > >>>>>> > > > > > > >>> Please send a PR (Pull Request) to>>> > > > > > > >>> https://github.com/apache/incubator-nuttx-apps/>>> > > > > > > >>>>>> > > > > > > >>> On Thu, Dec 10, 2020 at 5:24 PM SUZUKI Keiji> > > >> > > > > wrote:>>> > > > > > > >>>>>> > > > > > > >>>> Hi,>>> > > > > > > >>>>>>> > > > > > > >>>> I use STM32F407G-DISC1 (MB997D) and build nuttx on macOS>> > > > > Mojave (10.14.6).>>> > > > > > > >>>>&g
Re: Error with stm32f4discovery:usbnsh
Strange.. I have sent two mails prior to this one and apparently they did not make it to the list. Trying again: Were you able to fix this problem? I am running nuttx-10.0.1 on a stm32f4discovery board and I have the same issue. Thanks! On 2021/04/17 22:56:48, Alan Carvalho de Assis wrote: > I just received it!> > > Try to submit a new email> > > On 4/17/21, Max Kriegleder wrote:> > > Is anybody reading this? I am not sure why my messages get lost.. how> > > can I post to the message list?> > >> > > On 2020/12/13 22:19:01, Brennan Ashton wrote:> > > > Yeah 100% agree which is why I need to look when I have a little more>> > > > time to understand what is going on.>> > > >> > > > On Sun, Dec 13, 2020 at 2:12 PM Gregory Nutt wrote:>> > > > >>> > > > > See>> > > > >> > > https://mail-archives.apache.org/mod_mbox/nuttx-dev/202012.mbox/%3CCAKFLXYwes3pcDA2zXsL2FcwgCS4PecdmiP9srkGEtTaOoLEhMg%40mail.gmail.com%3E>> > >> > >> > > > >>> > > > > I don't think this is the correct solution since with Xiao Xiang's>> > > > > recent changes, stdin should never be closed. But it does give some>> > > > > clues about the nature of the problem: stdin is no valid; stdout is> > > okay>> > > > >>> > > > > On 12/13/2020 4:07 PM, Brennan Ashton wrote:>> > > > > > This is impacting all the usbnsh configurations. I can take another>> > > > > > look later this evening>> > > > > > https://github.com/apache/incubator-nuttx/pull/2526>> > > > > >>> > > > > > --Brennan>> > > > > >>> > > > > > On Fri, Dec 11, 2020 at 5:05 AM Gregory Nutt > > > wrote:>> > > > > >> Several other PRs specifically removed support for fclose> > > (stdin). Are>> > > > > >> you certain you want to restore it? I think this needs more> > > analysis>> > > > > >> and resolution with the previous changes that removed the> > > fclose() of>> > > > > >> stdin, stdout, and stderr.>> > > > > >>>> > > > > >> On 12/10/2020 5:37 PM, Masayuki Ishikawa wrote:>> > > > > >>> Suzuki-san,>> > > > > >>>>> > > > > >>> Please send a PR (Pull Request) to>> > > > > >>> https://github.com/apache/incubator-nuttx-apps/>> > > > > >>>>> > > > > >>> On Thu, Dec 10, 2020 at 5:24 PM SUZUKI Keiji > > > wrote:>> > > > > >>>>> > > > > >>>> Hi,>> > > > > >>>>>> > > > > >>>> I use STM32F407G-DISC1 (MB997D) and build nuttx on macOS> > > Mojave (10.14.6).>> > > > > >>>>>> > > > > >>>> The following error occurs with the default configuration of>> > > > > >>>> stm32f4discovery:usbnsh.>> > > > > >>>>>> > > > > >>>> NuttShell (NSH) NuttX-10.0.0>> > > > > >>>> nsh> nsh: nsh_session: readline failed: 9>> > > > > >>>>>> > > > > >>>> The reason seems that instream->fs_fd is -1 instead of 0 in> > > the readline()>> > > > > >>>> function called by>> > > > > >>>> nsh_session().>> > > > > >>>>>> > > > > >>>> This error occurs in version 10.0-RC0 and after (I checked> > > 10.0-RC0, 10.0>> > > > > >>>> and current master)>> > > > > >>>> but does not occur in 9.1 and before (I checked 9.1, 8.2 and> > > 7.31).>> > > > > >>>>>> > > > > >>>> The following patch fixed it in my environment but I don't> > > know this is a>> > > > > >>>> correct fix.>> > > > > >>>>>> > > > > >>>> === from here ===>> > > > > >>>>>> > > > > >>>> diff --git a/nshlib/nsh_usbconsole.c b/nshlib/nsh_usbconsole.c>> > > > > >>>> index 28f63bcc..768a621b 100644>> > > > > >>>> --- a/nshlib/nsh_usbconsole.c>> > > > > >>>> +++ b/nshlib/nsh_usbconsole.c>> > > > > >>>> @@ -77,8 +77,8 @@>> > > > > >>>>>> > > > > >>>> static void nsh_configstdio(int fd, FAR struct console_stdio_s> > > *pstate)>> > > > > >>>> {>> > > > > >>>> - /* Make sure the stdout, and stderr are flushed */>> > > > > >>>> ->> > > > > >>>> + /* Make sure the stdin is closed and the stdout, and stderr> > > are flushed>> > > > > >>>> */>> > > > > >>>> + fclose(stdin);>> > > > > >>>> fflush(stdout);>> > > > > >>>> fflush(stderr);>> > > > > >>>>>> > > > > >>>> @@ -88,6 +88,9 @@ static void nsh_configstdio(int fd, FAR struct>> > > > > >>>> console_stdio_s *pstate)>> > > > > >>>> dup2(fd, 1);>> > > > > >>>> dup2(fd, 2);>> > > > > >>>>>> > > > > >>>> + /* fdopen stdin */>> > > > > >>>> + fdopen(0, "r");>> > > > > >>>> +>> > > > > >>>> /* Setup the stdout */>> > > > > >>>>>> > > > > >>>> pstate->cn_outfd = 1;>> > > > > >>>>>> > > > > >>>> =>> > > > > >>>>>> > > > > >>>> Thanks,>> > > > > >>>> SUZUKI Keiji>> > > > > >>>>>> > > >> > >> >
Re: Error with stm32f4discovery:usbnsh
Is anybody reading this? I am not sure why my messages get lost.. how can I post to the message list? On 2020/12/13 22:19:01, Brennan Ashton wrote: > Yeah 100% agree which is why I need to look when I have a little more> > time to understand what is going on.> > > On Sun, Dec 13, 2020 at 2:12 PM Gregory Nutt wrote:> > >> > > See> > > https://mail-archives.apache.org/mod_mbox/nuttx-dev/202012.mbox/%3CCAKFLXYwes3pcDA2zXsL2FcwgCS4PecdmiP9srkGEtTaOoLEhMg%40mail.gmail.com%3E> > >> > > I don't think this is the correct solution since with Xiao Xiang's> > > recent changes, stdin should never be closed. But it does give some> > > clues about the nature of the problem: stdin is no valid; stdout is okay> > >> > > On 12/13/2020 4:07 PM, Brennan Ashton wrote:> > > > This is impacting all the usbnsh configurations. I can take another> > > > look later this evening> > > > https://github.com/apache/incubator-nuttx/pull/2526> > > >> > > > --Brennan> > > >> > > > On Fri, Dec 11, 2020 at 5:05 AM Gregory Nutt wrote:> > > >> Several other PRs specifically removed support for fclose (stdin). Are> > > >> you certain you want to restore it? I think this needs more analysis> > > >> and resolution with the previous changes that removed the fclose() of> > > >> stdin, stdout, and stderr.> > > >>> > > >> On 12/10/2020 5:37 PM, Masayuki Ishikawa wrote:> > > >>> Suzuki-san,> > > > > >>> Please send a PR (Pull Request) to> > > >>> https://github.com/apache/incubator-nuttx-apps/> > > > > >>> On Thu, Dec 10, 2020 at 5:24 PM SUZUKI Keiji wrote:> > > > > Hi,> > > > > > I use STM32F407G-DISC1 (MB997D) and build nuttx on macOS Mojave (10.14.6).> > > > > > The following error occurs with the default configuration of> > > stm32f4discovery:usbnsh.> > > > > > NuttShell (NSH) NuttX-10.0.0> > > nsh> nsh: nsh_session: readline failed: 9> > > > > > The reason seems that instream->fs_fd is -1 instead of 0 in the readline()> > > function called by> > > nsh_session().> > > > > > This error occurs in version 10.0-RC0 and after (I checked 10.0-RC0, 10.0> > > and current master)> > > but does not occur in 9.1 and before (I checked 9.1, 8.2 and 7.31).> > > > > > The following patch fixed it in my environment but I don't know this is a> > > correct fix.> > > > > > === from here ===> > > > > > diff --git a/nshlib/nsh_usbconsole.c b/nshlib/nsh_usbconsole.c> > > index 28f63bcc..768a621b 100644> > > --- a/nshlib/nsh_usbconsole.c> > > +++ b/nshlib/nsh_usbconsole.c> > > @@ -77,8 +77,8 @@> > > > > > static void nsh_configstdio(int fd, FAR struct console_stdio_s *pstate)> > > {> > > - /* Make sure the stdout, and stderr are flushed */> > > -> > > + /* Make sure the stdin is closed and the stdout, and stderr are flushed> > > */> > > + fclose(stdin);> > > fflush(stdout);> > > fflush(stderr);> > > > > > @@ -88,6 +88,9 @@ static void nsh_configstdio(int fd, FAR struct> > > console_stdio_s *pstate)> > > dup2(fd, 1);> > > dup2(fd, 2);> > > > > > + /* fdopen stdin */> > > + fdopen(0, "r");> > > +> > > /* Setup the stdout */> > > > > > pstate->cn_outfd = 1;> > > > > > => > > > > > Thanks,> > > SUZUKI Keiji> > > > >
Re: Thread (Openthread) networking protocol & NuttX
Just to clarify, I don't think the ESP8266 would work as it is not a IEEE 802.15.4 radio - see also this thread https://github.com/openthread/ot-esp32/issues/17 I was also thinking that it should be possible to somehow build on top of Spinel something like USRSOCK to have a IEEE 802.15.4 radio alongside a host processor running NuttX. At the same time I would like to have the possibility to run the entire Openthread stack integrated with NuttX on one processor capable of IEEE 802.15.4. I think the nrf54820 would be a good start for both designs (Network Co-Processor along a host processor and single SoC). Has anybody looked into this? I am wondering how this would integrate with existing support for 6LowPan (http://docplayer.net/163084802-Nuttx-rtos-wifi-bluetooth-gregory-nutt.html) Thanks! Max On 2021/01/22 01:16:57, Grr wrote: > I didn't know anything about it but Spinel seems the perfect solution to> > connect NuttX to ESP8266 and have a dirt cheap solution for NuttX WiFi> > networking> > > El jue, 21 ene 2021 a las 17:07, Max Kriegleder ()> > escribió:> > > > Hi all,> > >> > > I am currently looking into thread networking protocol for IoT> > > applications - https://openthread.io/. There are several design> > > approaches with System-on-Chip (SoC) and Co-Processor (RCP, NCP)> > > designs. Has anybody looked into integrating thread into NuttX> > > regardless of the design approach? I saw that Zephyr OS does support> > > thread> > > https://docs.zephyrproject.org/latest/reference/networking/thread.html> > > and I am hoping it wouldn't be too difficult to integrate it into NuttX.> > >> > > Thanks!> > > Max> > >> > >> >
Thread (Openthread) networking protocol & NuttX
Hi all, I am currently looking into thread networking protocol for IoT applications - https://openthread.io/. There are several design approaches with System-on-Chip (SoC) and Co-Processor (RCP, NCP) designs. Has anybody looked into integrating thread into NuttX regardless of the design approach? I saw that Zephyr OS does support thread https://docs.zephyrproject.org/latest/reference/networking/thread.html and I am hoping it wouldn't be too difficult to integrate it into NuttX. Thanks! Max