OPNsense Forum

English Forums => General Discussion => Topic started by: polemon on April 01, 2015, 10:46:46 pm

Title: OPNsense as FAX server?
Post by: polemon on April 01, 2015, 10:46:46 pm
Hi, I want to build a FAX server out of a machine that I have lying around.

It's an older computer, with an analogue v.92 modem, and I thought maybe reusing it as a fax server.
I'll need a fax machine for some time (maybe a year) and I don't really see investing in one. So I'm looking for a small router OS, that can handle things like hylafax.

Is it possible to do that with OPNsense? With pfSense, this is pretty much impossible, so I'm trying my luck with OPNsense.

Yes I know, faxes are an old technology and everything. But still, it's only for a short while and also kind of a proof of concept.
Title: Re: OPNsense as FAX server?
Post by: franco on April 02, 2015, 10:30:02 am
Why is it impossible with pfSense?

I think it's quite possible. hylafax is in FreeBSD ports and can be compiled selectively, maybe even pulled from FreeBSD packages directly so you don't have to compile. We also have all binary utilities in the base system so you can build it from source on your running machine. Also, most drivers not compiled into the kernel are available as kernel modules in the base installation as well.

I don't think there is a huge demand for us to wrap up a fax package, but I could be wrong in the long run. Let me know how we can help. :)
Title: Re: OPNsense as FAX server?
Post by: polemon on April 03, 2015, 02:45:08 am
Why is it impossible with pfSense?
It's what I've been told when I was looking at pfSense for making a FAX server. I was told that support is selectively removed from the kernel, and the drivers are not available.
I don't know too much about it, when I was told that it's pretty much a no-go, then I started looking elsewhere.

I think it's quite possible. hylafax is in FreeBSD ports and can be compiled selectively, maybe even pulled from FreeBSD packages directly so you don't have to compile. We also have all binary utilities in the base system so you can build it from source on your running machine. Also, most drivers not compiled into the kernel are available as kernel modules in the base installation as well.
OK, that sounds reasonable. I was thinking of getting the ports source for FreeBSD http://www.freshports.org/comms/hylafax/ and just try to install that. Would that be a sensible approach?
Or should I compile the standard hylafax source http://www.freshports.org/comms/hylafax/ ?

I don't think there is a huge demand for us to wrap up a fax package, but I could be wrong in the long run. Let me know how we can help. :)
Erm, sure. I think I'm pretty alone in this, but as I said, I just hope I'm not gonna be using this thing for very long. I mean sure, the modem that I have in there, I'll keep that because why not. But the part about being forced to use analogue faxes is ridiculous, but it's due to some legal issues. I was told that a signature are only valid on paper and via FAX, but not on e-mail. The only exception is when I'd scan a printed paper and send that over e-mail, but they just support faxing them stuff. It's annoying, but I'm on the bottom end here, *I* have to comply, not them...

To be honest, it doesn't /have to/ be hylafax. It may as well be a different piece of software, that does the same thing. Hylafax was just the first thing that came to my mind, as it is a rather mature project that has been around for many years.
Title: Re: OPNsense as FAX server?
Post by: franco on April 03, 2015, 09:54:45 am
It's what I've been told when I was looking at pfSense for making a FAX server. I was told that support is selectively removed from the kernel, and the drivers are not available.
I don't know too much about it, when I was told that it's pretty much a no-go, then I started looking elsewhere.
We build all kernel drivers; maybe they are kernel modules then they have to be loaded via standard means. Maybe they are deactivated, but we sure can bring in those drivers into future releases of OPNsense and provide a test build to help you get going in the meantime. We try not to say no to trivial changes and think alignment with FreeBSD standards is a sustainable direction (as long as FreeBSD is healthy, hehe).

OK, that sounds reasonable. I was thinking of getting the ports source for FreeBSD http://www.freshports.org/comms/hylafax/ and just try to install that. Would that be a sensible approach?
Or should I compile the standard hylafax source http://www.freshports.org/comms/hylafax/ ?

