This is a DiscontinuedProject. It has been finished and is in a stable state now. Currently, no effort is made for further work here.

Since my real telefax machine broke down, I use a combination of USB scanner, modem and printer attached to my "home server" for that purpose. This setup is explained in the FaxServer project.

However, this required me to boot another system (the "home server" machine is a headless PC). To make fax usage more comfortable, I have built a device for initiating a fax transmission, and printing received documents. In analogy to the leet-speak term "hax0r", I am calling this thing the "Fax0r".

The Fax0r attaches to the USB port of my home server, as modern PCs tend to have more USB than serial ports. This was also a good reason to test USB attachment of selfmade projects, where I chose to use FTDI's UM232R module.

External Interfaces

JP01

LC Display connector

JP02

AVR ISP connector, see AvrISP for details

JP03

Keypad connector

JP04

USB power management enable

open

enable remote power-down

closed

disable remote power-down

X01

USB-B connector to host

USB module

The USB thingy could be programmed to use a self-made USB identification:

Mar  1 16:30:02 feynman root: Unknown USB device: vendor 0x6666 product 0x4201 bus uhub2
Mar  1 16:30:02 feynman kernel: ugen0: <<nz@thiemo.net> Fax0r Controller v1.0, class 0/0, rev 2.00/6.00, addr 2> on uhub2

0x6666 here is the vendor ID assigned for prototype use by the USB-IF.

With an edited version of uftdi(4), the Fax0r controller attaches as USB serial device to the ucom(4) driver and is available in /dev/cuaU* under FreeBSD 6 and 7:

Mar 11 00:28:16 feynman kernel: ucom0: <<nz@thiemo.net> Fax0r Controller v1.0, class 0/0, rev 2.00/6.00, addr 2> on uhub0

fbsd6-uftdi.patch fbsd7-uftdi.patch

Firmware

Here is an uncommented snapshot of the controller firmware currently in use.

fax0rd

fax0rd is the deamon running on the host computer. It is comfortably started by usbd if configured:

device "Fax0r"
        devname "ucom[0-9]+"
        vendor 0x6666
        product 0x4201
        attach "/usr/local/sbin/fax0rd &"

Fax0rd exits automatically when the device is unplugged, so we don't need an extra detach routine here.

If we want fax0rd to change its user ID after starting, the fax0rd user must have permission to open the respective device file. In FreeBSD, devfs takes care of this, so we add a rule to /etc/devfs.rules:

add path 'cuaU*' mode 0660 user fax0rd group operator

Note that this changes the mode for all /dev/cuaU* devices, i.e. all serial USB adapters attached (and recognized as such). To my surprise, after a reboot of the fax server I found that setting the group to one of fax0rd's member groups is not enough, but the device must be owned by the fax0rd user. I don't know why -- but if configured otherwise, fax0rd received "permission denied" errors when attempting to open the serial device.

Images

Hardware revisions


CategoryElectronics


THIS DATA IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DATA, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

All product and brand names mentioned on there pages and in the source code are registered names and/or trademarks of the respective owner and are mentioned for identification purposes only.

For a full copyright notice, please see this link. For imprint and contact information, please see http://www.thiemo.net/.

Fax0r (last edited 2009-12-23 08:04:00 by ThiemoNordenholz)