Skip to content

Add Server functionality #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

Add Server functionality #58

wants to merge 5 commits into from

Conversation

mscosti
Copy link
Contributor

@mscosti mscosti commented Jul 11, 2019

This is still a work in progress, but opening it up for early feedback and suggestions.

  • Adds Server creation methods to esp32spi.py
    • Instantiates a server on the esp32 on the specified port and a specified socket that was previously requested
  • Adds a new example file that creates an access point from secrets.py and then a server on port 80
    • Logs when a device connects or disconnects from the access point
    • When a device hits <serverIP>:80 (like in their browser), send back simple HTML page that has a couple of anchor tags on it

Todo

  • rebase with master once Add Access point mode #57 is merged
  • Make the example code more polished and more fun.
  • Create a new helper class to manage server creation and management.
  • Thinking we could even go so far as to implement simple request handling. Something like:
       Server.on("<HttpMethod>", "</routeString>", callbackFn)
       ... 
       def callbackFn(data, socketToWriteTo):
    
    • This Might be confusing since the run loop would need to be handled outside code.py?
    • At the very least could have a method to check if a certain route is triggered?
    • Could instead have a more feature rich web server lib (like flask) live outside of this to keep it focused.
  • More cleanup
  • More testing
  • Fix linting errors + get green build

mscosti and others added 5 commits June 29, 2019 00:37
- channel needed to be in hex byte format.
- Add begining of a server example example program.
- TODO: figure out why cannot create AP w/ passphrase
@mscosti mscosti closed this Jul 11, 2019
@mscosti mscosti reopened this Jul 11, 2019
@mscosti mscosti closed this Jul 11, 2019
@siddacious
Copy link
Contributor

@mscosti Are you going to open a new PR for this?

@siddacious
Copy link
Contributor

Yes you are/did! Never mind me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants