irtrans autoconnect option wish

All LINUX related questions (Installation & usage)

Moderator: marcus

irtrans autoconnect option wish

Postby nodepeeker » Sat 23. May 2009, 11:28

Hi,

I let my ethernet irtrans get its IP from my ISP DHCP server in the modem.

So I use this command line to start irtrans:
sudo /usr/local/irtrans/irserver -daemon -pidfile /var/run/irserver.pid -timestamp -logfile /var/log/automation/irserver.log -loglevel 4 10.0.1.9

What I would love is either to pass the mac address to irserver:
sudo /usr/local/irtrans/irserver -daemon -pidfile /var/run/irserver.pid -timestamp -logfile /var/log/automation/irserver.log -loglevel 4 00:50:c2:52:78:ea

OR preferrably a parameter like 'autoconnect'

sudo /usr/local/irtrans/irserver -daemon -pidfile /var/run/irserver.pid -timestamp -logfile /var/log/automation/irserver.log -loglevel 4 autoconnect

which would connect to the 1st/only ethernet irtrans hardware on the network.

I may get round to writing a script option that will add this, but I was thinking your irtrans software could parse the arp table for completes and check if its the ether/irtrans and if it is then get the IP from the arp table and use that.

I was thinking that if I wrote a linux /etc/init.d/irserver {start|status|stop} script I would do it in that, ensuring correct runlevel (ie network up).

and then the icing on the cake would be to have an extra function in irclient (/usr/local/irtrans/irclient localhost ) that if it fails to connect to the local host it starts irserver... but thats just OTT :)
nodepeeker
 
Posts: 18
Joined: Mon 4. May 2009, 18:14

Re: irtrans autoconnect option wish

Postby IRTrans » Sat 23. May 2009, 16:05

Autoconnect is already possible: Simply use "lan" instead of the IP address.

Please note that this might not work on multihomed systems.

Connecting via the MAC Address is not possible - to be honest it does not really make sense from my point of view.

Another way would be to simply assign a fixed IP Address to the IRTrans using ip_assign or the web interface.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: irtrans autoconnect option wish

Postby nodepeeker » Sat 23. May 2009, 20:54

Cheers
nodepeeker
 
Posts: 18
Joined: Mon 4. May 2009, 18:14


Return to LINUX

Who is online

Users browsing this forum: No registered users and 13 guests