NUT on Alix 2d2 with USB/serial adapter - dead-end?



  • Well I have an alix 2d2 running pfsense 2.0.  This hardware has only one physical serial port, so it really needs to be left for the console, in case I need to get back into it.

    So to connect an ancient APC smartUPS 620 I'm using a standard USB to Serial adapter, from Prolific Technology.  Its a PL2302 that gets used in almost everything, so its common.

    The OS sees

    ugen0.2: <prolific technology="" inc.="">at usbus0
    uplcom0: <prolific 0="" 2="" technology="" inc.="" usb-serial="" controller,="" class="" 0,="" rev="" 1.10="" 3.00,="" addr="">on usbus0</prolific></prolific> 
    ```and in /dev/ there appears /dev/ttyU0
    
    However the NUT gui does not allow me to chose /dev/ttyU0. 
    
    So these forums suggest to directly edit /usr/local/pkg/nut.xml and replace stuff as appropriate… However this is an alix and root is mounted RO.
    
    I have had this exact UPS working with 1.2.3 to a physical serial port in the past.
    
    How do I go forward from here?  Abandon the console and use a hardware serial port?  Or do I edit config.xml and reupload it?  Or manually twiddle the nut.xml somehow and get it back onto the CF card?
    
    What do you think?


  • From the shell, mount the filesystem as RW:

    
    /etc/rc.conf_mount_rw
    
    

    To mount RO when you're done:

    
    /etc/rc.conf_mount_ro
    
    


  • THANK YOU BRIANIST!

    Your reply is perfect, and let me mess with nut.xml to fix my problem.

    For completeness, once I'd mounted the partition read/write I then edited /usr/local/pkg/nut.xml
    then down in the Local Ports section I added another bit for /dev/ttyU0
                                    <option><name>/dev/ttyU0</name>
                                            <value>/dev/ttyU0</value></option>
    This was needed because despite being a USB tty port, it is a serial UPS and won't autodetect.

    Now I can graph those details from Cacti too.


  • Rebel Alliance Developer Netgate

    You should use /dev/cuaU0 for USB serial ports, not the tty device.


Log in to reply