Skip to content
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

Custom AT firmware #95

Open
davidcutting42 opened this issue Nov 22, 2020 · 10 comments
Open

Custom AT firmware #95

davidcutting42 opened this issue Nov 22, 2020 · 10 comments
Assignees
Labels
Enhancement New feature or request
Milestone

Comments

@davidcutting42
Copy link

I would be interested in developing custom ESP8266 AT firmware, based on the current source code, that could provide the following:

  • A server for WebThrottle-EX
  • Real mDNS support
  • Possibly provisioning support in AP mode.

Any other capabilities that we would want? This is more of a stopgap solution before (hopefully) the ESP32 replaces the entire arduino/esp8266 mess come v4.0.0

Obviously, we would have to have an automated program that can set up the ESP with new firmware using the Arduino as a passthrough, and two (maybe just one) extra jumpers would be required.

@davidcutting42 davidcutting42 added the Enhancement New feature or request label Nov 22, 2020
@davidcutting42 davidcutting42 added this to the v3.1.0 milestone Nov 22, 2020
@davidcutting42
Copy link
Author

And just to be clear, the CS would still be compatible with stock AT firmware. Additional commands would be extras that could be discovered by the CS using a "discover" AT command

@Asbelos
Copy link
Contributor

Asbelos commented Nov 22, 2020

Its likely that custom firmware would be incompatible with existing wifi libraries as we would have multiple processes sending or listening on the wifi serial.

We could manage this if we control all AT traffic as we do now but this woukd conflict with @grbba s networking rewrite.

@FrightRisk
Copy link
Member

FrightRisk commented Nov 22, 2020 via email

@grbba
Copy link
Contributor

grbba commented Nov 22, 2020

No you can't have both at the same time. Actually the library i use is based on the AT 1.7 or AT 2.0 firmware and then in the library provides the same API as the Ethernet library which make its use much simpler. The WiFi library then adds a lot of additional features such as AP setup delete preexisting settings etc etc ... I didn't yet implement those yet to recreate the existing flow but that will be the next to do item on my list.

So we could build a Sketch ( i don't call it firmware its not the same thing for me ) on the ESP which does the networking using the standard WiFi libraries from the ESP framework and then send data over serial to the Arduino. But as discussed in the beginning this idea wasn't going forward as that would have a user not only flash the Arduino with the CommandStation sketch but also the ESP with another sketch.

I wouldn't advise to build a custom firmware, albeit tempting, it adds just another layer of complexity, debugging, support etc etc for which we may not have the ressources, Just stick with what is available and don't reinvent the wheel.

@grbba
Copy link
Contributor

grbba commented Nov 22, 2020

@davidcutting42 Just for clarification ... What do you understand by firmware ? Difference with a sketch ? If the whole CommandStation would run on an ESP the only difference for me would be that i wouldn't have to rely on the current WifiEspAT library. The ESP Wifi library has the same API as the Ethernet one so no real code changes i would say except refactoring some class names i'd say.

@Asbelos
Copy link
Contributor

Asbelos commented Nov 22, 2020 via email

@davidcutting42
Copy link
Author

Yeah, so just to be clear, this is an extension of the AT firmware. We would basically be adding extra AT commands for things like taking care of the web server, etc. So it would be the same API as the current AT command set, with some extra commands. Am I making any sense?

@Asbelos
Copy link
Contributor

Asbelos commented Nov 22, 2020 via email

@FrightRisk
Copy link
Member

So we wrote our own ethernet too possibly. Has anyone looked at the WIFI code in the esp8266 folder of the previous version of DCC++ EX? That uploads to a thingie

@Asbelos
Copy link
Contributor

Asbelos commented Dec 7, 2020 via email

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

No branches or pull requests

4 participants