You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Flavio Castro Alves Filho <fl...@gmail.com> on 2021/06/03 13:26:56 UTC

ESP8266 support

Hello,

I am working on the integration between a STM32F4Discovery based board
to a ESP8266-WROOM-2 module, in order to have WiFi connectivity.

My plan is to implement a thread using USRSOCK and the ESP8266
functions available in netutils, using as reference the work
previously done with GS2200m.

Looking at NuttX source code, I couldn't find any example of an
application that implements the ESP8266 functions. Is there any place
where I can find reference for this use?

Best regards,

Flavio

-- 
Flavio de Castro Alves Filho

flavio.alves@gmail.com
Twitter: http://twitter.com/#!/fraviofii
LinkedIn profile: www.linkedin.com/in/flaviocastroalves

Re: ESP8266 support

Posted by Gregory Nutt <sp...@gmail.com>.
> Then I had 2 doubts:
>
> 1. How to use the UART interface inside a device driver?

Do you mean the apps/netutils/esp8266 code?  That is not a device 
driver, it is an application.  It uses the serial driver interface 
/dev/ttySx:  open(), close(), read(), write(), etc.

Inside of the OS under nuttx/drivers, you can open the serial driver 
using file_open(), file_read(), file_write(), file_close().  These are 
driver/file system interfaces for use inside of the OS where there may 
not be consistent file descriptors.

> 2. Is it ok to duplicate the AT commands? Maybe this question was answered :-)

INVIOLABLES.md:

      99 ### Sometimes Code Duplication is OK
     100
     101   - Sometimes is better to duplicate some logic than to 
introduce coupling.



Re: ESP8266 support

Posted by Flavio Castro Alves Filho <fl...@gmail.com>.
To be honest, I started to work that way :-)

Then I had 2 doubts:

1. How to use the UART interface inside a device driver?
2. Is it ok to duplicate the AT commands? Maybe this question was answered :-)

Best regards,

Flavio

Em qui., 3 de jun. de 2021 às 12:53, Gregory Nutt
<sp...@gmail.com> escreveu:
>
>
> >> Looking at NuttX source code, I couldn't find any example of an
> >> application that implements the ESP8266 functions. Is there any place
> >> where I can find reference for this use?
> > There is a separate application in apps/netutils/esp8266.  I've never
> > tried it though, so I don't now about its state.
>
> There is also the the apps/wireless/gs2200m that is a very mature,
> USRSOCK wireless interface and should be very similar to an ESP8266
> USRSOCK solution.
>
> The apps/netutils/esp8266 is a standalone C callable library for ESP8266
> interfacing.  It was contributed by Pierre-noel Bouteville in 2016 and I
> am not aware that it has every been used since then.
>
> I really should have a USRSOCK interface and should reside at
> apps/wireless/esp8266.
>


-- 
Flavio de Castro Alves Filho

flavio.alves@gmail.com
Twitter: http://twitter.com/#!/fraviofii
LinkedIn profile: www.linkedin.com/in/flaviocastroalves

Re: ESP8266 support

Posted by Gregory Nutt <sp...@gmail.com>.
>> Looking at NuttX source code, I couldn't find any example of an
>> application that implements the ESP8266 functions. Is there any place
>> where I can find reference for this use?
> There is a separate application in apps/netutils/esp8266.  I've never
> tried it though, so I don't now about its state.

There is also the the apps/wireless/gs2200m that is a very mature, 
USRSOCK wireless interface and should be very similar to an ESP8266 
USRSOCK solution.

The apps/netutils/esp8266 is a standalone C callable library for ESP8266 
interfacing.  It was contributed by Pierre-noel Bouteville in 2016 and I 
am not aware that it has every been used since then.

I really should have a USRSOCK interface and should reside at 
apps/wireless/esp8266.


Re: ESP8266 support

Posted by Flavio Castro Alves Filho <fl...@gmail.com>.
Em qui., 3 de jun. de 2021 às 11:33, Abdelatif Guettouche
<ab...@gmail.com> escreveu:
>
> > Looking at NuttX source code, I couldn't find any example of an
> > application that implements the ESP8266 functions. Is there any place
> > where I can find reference for this use?
>
> There is a separate application in apps/netutils/esp8266.  I've never
> tried it though, so I don't now about its state.
>

That's the library I am currently working on. There is no application
there, only the functions.

Re: ESP8266 support

Posted by Abdelatif Guettouche <ab...@gmail.com>.
> Looking at NuttX source code, I couldn't find any example of an
> application that implements the ESP8266 functions. Is there any place
> where I can find reference for this use?

There is a separate application in apps/netutils/esp8266.  I've never
tried it though, so I don't now about its state.


