Posts by Johnny Elton

    I've got 2 N-lines from different people, and what I'd like mgcamd to do is


    Try line 1 ------ reply in X seconds, all good
    no reply in X seconds, try line 2...


    or even send the ECM to both servers, and use whichever reply comes first. Hopefully a bit of redundancy will reduce glitching.


    I've tried:


    CWS = host1 port1 etc etc etc
    CWS = host2 port2 etc etc etc


    and also



    CWS = host1 port1 etc etc etc
    CWS_MULTIPLE = host2 port2 etc etc etc


    but it seems to nearly always use the first line, even retrying and retrying and retrying when there's no reply, instead of trying the second line.


    Is there a way to configure mgcamd to use 2 lines efficiently?

    I like to be able to keep an eye on Mgcamd's logging output as I'm playing around, and as you know it can send it out to a UDP port.
    So I set the logging option in mg_cfg to

    Code
    L: { 03 } 192.168.0.5 29000

    and on the PC (Ubuntu laptop on .5) use netcat to view it

    Code
    nc -u -l -vv 29000


    which works fine.


    However, as I have a few different PCs on my home network, it was a pain in the arse having to change mg_cfg and restart if I wanted to view the output with a different PC.


    I tried setting mgcamd to send it to the broadcast address 192.168.0.255 29000 - but that didn't work. No problem I thought, I'll get mgcamd to send to my home server (ie an ancient laptop :-) ) and just broadcast it from there.


    Fuck me, something so simple has been doing my head in!


    I tried various approaches with netcat, but netcat couldn't open a broadcast connection

    Code
    y@ubuntu:~$ echo "test" | nc -u -vv 192.168.0.255 29123
    nc: connect to 192.168.0.255 port 29123 (udp) failed: Permission denied


    so after a bit of googling I moved to socat to do the forwarding on the server, eventually arriving with

    Code
    socat EDP4-RECVFROM:29000,fork UDP4-SENDTO:192.168.0.255:29001,broadcast


    But with the data being forwarded, when I try to receive it with netcat an a PC, it only gets one line, and then just sits there!

    Code
    nc -u -l -vv 29000


    AAARRRGGGGHHHHHHH! I really thought that even to a Linux & networking imbecile like me this would be simple!


    Hopefully some of the experts can tell me what stupid mistake I'm making!

    Cheers for that, thatfellow!


    I had two little probs along the way: (I'm using Ubuntu Server 14.04, and PuTTY from a Ubuntu laptop)


    As well as doing
    [CODEsudo ]passwd root blahblah[/CODE]
    to set a root pw, and

    Code
    sudo passwd - u root


    to unlock it, I also had to do this to enable the account
    http://linuxconfig.org/allow-s…ubuntu-14-04-linux-server


    And then when the script got to the first (y/n) prompt, the whole terminal filled with yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy down the left!
    I removed the

    Code
    yes |

    commands from the script, and it then ran perfectly (with me manually choosing 'y' - what a chore!)


    One question, as I ran it about 4 times before I realised the problem, with this mess anything up in the future?
    (the only errors I spotted was

    Code
    mkdir

    saying the directories already existed...


    Thanks again mate!