Sony's Developer World forum

    • Home
    • Forum guidelines

    Upcoming maintenance 

     

    Dear Customers and Partners.

    This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.

    This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.

    We apologize for any inconvenience.

     

     

    How to bring up the network in Spresense?

    Spresense
    10
    24
    14337
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • CGM11
      CGM11 @vivekbhadra last edited by

      Hello @vivekbhadra Sorry for getting in the middle, I am working with Cameras and AI too (for inferencing and to store a few selected ones). Your post caught my attention. Sending the images over WiFi is a good option and it will give you some freedom, BLE to another device for cleaning purposes could be good too, you have several cores, one of them could manage the cleaning process behind the scenes (Just guessing, I don't know what you are doing). Now, if you don't need the images all the time, you could replace the old ones by the new ones.

      Cheers and good luck with your project.

      CGM11

      Jaguar lives matter, believe it or not, you rely on them.
      Protect wildlife.

      I 1 Reply Last reply Reply Quote
      • TE-KarlKomierowski
        TE-KarlKomierowski DeveloperWorld last edited by

        Hi @vivekbhadra

        I think that the best way would to have Spresense send pictures over Wifi to free up the SD card.

        To get the wifi to work:
        https://developer.sony.com/develop/spresense/tutorials-sample-projects/spresense-tutorials/how-to-equip-spresense-with-wifi-connectivity

        I have a set of drivers for ESP8266 that have been ported to Spresense SDK. I will have to email them to you since I can't upload them here.

        BR

        vivekbhadra M 2 Replies Last reply Reply Quote
        • vivekbhadra
          vivekbhadra @TE-KarlKomierowski last edited by

          @TE-KarlKomierowski Thanks a lot Karl for sending the ESP8266 drivers. I will try integrating it in the Spresense SDK. Just to double check, has it already been integrated in the Spresense SDK? In that case I would not spend time on integrating it. But if not, do you have the Kconfig file for the drivers? Thanks again.

          TE-KarlKomierowski 1 Reply Last reply Reply Quote
          • TE-KarlKomierowski
            TE-KarlKomierowski DeveloperWorld @vivekbhadra last edited by

            @vivekbhadra said in How to bring up the network in Spresense?:

            @TE-KarlKomierowski Thanks a lot Karl for sending the ESP8266 drivers. I will try integrating it in the Spresense SDK. Just to double check, has it already been integrated in the Spresense SDK? In that case I would not spend time on integrating it. But if not, do you have the Kconfig file for the drivers? Thanks again.

            Hi, no they have not been integrated. I simply add them to my makefile to compile to object files to be linked together.

            vivekbhadra 1 Reply Last reply Reply Quote
            • vivekbhadra
              vivekbhadra @TE-KarlKomierowski last edited by

              @TE-KarlKomierowski ok thanks. I tried compiling the drivers source file and I am getting the below errors:

              esp8266/esp8266_main.c:23:18: fatal error: wifi.h: No such file or directory
               #include "wifi.h"
                                ^
              compilation terminated.
              ERROR: arm-none-eabi-gcc failed: 1
                     command: arm-none-eabi-gcc -M -fno-builtin -mabi=aapcs -Wall -Wstrict-prototypes -Wshadow -Wundef -g -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -isystem /home/vbhadra/spresense/sdk/../nuttx/include -D__KERNEL__ -pipe -gdwarf-3 -isystem /home/vbhadra/spresense/sdk/bsp/include -isystem /home/vbhadra/spresense/sdk/modules/include -I /home/vbhadra/spresense/sdk/drivers/lcd -I /home/vbhadra/spresense/sdk/../nuttx/drivers/video -I /home/vbhadra/spresense/sdk/drivers/esp8266 esp8266/esp8266_main.c
              make[1]: *** [.depend] Error 1
              esp8266/esp8266_main.c:23:18: fatal error: wifi.h: No such file or directory
               #include "wifi.h"
                                ^
              compilation terminated.
              

              I guess you might have grabbed the wifi.h from the nuttx tree? In case you still have the same header file, would you mind pass it to me please?

              Cheers

              TE-KarlKomierowski 1 Reply Last reply Reply Quote
              • TE-KarlKomierowski
                TE-KarlKomierowski DeveloperWorld @vivekbhadra last edited by

                Hi,

                The wifi.h file was just a plain header file holding my wifi credentials.
                Just remove it, or create it, and add the missing defines you will get when you build next time.
                SSID and password probably.

                @vivekbhadra said in How to bring up the network in Spresense?:

                @TE-KarlKomierowski ok thanks. I tried compiling the drivers source file and I am getting the below errors:

                esp8266/esp8266_main.c:23:18: fatal error: wifi.h: No such file or directory
                 #include "wifi.h"
                                  ^
                compilation terminated.
                ERROR: arm-none-eabi-gcc failed: 1
                       command: arm-none-eabi-gcc -M -fno-builtin -mabi=aapcs -Wall -Wstrict-prototypes -Wshadow -Wundef -g -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -isystem /home/vbhadra/spresense/sdk/../nuttx/include -D__KERNEL__ -pipe -gdwarf-3 -isystem /home/vbhadra/spresense/sdk/bsp/include -isystem /home/vbhadra/spresense/sdk/modules/include -I /home/vbhadra/spresense/sdk/drivers/lcd -I /home/vbhadra/spresense/sdk/../nuttx/drivers/video -I /home/vbhadra/spresense/sdk/drivers/esp8266 esp8266/esp8266_main.c
                make[1]: *** [.depend] Error 1
                esp8266/esp8266_main.c:23:18: fatal error: wifi.h: No such file or directory
                 #include "wifi.h"
                                  ^
                compilation terminated.
                

                I guess you might have grabbed the wifi.h from the nuttx tree? In case you still have the same header file, would you mind pass it to me please?

                Cheers

                1 Reply Last reply Reply Quote
                • vivekbhadra
                  vivekbhadra last edited by

                  @TE-KarlKomierowski I have now integrated it into the SPRESENSE SDK. I have attached the patch for the changes I had to make for integrating it into the sdk. Also, I have taken out the source code from the patch file.

                  From 3918a7c826016c307fc5b3af0012aff766c372bd Mon Sep 17 00:00:00 2001
                  From: Vivek Bhadra <vivek.bhadra@sony.com>
                  Date: Wed, 23 Oct 2019 14:02:16 +0100
                  Subject: [PATCH] Integrating the esp8266 wifi module in SPRESENSE sdk.
                  
                  ---
                   sdk/drivers/Kconfig                |   1 +
                   sdk/drivers/Makefile               |   1 +
                   sdk/drivers/esp8266/Kconfig        |  18 +
                   sdk/drivers/esp8266/Make.defs      |  48 ++
                   sdk/drivers/esp8266/esp8266.c      | 799 +++++++++++++++++++++++++++++
                   sdk/drivers/esp8266/esp8266.h      |  88 ++++
                   sdk/drivers/esp8266/esp8266_main.c | 121 +++++
                   sdk/drivers/esp8266/esp8266_main.h |  26 +
                   sdk/drivers/esp8266/license.txt    |  12 +
                   sdk/drivers/esp8266/wifi.h         |   7 +
                   10 files changed, 1121 insertions(+)
                   create mode 100644 sdk/drivers/esp8266/Kconfig
                   create mode 100644 sdk/drivers/esp8266/Make.defs
                   create mode 100644 sdk/drivers/esp8266/esp8266.c
                   create mode 100644 sdk/drivers/esp8266/esp8266.h
                   create mode 100644 sdk/drivers/esp8266/esp8266_main.c
                   create mode 100644 sdk/drivers/esp8266/esp8266_main.h
                   create mode 100644 sdk/drivers/esp8266/license.txt
                   create mode 100644 sdk/drivers/esp8266/wifi.h
                  
                  diff --git a/sdk/drivers/Kconfig b/sdk/drivers/Kconfig
                  index b4b87157..ca4247a7 100644
                  --- a/sdk/drivers/Kconfig
                  +++ b/sdk/drivers/Kconfig
                  @@ -5,5 +5,6 @@ source "$SDKDIR/drivers/sensors/Kconfig"
                   source "$SDKDIR/drivers/lcd/Kconfig"
                   source "$SDKDIR/drivers/video/Kconfig"
                   source "$SDKDIR/drivers/modem/Kconfig"
                  +source "$SDKDIR/drivers/esp8266/Kconfig"
                   
                   endmenu
                  diff --git a/sdk/drivers/Makefile b/sdk/drivers/Makefile
                  index f5256112..4f843a3d 100644
                  --- a/sdk/drivers/Makefile
                  +++ b/sdk/drivers/Makefile
                  @@ -44,6 +44,7 @@ include sensors$(DELIM)Make.defs
                   include lcd$(DELIM)Make.defs
                   include video$(DELIM)Make.defs
                   include modem$(DELIM)Make.defs
                  +include esp8266$(DELIM)Make.defs
                   
                   AOBJS = $(ASRCS:.S=$(OBJEXT))
                   COBJS = $(CSRCS:.c=$(OBJEXT))
                  diff --git a/sdk/drivers/esp8266/Kconfig b/sdk/drivers/esp8266/Kconfig
                  new file mode 100644
                  index 00000000..b5e97470
                  --- /dev/null
                  +++ b/sdk/drivers/esp8266/Kconfig
                  @@ -0,0 +1,18 @@
                  +#
                  +# For a description of the syntax of this configuration file,
                  +# see the file kconfig-language.txt in the NuttX tools repository.
                  +#
                  +
                  +menuconfig WIFI
                  +	bool "WIFI drivers"
                  +	---help---
                  +		WIFI device drivers.
                  +
                  +if WIFI
                  +
                  +config CONFIG_WIFI_ESP8266
                  +	bool "ESP8266 Wifi support"
                  +	default y
                  +	---help---
                  +		Enable driver for the ESP8266 Wifi
                  +endif
                  diff --git a/sdk/drivers/esp8266/Make.defs b/sdk/drivers/esp8266/Make.defs
                  new file mode 100644
                  index 00000000..abe37fbd
                  --- /dev/null
                  +++ b/sdk/drivers/esp8266/Make.defs
                  @@ -0,0 +1,48 @@
                  +############################################################################
                  +# lte/drivers/Make.defs
                  +#
                  +#   Copyright 2018 Sony Semiconductor Solutions Corporation
                  +#
                  +# Redistribution and use in source and binary forms, with or without
                  +# modification, are permitted provided that the following conditions
                  +# are met:
                  +#
                  +# 1. Redistributions of source code must retain the above copyright
                  +#    notice, this list of conditions and the following disclaimer.
                  +# 2. Redistributions in binary form must reproduce the above copyright
                  +#    notice, this list of conditions and the following disclaimer in
                  +#    the documentation and/or other materials provided with the
                  +#    distribution.
                  +# 3. Neither the name of Sony Semiconductor Solutions Corporation nor
                  +#    the names of its contributors may be used to endorse or promote
                  +#    products derived from this software without specific prior written
                  +#    permission.
                  +#
                  +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
                  +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
                  +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
                  +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
                  +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
                  +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
                  +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
                  +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
                  +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                  +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
                  +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                  +# POSSIBILITY OF SUCH DAMAGE.
                  +#
                  +############################################################################
                  +
                  +ifeq ($(CONFIG_WIFI),y)
                  +
                  +#ifeq ($(CONFIG_WIFI_ESP8266),y)
                  +CSRCS += esp8266.c
                  +CSRCS += esp8266_main.c
                  +#endif
                  +
                  +DEPPATH += --dep-path esp8266
                  +VPATH += :esp8266
                  +CFLAGS += $(shell $(INCDIR) $(INCDIROPT) "$(CC)" $(SDKDIR)$(DELIM)drivers$(DELIM)esp8266)
                  +
                  +endif
                  diff --git a/sdk/drivers/esp8266/wifi.h b/sdk/drivers/esp8266/wifi.h
                  new file mode 100644
                  index 00000000..bb087e06
                  --- /dev/null
                  +++ b/sdk/drivers/esp8266/wifi.h
                  @@ -0,0 +1,7 @@
                  +#ifndef __WIFI__
                  +#define __WIFI__
                  +#define SSID "1234"
                  +#define PASSWORD "1234"
                  +#define HOST_NAME "SPRESENSE"
                  +#define HOST_PORT 1234
                  +#endif 
                  -- 
                  2.17.1
                  
                  J 1 Reply Last reply Reply Quote
                  • M
                    Miguel Ángel Herranz @TE-KarlKomierowski last edited by

                    @TE-KarlKomierowski I would also like to receive the ESP8266 driver by mail, thanks.

                    TE-KarlKomierowski 1 Reply Last reply Reply Quote
                    • TE-KarlKomierowski
                      TE-KarlKomierowski DeveloperWorld @Miguel Ángel Herranz last edited by

                      Hi @Miguel-Ángel-Herranz

                      You should have them now, I just sent you an email.

                      Please let me know if it didn't work.

                      BR
                      Karl

                      F 1 Reply Last reply Reply Quote
                      • F
                        Furt Tech @TE-KarlKomierowski last edited by

                        This post is deleted!
                        TE-KarlKomierowski 1 Reply Last reply Reply Quote
                        • G
                          glassofbeer last edited by

                          This post is deleted!
                          G 1 Reply Last reply Reply Quote
                          • G
                            glassofbeer @glassofbeer last edited by

                            This post is deleted!
                            1 Reply Last reply Reply Quote
                            • TE-KarlKomierowski
                              TE-KarlKomierowski DeveloperWorld @Furt Tech last edited by

                              Hi @Furt-Tech

                              Maybe this post will clear some of your questions:

                              how-to-equip-spresense-with-wifi-connectivity

                              BR
                              Karl

                              F 1 Reply Last reply Reply Quote
                              • F
                                Furt Tech @TE-KarlKomierowski last edited by

                                @TE-KarlKomierowski Thanks but im looking for a bit more then the arduino ide...lol. Can you please get me a copy of the ESP8266 driver you mentioned. Thanks

                                1 Reply Last reply Reply Quote
                                • F
                                  Furt Tech last edited by

                                  @TE-KarlKomierowski please send me an email with a copy of the drivers for the esp model as you have done for the others in this post. Thank you.

                                  1 Reply Last reply Reply Quote
                                  • K
                                    klajd vrahoriti last edited by

                                    Hi @TE-KarlKomierowski, can you please send me by email the ESP8266 driver. Thank you in advance, ciao.

                                    1 Reply Last reply Reply Quote
                                    • TE-KarlKomierowski
                                      TE-KarlKomierowski DeveloperWorld last edited by

                                      Hi,

                                      I will try to find them, this was quite some time ago. And the drivers were not pure Nuttx drivers but ported Arduino drivers for Nuttx.

                                      I will have a look.

                                      BR
                                      Karl

                                      F 1 Reply Last reply Reply Quote
                                      • F
                                        Furt Tech @TE-KarlKomierowski last edited by

                                        @TE-KarlKomierowski That would be awesome! Yes anything that you may have will be helpful. i have been trying to port over a driver i wrote using the AT-cmd interface and some parsing ect. But my main struggle is integrating into nutx of course..

                                        I am just having trouble with getting the driver i made to function. my hope was i could see how the code you had used worked and maybe clue me in on my mistakes.

                                        My primary issue is getting the serial pins to communicate with the ESP. no matter what i include from the nutx library i cannot get serial communication between the AT and the ESP.

                                        1 Reply Last reply Reply Quote
                                        • J
                                          jlinusa @vivekbhadra last edited by

                                          @vivekbhadra Please kindly send me the driver you had integrated. Thanks!

                                          1 Reply Last reply Reply Quote
                                          • I
                                            Indriyam @CGM11 last edited by

                                            @cgm11 Hello. I am writing to ask were able to use the ESP8266 module and connect it to Spresense so that the Spresense board can access wifi (say home/public wifi or hotspot from our laptop) to send data (images, etc) to the required network?

                                            1 Reply Last reply Reply Quote
                                            • First post
                                              Last post
                                            Developer World
                                            Copyright © 2021 Sony Group Corporation. All rights reserved.
                                            • Contact us
                                            • Legal