On Thu, Jun 3, 2021 at 3:28 PM Grr <ge...@gmail.com> wrote:
>
> There's a protocol to use SPI as network link, which obviously has much
> bigger bandwidth and potential
>
> If you're not in a hurry to implement the solution and are interested in
> developing a better one, count me in
>
> El jue., 3 de jun. de 2021 9:02 AM, Flavio Castro Alves Filho <
> flavio.alves@gmail.com> escribió:
>
> > Hello,
> >
> > I am using UART.
> >
> >
> > Em qui., 3 de jun. de 2021 às 10:44, Grr <ge...@gmail.com> escreveu:
> > >
> > > What physical link will you use to connect 8266 and main board?
> > >
> > > Your project is very interesting and opens a lot of potential for
> > > inexpensive distributed control
> > >
> > > El jue., 3 de jun. de 2021 8:27 AM, Flavio Castro Alves Filho <
> > > flavio.alves@gmail.com> escribió:
> > >
> > > > Hello,
> > > >
> > > > I am working on the integration between a STM32F4Discovery based board
> > > > to a ESP8266-WROOM-2 module, in order to have WiFi connectivity.
> > > >
> > > > My plan is to implement a thread using USRSOCK and the ESP8266
> > > > functions available in netutils, using as reference the work
> > > > previously done with GS2200m.
> > > >
> > > > Looking at NuttX source code, I couldn't find any example of an
> > > > application that implements the ESP8266 functions. Is there any place
> > > > where I can find reference for this use?
> > > >
> > > > Best regards,
> > > >
> > > > Flavio
> > > >
> > > > --
> > > > Flavio de Castro Alves Filho
> > > >
> > > > flavio.alves@gmail.com
> > > > Twitter: http://twitter.com/#!/fraviofii
> > > > LinkedIn profile: www.linkedin.com/in/flaviocastroalves
> > > >
> >
> >
> >
> > --
> > Flavio de Castro Alves Filho
> >
> > flavio.alves@gmail.com
> > Twitter: http://twitter.com/#!/fraviofii
> > LinkedIn profile: www.linkedin.com/in/flaviocastroalves
> >

Re: ESP8266 support

Posted by Flavio Castro Alves Filho <fl...@gmail.com>.
Em qui., 3 de jun. de 2021 às 11:28, Grr <ge...@gmail.com> escreveu:
>
> There's a protocol to use SPI as network link, which obviously has much
> bigger bandwidth and potential
>
> If you're not in a hurry to implement the solution and are interested in
> developing a better one, count me in

My hardware is closed for now, and I have to leave with this UART communication.

There is an issue with my hardware where there is no GPIO defined to
control the power of the module. So, when the module gets stuck, I
can't recover without rebooting everything :-(

In the past, I have implemented the AT commands to drive the module.
But not on Nuttx. Reading the available library, the approach seems
fine to me.

Regarding SPI communication, this can indeed be a nice idea. We can
work on this for the STM32F4DISCOVERY board. And in future reviews of
my board I can change the ESP8266 connections.

Best regards,

Flavio

>
> El jue., 3 de jun. de 2021 9:02 AM, Flavio Castro Alves Filho <
> flavio.alves@gmail.com> escribió:
>
> > Hello,
> >
> > I am using UART.
> >
> >
> > Em qui., 3 de jun. de 2021 às 10:44, Grr <ge...@gmail.com> escreveu:
> > >
> > > What physical link will you use to connect 8266 and main board?
> > >
> > > Your project is very interesting and opens a lot of potential for
> > > inexpensive distributed control
> > >
> > > El jue., 3 de jun. de 2021 8:27 AM, Flavio Castro Alves Filho <
> > > flavio.alves@gmail.com> escribió:
> > >
> > > > Hello,
> > > >
> > > > I am working on the integration between a STM32F4Discovery based board
> > > > to a ESP8266-WROOM-2 module, in order to have WiFi connectivity.
> > > >
> > > > My plan is to implement a thread using USRSOCK and the ESP8266
> > > > functions available in netutils, using as reference the work
> > > > previously done with GS2200m.
> > > >
> > > > Looking at NuttX source code, I couldn't find any example of an
> > > > application that implements the ESP8266 functions. Is there any place
> > > > where I can find reference for this use?
> > > >
> > > > Best regards,
> > > >
> > > > Flavio
> > > >
> > > > --
> > > > Flavio de Castro Alves Filho
> > > >
> > > > flavio.alves@gmail.com
> > > > Twitter: http://twitter.com/#!/fraviofii
> > > > LinkedIn profile: www.linkedin.com/in/flaviocastroalves
> > > >
> >
> >
> >
> > --
> > Flavio de Castro Alves Filho
> >
> > flavio.alves@gmail.com
> > Twitter: http://twitter.com/#!/fraviofii
> > LinkedIn profile: www.linkedin.com/in/flaviocastroalves
> >



-- 
Flavio de Castro Alves Filho

flavio.alves@gmail.com
Twitter: http://twitter.com/#!/fraviofii
LinkedIn profile: www.linkedin.com/in/flaviocastroalves

Re: ESP8266 support

Posted by Grr <ge...@gmail.com>.
There's a protocol to use SPI as network link, which obviously has much
bigger bandwidth and potential

If you're not in a hurry to implement the solution and are interested in
developing a better one, count me in

El jue., 3 de jun. de 2021 9:02 AM, Flavio Castro Alves Filho <
flavio.alves@gmail.com> escribió:

> Hello,
>
> I am using UART.
>
>
> Em qui., 3 de jun. de 2021 às 10:44, Grr <ge...@gmail.com> escreveu:
> >
> > What physical link will you use to connect 8266 and main board?
> >
> > Your project is very interesting and opens a lot of potential for
> > inexpensive distributed control
> >
> > El jue., 3 de jun. de 2021 8:27 AM, Flavio Castro Alves Filho <
> > flavio.alves@gmail.com> escribió:
> >
> > > Hello,
> > >
> > > I am working on the integration between a STM32F4Discovery based board
> > > to a ESP8266-WROOM-2 module, in order to have WiFi connectivity.
> > >
> > > My plan is to implement a thread using USRSOCK and the ESP8266
> > > functions available in netutils, using as reference the work
> > > previously done with GS2200m.
> > >
> > > Looking at NuttX source code, I couldn't find any example of an
> > > application that implements the ESP8266 functions. Is there any place
> > > where I can find reference for this use?
> > >
> > > Best regards,
> > >
> > > Flavio
> > >
> > > --
> > > Flavio de Castro Alves Filho
> > >
> > > flavio.alves@gmail.com
> > > Twitter: http://twitter.com/#!/fraviofii
> > > LinkedIn profile: www.linkedin.com/in/flaviocastroalves
> > >
>
>
>
> --
> Flavio de Castro Alves Filho
>
> flavio.alves@gmail.com
> Twitter: http://twitter.com/#!/fraviofii
> LinkedIn profile: www.linkedin.com/in/flaviocastroalves
>

Re: ESP8266 support

Posted by Flavio Castro Alves Filho <fl...@gmail.com>.
Hello,

I am using UART.


Em qui., 3 de jun. de 2021 às 10:44, Grr <ge...@gmail.com> escreveu:
>
> What physical link will you use to connect 8266 and main board?
>
> Your project is very interesting and opens a lot of potential for
> inexpensive distributed control
>
> El jue., 3 de jun. de 2021 8:27 AM, Flavio Castro Alves Filho <
> flavio.alves@gmail.com> escribió:
>
> > Hello,
> >
> > I am working on the integration between a STM32F4Discovery based board
> > to a ESP8266-WROOM-2 module, in order to have WiFi connectivity.
> >
> > My plan is to implement a thread using USRSOCK and the ESP8266
> > functions available in netutils, using as reference the work
> > previously done with GS2200m.
> >
> > Looking at NuttX source code, I couldn't find any example of an
> > application that implements the ESP8266 functions. Is there any place
> > where I can find reference for this use?
> >
> > Best regards,
> >
> > Flavio
> >
> > --
> > Flavio de Castro Alves Filho
> >
> > flavio.alves@gmail.com
> > Twitter: http://twitter.com/#!/fraviofii
> > LinkedIn profile: www.linkedin.com/in/flaviocastroalves
> >



-- 
Flavio de Castro Alves Filho

flavio.alves@gmail.com
Twitter: http://twitter.com/#!/fraviofii
LinkedIn profile: www.linkedin.com/in/flaviocastroalves

Re: ESP8266 support

Posted by Grr <ge...@gmail.com>.
What physical link will you use to connect 8266 and main board?

Your project is very interesting and opens a lot of potential for
inexpensive distributed control

El jue., 3 de jun. de 2021 8:27 AM, Flavio Castro Alves Filho <
flavio.alves@gmail.com> escribió:

> Hello,
>
> I am working on the integration between a STM32F4Discovery based board
> to a ESP8266-WROOM-2 module, in order to have WiFi connectivity.
>
> My plan is to implement a thread using USRSOCK and the ESP8266
> functions available in netutils, using as reference the work
> previously done with GS2200m.
>
> Looking at NuttX source code, I couldn't find any example of an
> application that implements the ESP8266 functions. Is there any place
> where I can find reference for this use?
>
> Best regards,
>
> Flavio
>
> --
> Flavio de Castro Alves Filho
>
> flavio.alves@gmail.com
> Twitter: http://twitter.com/#!/fraviofii
> LinkedIn profile: www.linkedin.com/in/flaviocastroalves
>