Commit 454fb68a authored by D1plo1d's avatar D1plo1d

Getting mdns working with avahi on ubuntu. It still needs sudo but it works.

parent 669fe5b3
......@@ -14,22 +14,30 @@ If you want the newest, shiniest features, you can run Printrun from source usin
A precompiled version is available at http://koti.kapsi.fi/~kliment/printrun/
*Note:* Pronserve is not currently included in the windows binary.
## Mac OS X
A precompiled version is available at http://koti.kapsi.fi/~kliment/printrun/
*Note:* Pronserve is not currently included in the OSX binary.
## Linux
### Ubuntu/Debian
You can run Printrun directly from source, as there are no packages available yet. Fetch and install the dependencies using
`sudo apt-get install python-serial python-wxgtk2.8 python-pyglet`
1. `sudo apt-get install python-serial python-wxgtk2.8 python-pyglet python-tornado python-setuptools python-libxml2 python-gobject`
2. `sudo apt-get install avahi-daemon python-avahi`
3. `sudo easy_install https://github.com/D1plo1d/py-mdns/archive/master.zip`
### Fedora 15 and newer
### Fedora 15 and newer (untested)
You can run Printrun directly from source, as there are no packages available yet. Fetch and install the dependencies using
`sudo yum install pyserial wxpython pyglet`
1. `sudo yum install pyserial wxpython pyglet python-tornado`
2. `sudo easy_install libxml2`
2. `sudo easy_install https://github.com/D1plo1d/py-mdns/archive/master.zip`
### Archlinux
......@@ -39,6 +47,8 @@ Packages are available in AUR. Just run
and enjoy the `pronterface`, `pronsole`, ... commands directly.
*Note:* Pronserve is not currently included in the arch package.
# USING PRONTERFACE
When you're done setting up Printrun, you can start pronterface.py in the directory you unpacked it.
......@@ -53,16 +63,9 @@ See the Slic3r readme for more details on integration.
# USING PRONSERVE
Pronserve runs a server for remote controlling your 3D printer over your network. To use pronserve you need:
* python (ideally 2.6.x or 2.7.x),
* pyserial (or python-serial on ubuntu/debian) and
* tornado
* D1plo1d's py-mdns fork (https://github.com/D1plo1d/py-mdns)
* pybonjour
* bonjour for windows (Windows ONLY)
Pronserve runs a server for remotely monitoring and controlling your 3D printer over your network.
When you're done setting up Printrun, you can start `pronserve.py` in the directory you unpacked it. Once the server starts you can verify it's working by going to http://localhost:8888 in your web browser.
To start the server you can run `./pronserve.py` in the directory you git cloned printrun too. Once the server starts you can verify it's working by going to http://localhost:8888 in your web browser.
# USING PRONSOLE
......
......@@ -25,12 +25,15 @@ import textwrap
import SocketServer
import socket
import mdns
from mdns.service import servicegroup, service
import uuid
import re
import traceback
import argparse
from operator import itemgetter, attrgetter
from collections import deque
import codecs
sys.stdout = codecs.getwriter('utf8')(sys.stdout)
log = logging.getLogger("root")
__UPLOADS__ = "./uploads"
......@@ -262,8 +265,22 @@ class Pronserve(pronsole.pronsole, EventEmitter):
self.current_job = None
self.previous_job_progress = 0
self.silent = True
services = ({'type': '_construct._tcp', 'port': 8888, 'domain': "local."})
self.mdns = mdns.publisher().save_group({'name': self.settings.name, 'services': services })
self.init_mdns()
def init_mdns(self):
# create the group
group = servicegroup()
group.name = self.settings.name
# create the services
svc = service(type='_construct._tcp', port=8888, name='Pronsere',
sysname='training', state='SCHEMA-READY')
svc.txt = { }
group.services = [ svc ]
#services = ({'type': '_construct._tcp', 'port': 8888, 'domain': "local."})
#self.mdns = mdns.publisher().save_group({'name': self.settings.name, 'services': services })
self.mdns = mdns.publisher().save_group(group)
self.jobs.listeners.add(self)
def do_print(self):
......@@ -501,7 +518,6 @@ class PrintJobQueue(EventEmitter):
# Server Start Up
# -------------------------------------------------
parser = argparse.ArgumentParser(
description='Runs a 3D printer server using the Construct Protocol'
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment