--- a/Beremiz_service.py Tue Nov 22 02:07:00 2011 +0100
+++ b/Beremiz_service.py Mon Nov 28 13:46:48 2011 +0100
@@ -471,7 +471,10 @@
# Configure and publish service
# Not publish service if localhost in address params
- if self.servicename is not None and self.ip_addr != "localhost" and self.ip_addr != "127.0.0.1":
+ if (self.servicename is not None and + self.ip_addr is not None and + self.ip_addr != "localhost" and + self.ip_addr != "127.0.0.1"): print "Publishing service on local network"
self.servicepublisher = ServicePublisher.ServicePublisher()
self.servicepublisher.RegisterService(self.servicename, self.ip_addr, self.port)
--- a/runtime/ServicePublisher.py Tue Nov 22 02:07:00 2011 +0100
+++ b/runtime/ServicePublisher.py Mon Nov 28 13:46:48 2011 +0100
@@ -50,13 +50,13 @@
self.service_name = 'Beremiz_%s.%s'%(name,self.service_type)
- # No ip params -> get host ip
- ip = self.gethostaddr()
self.server = Zeroconf.Zeroconf(ip)
+ print "MDNS brodcasting on :"+ip - # address: IP address as unsigned short, network byte order
+ ip = self.gethostaddr() + print "MDNS brodcasted service address :"+ip self.ip_32b = socket.inet_aton(ip)
self.server.registerService(
@@ -65,7 +65,6 @@
properties = self.serviceproperties))
- print "MDNS brodcasting on :"+ip
def UnRegisterService(self):
--- a/targets/LPC/__init__.py Tue Nov 22 02:07:00 2011 +0100
+++ b/targets/LPC/__init__.py Mon Nov 28 13:46:48 2011 +0100
@@ -1,6 +1,6 @@
from subprocess import Popen,PIPE
-from .. import toolchain_makefile
+from ..toolchain_makefile import toolchain_makefile class LPC_target(toolchain_makefile):