Coder Social home page Coder Social logo

esp_bridge's Introduction

esp_bridge

This is source code for esp8266 support bridge for arduino or any MCU using SLIP protocol via Serial port. ###Library for arduino: https://github.com/tuanpmt/espduino

If you want using only ESP8266, you can find the Native MQTT client library for ESP8266 work well here: https://github.com/tuanpmt/esp_mqtt

Warning

This project only execute commands from other MCU via Serial port (like arduino).

Features

  • Rock Solid wifi network client for Arduino (of course need to test more and resolve more issues :v)
  • More reliable than AT COMMAND library (Personal comments)
  • Firmware applications written on ESP8266 can be read out completely. For security applications, sometimes you should use it as a Wifi client (network client) and other MCU with Readout protection.
  • It can be combined to work in parallel with the AT-COMMAND library
  • MQTT module:
    • MQTT client run stable as Native MQTT client (esp_mqtt)
    • Support subscribing, publishing, authentication, will messages, keep alive pings and all 3 QoS levels (it should be a fully functional client).
    • Support multiple connection (to multiple hosts).
    • Support SSL
    • Easy to setup and use
  • REST module:
    • Support method GET, POST, PUT, DELETE
    • setContent type, set header, set User Agent
    • Easy to used API
    • Support SSL
  • WIFI module:

Installations

You can found here for instructions: https://github.com/tuanpmt/espduino

Compile

git clone --recursive https://github.com/tuanpmt/esp_bridge
cd esp_bridge
make all

Limited

It is not completely tested. Welcome your submitting issues.

Contributing

There is very much needed module for this library, welcome your pull request:

Donations

Invite me to a coffee Donate

Authors:

Tuan PM

LICENSE - "MIT License"

Copyright (c) 2014-2015 Tuan PM, https://twitter.com/tuanpmt

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

esp_bridge's People

Contributors

tuanpmt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp_bridge's Issues

Incorrect user agent spelling?

The default user agent is spelled ESPDRUINO instead of ESPDUINO, and I think the extra R means that the array is 1 character shorter than it should be (but is correct if it were spelled without the R).

#5

version of sdk

Hi, I try to use your espduino for SSL connection. I burn the firmware that is already provided in espduino, and write my arduino program, everything works.
Later I try to modify the firmware a little bit, so I compile the firmware using things contained in esp_bridge. The compile is successful. However, after I burn the firmware and run the program again, this time the SSL connection fails. It shows Client handshake start. then Client handshake fail

So which SDK did you use to compile the esp_bridge? I am using v1.0.0

TCP fragments not being rejoined

Apologies in advance for improper terminology, I know next to nothing about TCP / IP / ICMP.

I think I have figured out that an issue I thought was with Espduino is actually a problem with how this library handles TCP fragments.

Based on tcpdump, it looks like some local servers I've been using for testing purposes split their response and end up with the HTTP/1.1 200 OK in one TCP fragment and the remainder of the fragment separately. Using the exact same app (e.g. with Python Flask, but also tested with others), if the TCP fragment is split up this way, any other browser or curl is able to reassemble the packets and gets a whole response, but my Espduino only gets the contents of the first packet, after which it waits 5 seconds and times out, reporting a 0 response code.

I added a line to the tcpclient_recv function in rest.c to help debug:

INFO("DEBUG:\n%s\n\n", pdata);

And the output as I anticipated is EXTRA DEBUG: HTTP/1.1 200 OK (but nothing else) when the TCP packet is split (they consistently end up getting split right after this part, with the remainder of headers and the body in the next packet).

When the TCP packet is not split (because I'm serving through nginx or mitmproxy, which join the split packets), the response for the exact same code is:

EXTRA DEBUG: HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 38
this: that
Server: Werkzeug/0.10.4 Python/3.4.3
Date: Mon, 14 Sep 2015 07:17:15 GMT

<html><body>hello world!</body></html>

I'm going to work on trying to figure out why it isn't handling split packets like other apps do.

Source generate different .bin from espduino

Hello, I am trying to use this esp_bridge code with smartconfig. I can use smartconfig and SLIP seems to be function properly. Unfortunately, it cant send mqtt data to 2lemetry. Using firmware you put in espduino repository, I can send mqtt to 2lemetry.

Do you use different source code to generate that bin? e.g. using compiled code from this repo, esp will enter softap mode, while firmware in espduino put the module into station mode.

Emulator?

It'd be really great to have a Python script or something running on the Mac/PC side that emulates this bridge and dumps verbose debugging information - I've found it sort of hard to debug my Arduino sketches without stubbing out all of my network calls since everything wants the UART.

As a side benefit, this would make it easier to attach Charles or Wireshark to inspect communication on the wire.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.