Tag Archives: Hardware

Migration to new server

Well it happens every now and then that we have to upgrade our hardware to semi keep up with the times. In my case it was upgrading from a 533MHz fanless mini ITX system to a P4 3GHz machine to handle my firewall/gateway/routing/www/proxy/mail etc. Only real major problem I had been with ‘Dovecot‘ not being able to locate mail directories, which was strange as the 2 systems are an almost mirror copy of each other.

Jan 10 22:50:21 system dovecot: pop3(user): Error: user user: Initialization failed: mail_location not set and autodetection failed: Mail storage autodetection failed with home=/home/user
Jan 10 22:50:21 system dovecot: pop3(user): Error: Invalid user settings. Refer to server log for more information.

Turns out cause Dovecot v2 under Debian has gone to a multi conf setup I had to set the mail location in ‘/etc/dovecot/conf.d/10-mail.conf

mail_location = mbox:~/mail:INBOX=/var/mail/%u

Also the other to check is that the permissions of the mail directories are set to 700 and make the directory if needed:

# mkdir /home/user/mail
# chown user:user mail
# chmod 700 mail

Besides the above error, the rest the upgrade using the config file from the original system was pretty painless beside some clean up to get rid minor warnings in the syslog file. Well this has been my evening, and maybe the above info may help someone else with the same problem.

Oh and the other major thing to remember is to enable IP forwarding and enable the changes to the sysctl.conf

# sysctl -w net.ipv4.ip_forward=1
# sysctl -w net.ipv6.conf.all.forwarding=1
# sysctl -p /etc/sysctl.conf

As it sure does help with stable connectivity for other devices connection to the internets

[How to] Belkin 600VA UPS (F6S600auUSB) with NUT

I recently purchased a Belkin 600VA UPS for my 12V fanless Mini ITX system and Wireless AP to keep them running through brown outs. This is what I had to do to get the UPS to work with NUT under Debian.

UPDATE Monday 21 May 09:49:17 CST 2012: now that I have had a long enough power outage I can confirm that the beeps do get faster towards end batter life and about then the computer starts its shutdown process.

Set the correct permissions to access the UPS
Edit and add the following to /lib/udev/rules.d/52-nut-usbups.rules:

#  F6S600auUSB - blazer_usb
ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="nut"

Run the following to activate the newly set permissions for the UPS:

# udevadm trigger --action=change

Installing and configuring NUT to work with the newly connected Belkin UPS
Install NUT:

# apt-get install nut

Edit /etc/nut/ups.conf and add the following to the end of file:

[belkin]
driver = blazer_usb
port = auto

Edit /etc/nut/nut.conf and change the mode:

MODE=standalone

Edit /etc/nut/upsd.users and add the following users

[admin]
password = adm_pwd
action = SET
instcmds = ALL

[upsmon]
password = ups_pwd
upsmon master

Edit the /etc/nut/upsmon.conf and check the following is active and correct.

MONITOR belkin@localhost 1 upsmon ups_pwd master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
NOTIFYFLAG ONLINE SYSLOG
NOTIFYFLAG ONBATT SYSLOG
NOTIFYFLAG LOWBATT SYSLOG
NOTIFYFLAG FSD SYSLOG+WALL
NOTIFYFLAG COMMOK SYSLOG
NOTIFYFLAG COMMBAD SYSLOG
NOTIFYFLAG SHUTDOWN SYSLOG+WALL
NOTIFYFLAG REPLBATT SYSLOG+WALL
NOTIFYFLAG NOCOMM SYSLOG
NOTIFYFLAG NOPARENT SYSLOG
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

Start NUT daemon:

# invoke-rc.d nut start

Check for errors in logs:

# tail -f /var/log/daemons.log
# tail -f /var/log/messages

Check UPS status:

upsc belkin

Programming old Radios under Linux


As I primarily use Linux and I had to find an alternative way to program radios like Tait, Icom etc that have Dos based software to program them along with the need to have a serial port. Well after some trial and errors with various emulators like dosemu and wine, I found dosbox was able to do what I need to accomplish with accessing the radio via USB to Serial cable which you can buy cheap enough off of eBay.

Edit dosbox config file:

$ nano .dosbox/dosbox-0.74.conf

and alter the ‘serial 1‘ line to read:

serial1=directserial realport:ttyUSB0

Then you can run your dos program in terminal:

$ dosbox /location/to/you/dos/program.exe

PCManFM user mount ‘not authorized’

If you are like me and like to run a custom install of Debian with a lightweight setup with Fluxbox, SLiM, PCManFM, etc and you have problems with mounting USB devices such as flash drives etc and get the “Not Authorized” message in PCManFM under Debian, here is a workaround that should still work after upgrade, rather than editing ‘
/usr/share/polkit-1/actions/org.freedesktop.udisks.policy‘ itself, which does not last after software upgrade of udisks if I am not mistaken, but I sure someone will correct me if I am wrong ;-)

As root create:

# /etc/polkit-1/localauthority/50-local.d/55-storage.pkla

and add the following:

[Storage Permissions]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.drive-detach;org.freedesktop.udisks.luks-unlock;org.freedesktop.udisks.inhibit-polling;org.freedesktop.udisks.drive-set-spindown
ResultAny=yes
ResultActive=yes
ResultInactive=no

Polkit will automatically recognize the newly added file.

To make sure you have the ability to mount the USB devices, be sure to add yourself to the plugdev group

# usermod -a -G plugdev YOUR-LOGIN

Now logout and log back in for above to take effect if you just added yourself to the plugdev

Reference:
PCManFM – ArchWiki

Homemade Coax Switcher

This is a coax switcher unit I made out of some parts lying around in the junk box. What I have done is modified an old ‘100 Watt CB antenna matcher’ unit and added an extra SO238 and a double pole switch to be some functional I can now use with my 2m/70cm setup.

Parts break down:
Metal box 51x51x32mm from JayCars be ideal, or bigger for more sockets
3 x SO238 panel mount connectors
2mm silver plated copper wire
double pole switch

[How To] Enabling Epson Stylus NX125 scanner

I am going to briefly explain how to enable normal user to have access the the scanner via Xsane or sane under Debian (testing)

First off add your user account to the ‘scanner‘ group:

# usermod -aG scanner your_account

and now logout and back in.

Second we need to edit ‘60-libsane.rules‘ file:

# nano /lib/udev/rules.d/60-libsane.rules

and add the following to the file:

# Epson Stylus NX125
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="085c", ENV{libsane_matched}="yes"

Now restart ‘udev‘:

# invoke-rc.d udev restart

and disconnect and connect the scanner on the USB port and start up Xsane.

Connecting to Internode’s IPv6 on Debian

You will first need the client program found in the Debian called ‘gogoc‘, if you want to use ‘router‘ mode you’ll also need to install ‘radvd‘ too which is also available in Debian.

Edit the ‘/etc/gogoc/gogoc.conf‘ file to suit:

userid=yourinternodeusername
passwd=yourinternodepassword
server=sixgw.internode.on.net
auth_method=any
host_type=router
prefixlen=64
if_prefix=yournormalinterface
dns_server=192.231.203.132
gw6_dir=/usr/local/gw6c
auto_retry_connect=yes
retry_delay=30
keepalive=yes
keepalive_interval=30
tunnel_mode=v6anyv4
if_tunnel_v6v4=gif0
if_tunnel_v6udpv4=tun0
if_tunnel_v4v6=
client_v4=auto
client_v6=auto
template=linux
proxy_client=no
broker_list=tsp-broker-list.txt
last_server=tsp-last-server.txt
always_use_same_server=no
log_filename=gw6c.log
log_rotation=yes
log_rotation_size=32
log_rotation_delete=no
syslog_facility=USER

When you first start gogoc it will try to make a secured connection to the Internode tunnel broker. The problem is that when you run gogoc for the first time it will fail with ‘Not starting gogoc - no server key ... (warning). failed!‘ cause it was unable to accept the server key from Internode. This means that we have to run gogoc from command line, like this:

# gogoc -n
sixgw.internode.on.net is an unknown host, do you want to add its key?? (Y/N) y
^C

Now you should be able to start ‘gogoc‘ as a deamon now with

# invoke-rc.d gogoc start

Testing it all works:
To see that you have an active tunnel working from command line, like this:

# ifconfig  | egrep '(Link|inet6)'

and you should get an output something like this:

...
tun       Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet6 addr: 2001:44b8:61::239/128 Scope:Global

now you should be able point your web browser to see the swimming turtle at http://www.kame.net/, also you should be able to see your IPv6 address here at Internode’s IPv6

Reference:
Internode’s IPv6 tunnel broker for Fedora Linux
Gentoo IPv6 Router Guide

Dual Band (2 Meter & 70 cm) Solid Aluminium J-Pole

This is what I have been up to for the last week or so, building this dual band antenna out of solid aluminum, I have used 10mm solid aluminum rod, and 40mm x 40mm x 3mm angle strut for the base and the driven element connected via SO239 3/8″ stud mount.

I am very happy with the performance of the antenna and the SWR of it. and it was a hell of a lot cheaper than buying one, and more fun :-P

And if you are interested in me making one for you, head on over to my contact page and send me a message

Wouxun KG-UVD1P Dual Band HT

I bought one of theses Wouxun dual band HT off of eBay a month back for bit over 100USD which amounted to around 99AUD. The unit didn’t come with any extras like 1700mA battery or USB programming cable as sold by others on eBay.

Down side is the HT is pita to program off of the keypad till you get used to it, altering power setting etc to a channel already saved is a pain as you have to delete the channel and re enter it. I ended up buying a USB programming cable off of eBay for the HT and it makes the programming of the HT a lot easier and faster. The other is the SMA Female antenna connection, as if you want to use a external antenna you have to make or buy SMA female to BNC female adapter, which are also sold on eBay for couple dollars each.

As I use Linux, I have been lucky as there is a Linux program called OWX, which is a command-line program for programming the KG-UVD1P and others. As I didn’t do the make install part of the compile/install of the OWX program, here is an example of how I use the program to do what is explained in the OWX documentation.

./owx -c check -p /dev/ttyUSB0
./owx -c get -p /dev/ttyUSB0 -o radio/original.bin
cp radio/original.bin radio/backup.bin
./owx -c export -i radio/original.bin -o vk5-repeater-list.csv
cp radio/original.bin radio/vk5-repeater-list.bin
./owx -c import -i radio/vk5-repeater-list.csv -o radio/vk5-repeater-list.bin
./owx -c put -p /dev/ttyUSB0 -i radio/vk5-repeater-list.bin -r radio/backup.bin

Overall the Wouxun KG-UVD1P is a rather good and not bad for the monies, feels sturdy and comfortable to use, it be a good starting out HT for beginners to Amateur Radio. I would also recommend if getting this HT to get it with the USB cable and the 1700mA battery.

References:
Programming the Wouxun KG-UVD1P – this make programming the from the keypad a lot easier to understand well worth the read.
Open Wouxun (OWX) – Linux command-line program
VK5 2M/70CM repeater list for KG-UVD1P – CVS file to used with OWX