Tag Archives: Linux

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

Compile SD-PEX15022 (MCS9922) drivers for Debian

Recently I purchased a Syba SD-PEX15022 (MCS9922) PCI-e to Serial card for Amateur Radio radio control. Well the drivers that came on the CDRom would not compile and got heaps of errors, any ways after 30 mins or so of trolling the Internet for more update drivers which I found here and they compiled under the 3.0.0-1 kernel with no problems.

In case the drivers go a miss from the above ASIX link you can grab them from here:
MCS99xx_NoCascade_Linux_driver_v1.0.0.1

UPDATE 2011-12-28
As of the release of the 3.1 Kernel this card now works out the box, so no need to compile the drivers for it if running kernel 3.1 onwards.

Doing ‘lspci -v‘ shows – note the ‘Kernel driver in use:‘. Also the port assignment has change from ‘/dev/ttyF0‘ etc, back to ‘/dev/ttyS0‘ etc.

04:00.0 Serial controller: NetMos Technology PCIe 9922 Multi-I/O Controller (prog-if 02 [16550])
        Subsystem: Device a000:1000
        Flags: bus master, fast devsel, latency 0, IRQ 17
        I/O ports at e880 [size=8]
        Memory at fbffd000 (32-bit, non-prefetchable) [size=4K]
        Memory at fbffc000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: serial

04:00.1 Serial controller: NetMos Technology PCIe 9922 Multi-I/O Controller (prog-if 02 [16550])
        Subsystem: Device a000:1000
        Flags: bus master, fast devsel, latency 0, IRQ 18
        I/O ports at ec00 [size=8]
        Memory at fbfff000 (32-bit, non-prefetchable) [size=4K]
        Memory at fbffe000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>
        Kernel driver in use: serial

ARISSat-1 Transponder file for GPredict

This is the transponder file I made up for GPredict as it not have one for the ARISSat-1 satellite.

Just copy and pasted the below info into a text file and save it to ~/.config/Gpredict/trsp/37772.trsp

[Mode V Digitalker (Voices Messages and Telemetry)]
DOWN_LOW=145950000
MODE=FM

[Mode V Imaging (Robot 36 SSTV from onboard cameras)]
DOWN_LOW=145950000
MODE=SSTV in FM carrier

[Mode V Telemetry (1000 baud (400 baud backup))]
DOWN_LOW=145920000
MODE=BPSK 1000 bps

[Mode U/V (B) Linear Transponder]
UP_LOW=435742000
UP_HIGH=435758000
DOWN_LOW=145922000
DOWN_HIGH=145938000
INVERT=true

[Mode V TLM Beacon (CW-2, BPSK-1000)]
DOWN_LOW=145919000
MODE=CW

[Mode V TLM Beacon (CW-1, BPSK-400)]
DOWN_LOW=145939000
MODE=CW

Now sit back and enjoy listening and transmitting to the ARISSat-1 :-)

Reference:
Satellite Detail – ARISSat-1

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

[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

Slimming Asterisk 1.6.2 setup under Debian

This is more just more to show little how I have configured my Asterisk set up and slimmed it down to use the minimal modules needed.

My Needs
– SIP calls between my IP phone and Softphone
– Incoming/Outgoing calls through a SIP Provider
– Echo test to make sure audio is working
– Music On Hold (moh)
– Date and Time

Hardware Setup
– 12V fanless Mini ITX @ 533MHz (VIA Samuel 2) & 512MB RAM
– 10/100 Switch + WiFi AP
– Nortel 2002 IP Phone (NTDU91)
– Softphones
Continue reading