Page 1 of 1

Adding multi-socket connections to the CUNO

Posted: Fri Oct 28, 2011 2:18 pm
by jrkalf
Recently with KidE and RDNZL we’ve been experimenting using our CUNO both on FHEM and DomotiGa simultaneously.

Having to compare FHEM and DomotiGa, I’d prefer using DomotiGa, but it lacks some of the features FHEM has in controlling my FS20 and FHT80b devices. So I needed a trick to let both programs talk to the same CUNO device.

The CUNO device is connected in my network, but the default firmware is compiled so it only allows for one socket connection at a time. I’m not well at letting two completely different programs share that one socket, even though they’re running on the same machine. I had to find a way to allow for two socket connections on the CUNO.

The answer was rather simple. It seemed that the device was already capable of doing so in the firmware’s sourcecode, but it had been disabled. Re-enabling is rather easy this way.

Find the following code lines in the makefile:

CSTANDARD = -std=gnu99
CDEFS = -DF_CPU=$(F_CPU)UL
and replace the last line as following:

CSTANDARD = -std=gnu99
CDEFS = -DF_CPU=$(F_CPU)UL -DTWO_CONNS
run: make clean && make && make usbprogram

voila, your CUNO is now a two socket CUNO