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

Can connect brewpi via WiFi #12

Open
m-mcgowan opened this issue Apr 10, 2015 · 1 comment
Open

Can connect brewpi via WiFi #12

m-mcgowan opened this issue Apr 10, 2015 · 1 comment
Milestone

Comments

@m-mcgowan
Copy link
Contributor

With the Spark Core being WiFi enabled, it makes sense to leverage this to get Wireless brewpi.

  • setup wifi credentials.
    • via Serial: the Web UI will accept the WiFI details and send these to the device via the script. This requires a new command in the uC to accept and set the wifi credentials using the api WiFi.setCredentials().
    • Using listening mode and the Spark app should also be an option. (The Web UI has a button that when clicked puts the device in listening mode to save users from having to open the case.)
  • is the uC a TCP client or server?
    • as a client: will have to continually monitor the connection, and reconnect when down. How to configure the IP to connect to? mDNS/zeroconf would avoid the need for configuration.
    • as server: no IP config needed on the spark, but on the rpi, unless zero conf is used. Also no need for the spark to continually reconnect.
    • use zeroconf to avoid IP config
  • brewpi.py discover command line param will list discovered uC devices. each device given with it's device ID. Default ID is MAC address. This is copied by the user into brewpi config to talk to a specific device?
  • how is the brewpi script configured to connect to either serial or wifi?
    • startup attempts to look on serial and broadcasted devices on mDNS
  • How does the device know which interface to use? There is only one global piStream object which will talk either over serial or WiFi. It may need to be a multiplexer object - route to serial and to any TCP connections. (this is what was done in the nice-firm repo - the code relies on the boost library but should be relatively easy to back port to the current brewpi code.)
@m-mcgowan m-mcgowan added this to the Sprint 5 milestone Apr 10, 2015
@elcojacobs
Copy link
Member

This has been implemented in develop with the help of @glibersat. Pyserial seems to be able to work with TCP sockets too, so it was a smaller effort than expect. The user can now just set a socket as serial port and it will work. The controller listens on both and sends data back to the latest connection that was used.

I have tried mDNS, but it added 10k to the build size, so I have omitted it. The Spark will now show it's IP address on screen and the user should add it to config.cfg.

More details can be found on the new wiki: https://wiki.brewpi.com/how-to-setup-wifi-on-the-brewpi-spark

Setting WiFi credentials via the web interface is not yet implemented.

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

No branches or pull requests

2 participants