The dependencies are pretty heavy and I am not sure if it works reasonably well without X11. Are you intending to make OPNsense a desktop box or do you want to write a web GUI plugin? It would probably be best to use the port and I can help you provide an up-to-date version of a ports tree with the hylafax dependencies completely refreshed (we only partially sync our ports tree for the software we need to keep the audit work low).

Looking at more lightweight solutions may be a good idea. I am not an expert on FAX software. Maybe somebody else can help, too.
Title: Re: OPNsense as FAX server?
Post by: polemon on April 03, 2015, 05:23:13 pm
This isn't supposed to be a desktop computer as such. It's pretty much going to be a computer downgraded to be a dedicated fax server exclusively. I was looking at a minimal OS to run this on, and my first thought was looking at Router-OSes, things like OpenWRT, pfSense, and now OPNsense.

The dependencies are pretty heavy and I am not sure if it works reasonably well without X11. Are you intending to make OPNsense a desktop box or do you want to write a web GUI plugin? It would probably be best to use the port and I can help you provide an up-to-date version of a ports tree with the hylafax dependencies completely refreshed (we only partially sync our ports tree for the software we need to keep the audit work low).

Looking at more lightweight solutions may be a good idea. I am not an expert on FAX software. Maybe somebody else can help, too.
Yeah, the list of requirements is pretty long ( https://www.freebsd.org/ports/comms.html#hylafax-6.0.6_2 ). It seems that HylaFAX+, which is a fork of the regular HylaFAX, is much lighter and has fewer requirements: http://hylafax.sourceforge.net/howto/install.php it also seems to be the more active project and has been tested on FreeBSD, so I guess it'd make more sense to look into getting this thing to run, doesn't it.

I think I'd first try to have things configured manually through the console, by editing config files and such, and do the whole GUI plugin thing later (mostly because I have no idea how to make those plugins).

How do I know, that the internal modem has been recognized by OPNsense? I was looking at what dmesg says, but I couldn't really see anything that says anything about serial interfaces (modems are serial interfaces, just like the regular serial interface present on the mainboard). I'd expect to see two serial interfaces.
Title: Re: OPNsense as FAX server?
Post by: polemon on April 04, 2015, 08:49:11 pm
So, I kinda got a little further, but at the same time I didn't.

pciconf reports this:
Code: [Select]
none2@pci0:5:8:0: class=0x078000 card=0x8d881043 chip=0x270214f1 rev=0x01 hdr=0x00
    vendor     = 'Conexant Systems, Inc.'
    class      = simple comms

So that's clearly my modem, but it's obviously not attached as serial device. In fact, dmesg reports this:
Code: [Select]
pci5: <simple comms> at device 8.0 (no driver attached)
At the same time, the on-board serial console seems to be recognized fine:
Code: [Select]
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
dmidecode -t connector reports this:
Code: [Select]
Handle 0x000F, DMI type 8, 9 bytes
Port Connector Information
    Internal Reference Designator: COM1
    Internal Connector Type: 9 Pin Dual Inline (pin 10 cut)
    External Reference Designator: 
    External Connector Type: DB-9 male
    Port Type: Serial Port 16450 Compatible

And I also have the devices associated with that:
Code: [Select]
crw-rw----  1 uucp  dialer    0x28 Apr  4 19:02 cuau0
crw-rw----  1 uucp  dialer    0x29 Apr  4 19:02 cuau0.init
crw-rw----  1 uucp  dialer    0x2a Apr  4 19:02 cuau0.lock
...
crw-------  1 root  wheel     0x25 Apr  4 19:02 ttyu0
crw-------  1 root  wheel     0x26 Apr  4 19:02 ttyu0.init
crw-------  1 root  wheel     0x27 Apr  4 19:02 ttyu0.lock

So I guess the driver for my modem is missing? I don't really know where to go from here.
The FreeBSD handbook about serial interfaces ( https://www.freebsd.org/doc/handbook/serial.html ) describes how FreeBSD assigns device files to interfaces, and from this it is clear, that my modem is simply not recognized as serial interface (as in, not recognized at all).

If it'll help, the modem is an RD01-D270 (Conexant HSFi CX11252-15) there isn't much info about it on the internet, as it is well over ten years old (I have a photo of it, that'll help).