Skip to content

This is a networking component for ESP controllers, based on ESP-IDF and providing basic communication features (TCP/UDP clients, UPnP) but also a captive portal, a webserver, and firmware updates handling from a web page.

License

Notifications You must be signed in to change notification settings

peergum/esp-comm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esp-comm build

esp-comm logo

Disclaimer: This code is not connected to (and even less endorsed by) the Espressif company - I'm a big fan and user of ESP chips, but that's all.

This component is a collection of objects to ease Wifi comms in projects, and it relies on the ESP-IDF Framework from Espressif. This code targets professional projects, or hobbyists who came to appreciate the ESP-IDF Framework.

I created it in order not to keep reinventing the wheel each time a project needs IP features over Wifi, like a tiny web interface to set up a wifi password, TCP or UDP clients, UPnP, etc...

Most of the code is mine, possibly occasionally flawed, and UPnP is adapted from TinyUPnP which was initially written for the Arduino framework. If you like Arduino, great, I started on it too, but the obvious ease of use for newbies also has a bunch of downsides. Each one their own... Just don't come whining about a port to Arduino, I'm not interested: I suffered enough porting that UPnP part from Arduino to ESP-IDF, and I tend to walk forward, not backwards.


Sponsors

A big thank you to our sponsors, with a reminder you guys get top priority on new requests or bug fixes...


Preamble

This component is written for the ESP-IDF framework, version 5.0 and above.

Please don't ask to make it work for versions under 5.0, I have no time for that at this point. If anyone wants to create and maintain a branch for previous versions of the framework, feel free to do it, but it will be a constant work porting the new features and kind of backward IMHO.


Setup and usage

Component installation

Clone the repository in the components folder in your project, or add it there as a submodule, then add esp-comm under the REQUIRES directives

Usage

Use the following classes as required:

  • Wifi
  • CaptivePortal
  • WebServer (includes APIs, Firmware Updates...)
  • TCPClient
  • UDPClient
  • UPnP (through Wifi class)

Additionally these classes can be of use, depending:

  • IPAddress
  • Timer

Manual/Documentation

See wiki

Examples

You can compile the example project right inside the example/basic folder (it uses a relative link to the component itself, using the extra_component_dirs directive in the top CMakeLists.txt file)

To Do / Coming Soon...

  • TCP Server -> 0% (should be easy though)
  • UDP Server -> 0% (should be easy too)
  • Web Server (with APIs/dynamic pages) -> done
  • File Server -> done
  • Firmware Updater -> 95% (needs a few changes)
  • Captive Portal -> 90% (assemble the elements above to build a simple portal )
  • Documentation

Pending Issues

Please open relevant issues, with details. Priorities as:

  1. Blocking fixes
  2. Non-blocking fixes
  3. Feature adjustments
  4. New features

Help, anyone?

I'm currently working alone on this, on my spare time. If you want to help, here's how:

  • Help fix/extend/improve code, by submitting a pull request
  • You could prefer to fork your own repo. That's fine with me, but don't come whining if this one keeps getting better and better ;-P You can be a team player, or not. Your choice, not mine. Also, sometimes people opinions and choices diverge, that's life ;)
  • Star this repo to make it more "reputable"
  • Donate? I haven't setup anything yet, but I will. In the meantime:
    • Listen to my music (search for PeerGum on Spotify, Apple Music, Youtube Music, etc... ). Every listen brings me a tiny fraction of a cent. Better than nothing :D

    • Send crypto (confirm rates before depositing - values under minimum crypto will be lost):

      CryptoAddressMin.Amount
      ETH/ERC-200x989f7290d5227d9d6451ab813900f1feb8a11c7b0.00001
      BTC3AAQHy983Bc9dYZ9WSrehKtg3fxGx3HEKe0.0001
      LTCLYiDAwKN3xUeTqWNYnVThTtYgPNbKBDfcD0.01
      ATOMcosmos1p8actjzzmxxr6dvwx3q05ykvpxyqjd2j4jn8pe1.00
      DASHXoxPsd6U2xVG7gBzirpuWDbDtq5bfHdDbE0.01
      MATIC0x989f7290d5227d9d6451ab813900f1feb8a11c7b6.50
    • Send me a virtual coffee (I like virtual Mint Tea or Chai too)

    • Be happy and enjoy using the code.

LICENSE

This library is released under GPLv3 License

Copyright (c) 2023, PeerGum. Some Parts derived from TinyUPnP and (c) their author.

WARNING/DISCLAIMER

Under the GPLv3 license, you're are obligated to disclose the source of your work if it includes this library, modified or not. If you don't, and try to patent your product, your patent could be invalidated by law. Either you share too, or you write your own code, there's no free lunch.

About

This is a networking component for ESP controllers, based on ESP-IDF and providing basic communication features (TCP/UDP clients, UPnP) but also a captive portal, a webserver, and firmware updates handling from a web page.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published