Categories
Hardware Linux Ubuntu

Unable to enumerate USB device on port…

I have an old PC with what appears to be a broken implementation of USB. I cannot obtain a BIOS update and there is no BIOS setting to switch off USB either. Very old Linux distributions would run on this PC, but only on those with USB support as loadable modules. For later kernels with direct USB support I would get continuous error messages to the console.

After spending some time Googling, I found this useful post

For Ubuntu 10.04 LTS I used the advice to create rules to deactivate USB entirely on this host. The first file that I created was /etc/udev/rules.d/20-disable-ehci.rules which contained the following code:-

ACTION=="add", SUBSYSTEM=="pci", DRIVER=="ehci_hcd", \
        RUN+="/bin/sh -c 'echo -n %k > %S%p/driver/unbind'"

When I rebooted the PC, it disabled one of the troublesome USB hubs but I was still getting error messages for another but much more frequently now. I experimented by creating a similar file to deactivate ohci but this didn’t do anything. I tried again with uhci and that worked, USB completely disabled.
/etc/udev/rules.d/30-disable-uhci.rules

ACTION=="add", SUBSYSTEM=="pci", DRIVER=="uhci_hcd", \
        RUN+="/bin/sh -c 'echo -n %k > %S%p/driver/unbind'"

So if you have two or more USB hubs throwing enumeration errors, try disabling both EHCI and UHCI, it worked for me.

Obviously, if you have any USB devices that you need to use with this host, forget it. You will need a new motherboard.

Categories
Hardware Linux Ubuntu

What to do with an OldWorld Mac?

PowerMac 8500 (CK6391DE8FA)During our recent house move I found my old and dusty PowerMac 8500/180 while we were packing up the contents of my garage. It had been placed on the bottom shelf of my car spares shelving for a time when I could either make a VGA adapter cable or acquire another old Mac monitor to replace the one that died. That was back in 2004, and as time passed by storage crates piled up in front of it and it was soon forgotten.

A long time ago I was a NetWare specialist and I had a variety of non intel computers in my private lab that I used for working on interoperability projects. Many of my customers had a small number of Macintosh computers in their organisations and I acquired my 8500 second hand when one of them switched to Windows a year after purchase.

I can’t say that I was a Mac specialist in any sense. My interest was purely interoperability with NetWare, Unix and other corporate host based systems. I tinkered a lot with Applescript and had a lot of fun with my 8500. However, I didn’t like the fact that Apple built the machine to be supported only by their own engineers. There weren’t any manuals for DIY upgrades as you were supposed to take the 8500 to an Apple technician for things like RAM upgrades. I soon learned that Apple products were all about lock-in. I found this aspect of Mac ownership distasteful to the point that I probably wouldn’t buy another Mac again even though I liked my 8500.

So time moves on. It’s 2011 and the 8500 is sitting in my new garage. I don’t want to leave it there to deteriorate for another seven years so I dust it off and bring it into the house to see if it still works. I still don’t have a Mac to VGA adapter but the 8500 has TV output. I connect it to my 42″ LCD TV using an RCA composite TV cable (Yellow-Red-White). After plugging the onboard Ethernet into a live switch on my LAN, and completing the remaining connections for power, keyboard and mouse, the Mac powers up and the familiar chime is heard all over the house through the TV speakers.

I was really pleased that it still worked after all this time. I found some old QuickTime video clips of the kids when they were younger in a folder on the hard drive. I guess when the monitor died I didn’t have any way of accessing my files to save them back then. I set about copying off the files I wanted to keep by uploading to my file storage using Internet Explorer 5 that was still on the Mac and then I began depersonalising the machine ready for disposal. While I was dragging files to the Wastebasket, I started to think that maybe I could use this machine with Ubuntu or Debian as part of my CCTV system. After all, it had on-board analogue video capture that was too fast for any hard-drives produced at the time. Perhaps someone had developed the necessary drivers for V4L2. I didn’t stop too check first, I downloaded a copy of Debian 6.0.2.1 as I thought this would work with an OldWorld Mac and set about installing it.

Oh dear. It appears that a Mac monitor is necessary to install Linux as the TV display doesn’t work when Bootx is used to start the Debian installation. The next problem I have is that I don’t have any Mac OS installation media any more to resize the Apple partitions. A house flood in 2009 saw a lot of my stuff go in the rubbish skip never to be replaced. All my obsolete computer manuals, books and software were either destroyed or water damaged and I’m fairly certain that my Mac OS 8 install disks went in the same skip. I pack up for the day and think about how I can resolve this problem overnight.

The following morning I have an idea. Another old PC that was similarly shelved had a Matrox Mystique card inside. This had a Mac display port so I thought It may have originally been Mac compatible. I relieve the PC of the Matrox card and install it in the Mac with a USB 2.0 + FireWire PCI card. A 60GB portable hard drive is connected to the USB port and a flat panel LCD display to the Mystique’s VGA port before rebooting the Mac.

Mac OS 8.1 starts up and is displayed on the TV. I pop in the Debian CD-ROM and copy the installation kernel and ramdrive to the Linux Kernel folder in the Mac System Folder and configure Bootx to use them. Starting Debian from Bootx the TV display loses its signal and shows the default blue screen. The LCD monitor is now showing a familiar penguin and I can see that Linux is booting and in the hardware detection phase.

I manage to successfully create a Linux partition and swap partition on the USB hard drive but the installation always stalls at some point when unpacking an archive on the CD-ROM. Looking at the logs, the installation is almost there, but the live kernel has not been created in /boot and it’s not good enough to even try building it by hand. Disappointed, I abandon this project yet again to think about it overnight.

Next morning I have an idea. I downloaded the last Ubuntu distribution that officially supported the PowerPC architecture. The Alternate install image for Ubuntu 6.06 LTS PPC seemed most appropriate considering that my Mac has only 96MB of RAM. I replaced the Bootx kernel and ramdrive from this CD and recommenced installation.

Screenshot of Ubuntu 6.06 on my PowerMacSuccess! The installation is plodding along well. I let it run on its own all day, coming back now and again to check progress and answer any waiting prompts. When it finished I rebooted and logged in to Ubuntu at 640×480 resolution. I started up the System Monitor and had a played a game of Solitaire before tweaking a few settings one by one.

Disaster strikes! Somewhere during the installation I failed to notice that the Mac didn’t have a network connection when running Linux. My Ethernet switch indicates that the on-board MACE (Mac Ethernet) is present at 10Mbps but it won’t DHCP or accept a static IP address. I try installing an Intel E100B PCI adapter and it’s the same. Booting back into Mac OS 8.1 there’s no network now. I just can’t get it to connect. I tried zapping the PRAM and NV but I couldn’t check the OpenFirmware on the serial port as I don’t have a Mac serial lead anymore.

Without a network connection, this 8500 is useless to me. So, the final enjoyment I got from my Mac was using Ubuntu 6.06 on it. I’m not sure if it was any quicker than Mac OS 8.1 as I only have 96MB of RAM installed but it was an interesting exercise on how to get Ubuntu running on a Mac without the Mac OS install discs.

Sadly, I don’t have a use for a Mac that cannot connect to my LAN. I can’t explain why the MACE shows a connection on my switch but refuses to load TCP/IP. Maybe the logic board got a static zap when I was plugging in PCI boards. Maybe I have pressed some key sequence that has deactivated the board in OpenFirmware without my knowledge. If I don’t find a way of getting the onboard Ethernet running again under Mac OS this Mac will be going to the recycling centre very soon.

Categories
Hardware Ubuntu

Find BIOS version using Ubuntu

I found this really simple way of finding the installed BIOS version on an Ubuntu PC without having to reboot. Simply execute the following command in a terminal session and scroll through the output until you find the BIOS section.

sudo dmidecode -s bios-version

For more system information, just scroll through the output until you find what you need.

sudo dmidecode | more

Update August 2012
I have successfully installed Lubuntu 10.04 on an old Toshiba Tecra 8000 (Pentium Mobile 233 with 256MB of RAM) and found that this trick to find the BIOS version did not work. The BIOS in my old Tecra is older than 1999 and doesn’t have the Desktop Management Interface present.

Categories
FreeSwitch Hardware

Camrivox Flexor 500 SIP Telephone

Camrivox Flexor 500

I recently purchased three Flexor 500 telephones to use with my new FreeSwitch installation at home.

So far, I am quite pleased with the telephones although I am still in a process of discovering their capabilities. It appears that these phones are popular with VoIP providers that sell service to end users with a preconfigured phone. My three, fortunately, were unlocked or otherwise unprovisioned which gave me full access to the telephone’s built in web based configuration so I can use them with my own PBX.

One thing I noticed very early on was that the phone’s DTMF tones were not being processed by FreeSwitch. An example of this was FreeSwitch refusing to respond to any keys pressed when in the default IVR. As I already had a working X-Lite Softphone I knew the fault was likely to be with the Flexor 500 but I couldn’t find the setting. Then after a couple of days I noticed some tiny links at the bottom of the Main Menu page. Yup, I need glasses. Anyway, the Voice Settings link took me to a new page where I could select DTMF = SIP and Inband. FreeSwitch only needs SIP for the IVR, but with Inband there is audible confirmation.

Categories
Hardware

Acer DX900 Smartphone

I bought an Acer DX900 Smartphone last September without actually trying one out first. That was a big mistake. The phone’s specification is impressive but it’s the dual SIM card capability that I really needed. I had a look at some Samsung Duos models and they were very good, but none of them at that time had WLAN. It wasn’t long before I started to discover how less than half baked the DX900 is, and how dissapointing Acer’s support can be. The Product Manager for this model is non existent.

After more than seven months of use, I am now ready to accept that I was exceptionally stupid to buy this phone without trying it first. I am stuck with it now for at least another year or more. Having to pull the battery out every day to restart the phone after it crashes is becoming very tiresome.

Note to self:

(1) Never knowingly buy anything made by Acer.
(2) Never buy a phone that has a Microsoft Operating System.

Categories
Hardware Nagios

Monitoring a Linksys WAG200G using SNMP

I have been using a Linksys WAG200G as a wireless access point since December 2007. I’m not using it for my broadband connection as I have a separate firewall and router already on my network. It has been running reliably without any problems since installed and it occurred to me that it had been some time since I had used the device’s administration page or reviewed Cisco’s patch history for it.

Using the web interface, the installed firmware was shown to be version 1.0.9, which was some way behind the current 1.1.9 release. I couldn’t find the release notes for any versions prior to 1.1.5 so I decided to upgrade the firmware to be certain that any known vulnerabilities had been patched.

After exploring the device’s web interface, I remembered that the little router supported SNMP. I didn’t have a NMS when it was installed so I had left this feature unconfigured. Now that I have a Nagios console it was time to activate the SNMP management. I set the device name to the same name that it’s IP resolves to in my DNS (wap101). I then set the monitoring IP address and trap target address to that of my NMS. Finally, I set the read community to public, and the write community to private.

From a command prompt on my NMS, I dumped a list of the management functions supported by the WAG200G using this command…

snmpwalk -v1 -c public 192.168.1.30 -m ALL .1

My Linksys uses 192.168.1.30 for it’s Ethernet interface. Change it to your device’s IP address if you are going to try it yourself. Redirecting the output to a file is useful for future reference.

A sample output of snmpwalk looks like this

IF-MIB::ifInErrors.1 = Counter32: 0
IF-MIB::ifInErrors.2 = Counter32: 0
IF-MIB::ifInErrors.3 = Counter32: 0
IF-MIB::ifInErrors.4 = Counter32: 0
IF-MIB::ifInErrors.5 = Counter32: 0

My WAG200G is only used as a WLAN access point, so I apologise now for not covering anything to do with monitoring ADSL or anything other than the Ethernet and WLAN interfaces in the Host and Service Definition file for my WAG200G. If you want to monitor more, just pick the relevant items required from the MIBs reported by snmpwalk and add them to your Nagios services. Think about the outputs and what conditions they need for alerts if any. Most of mine only need to alert if the result increases from zero. This is the list of services I am only interested in monitoring:-

  • PING
  • Uptime
  • eth0 IN Discarded Packets
  • eth0 IN Errors
  • eth0 IN Unknown Protocols
  • eth0 OUT Discarded Packets
  • eth0 OUT Errors
  • eth0 Operational Status
  • wlan0 IN Discarded Packets
  • wlan0 IN Errors
  • wlan0 IN Unknown Protocols
  • wlan0 OUT Discarded Packets
  • wlan0 OUT Errors
  • wlan0 Operational Status

I found that Nagios doesn’t like non-unique service descriptions, which is why my descriptions take the form shown above. Click here to view my Host and Services Definitions for the WAG200G.

The host definition inherits from the generic-switch template and looks like this…

# Define the switch that we'll be monitoring
define host{
use generic-switch ; Inherit default values from a template
host_name wap101 ; The name we're giving to this switch
alias Linksys WAG200G ; A longer name associated with the switch
address 192.168.1.30 ; IP address of the switch
hostgroups switches ; Host groups this switch is associated with
}

Each service inherits from the generic-service template and looks something like this…

# Monitor Port 4 (wlan0) number of errors in via SNMP
define service{
use generic-service ; Inherit values from a template
host_name wap101
service_description wlan0 IN Errors
check_command check_snmp!-C public -o ifInErrors.4 -c 0 -m IF-MIB
}

I used the documentation on check_snmp to prevent critical warnings for zero values (-c 0). In time, if any of my services start seeing errors I can change them to use a warning range and a critical range instead.

My Ubuntu 9.10 package install of Nagios was missing the command snmp_check. I added the following code to the bottom of my /etc/nagios-plugins/config/snmp.cfg to get SNMP working as the vital command was missing for some reason.

define command{
command_name check_snmp
command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
}

Categories
Hardware Ubuntu

Upgrading the CPU on a Dell GX240

2.6Ghz Celeron

My two recently acquired Dell GX240 PCs were surprisingly quick with the 1.6Ghz Pentium 4 processors and Ubuntu. However, after some research I discovered that the GX240 motherboard is capable of using a more powerful processor without having to change to faster RAM. A quick search on eBay located two used SL6VV (2.6Ghz Celeron) processors for £3.95 each (including postage!) and they were promptly purchased.

The upgrade itself is very easy. Simply open the case, flip up the green heat-sink shroud and unclip and remove the heat-sink. Release the socket ZIF lever and swap out the processor with the new one. Replace the heat-sink, clips and shroud, close the case and restart the PC. During the boot phase, press F2 to go into the BIOS setup. The main page will provide immediate confirmation that the Celeron has been recognised.

I bought a syringe of CPU heat-sink grease but I didn’t need it. The stock heat-sink had a thermally conductive sticky pad that stayed stuck to it instead of the processor. The pad was in good condition so I decided to reuse it to avoid trying to clean it off.

GX240 fan shroudUsing the CPU benchmark in BOINC, the results of the 1.6Ghz Intel Pentium 4 were…

778 floating point MIPS (Whetstone)
1644 integer MIPS (Dhrystone)

After installing the 2.6Ghz Intel Celeron the benchmark showed a substantial improvement…

1327 floating point MIPS (Whetstone) per CPU
3532 integer MIPS (Dhrystone) per CPU

Verdict

The performance of Ubuntu Desktop 9.10 running on a Dell GX240 with a 1.6Ghz Intel Pentium 4 and 512MB RAM is surprisingly good. Upgrading the CPU to a 2.6Ghz Celeron has made the old PC feel a little faster for most GUI applications that I use. I suspect a higher performance GPU would make a more noticeable improvement.

Since installing the faster processors, one of the GX240s will ‘freeze’ after a few hours of running. I suspect that the 2.6Ghz CPU is overheating as the stock heatsink is dependent on the shrouded case fan exhausting heat from the case. I am going to change the passive heatsink for a fan cooled version.

I bought another two SL6VV processors for £2.49 each and I am now on the lookout for a pair of Socket 478 coolers. Despite the small setback due to passive cooling, this upgrade was worth doing considering how cheap it was.

Categories
Hardware Ubuntu

Brother MFC-660CN printer for Ubuntu 9.10

I have a Brother MFC-660CN all-in-one network printer on our LAN and it has been performing admirably for nearly three years. I was so impressed with this printer that I bought a MFC-680CN for my parents and another for use at home.

Each of the Windows PCs has the complete multifunction driver set installed and can print, FAX and scan over the network with ease. I would like to be able to do the same with the Ubuntu Desktops but I suspect that it is going to be a little trickier getting the network scanning and network FAX functions operational. This page is just concerned with getting network printing running.

I have used CUPS before and have already decided that I am going to use an Ubuntu PC setup as a server on the LAN as a print server to share the printer with the other desktops.

Fortunately, Brother has good driver support for Linux. I followed these instructions on their website but it is a little confusing in places as it references multiple Linux distributions. To make things easier for myself, I am summarizing the method for Ubuntu 9.10 here.

Download and save to disk the ‘deb’ format of the LPR driver and the cupswrapper driver.

Open a terminal on the Ubuntu ‘print server’ PC to type in the commands to install the drivers. I used “Applications”, “Accessories”, “Terminal” from the GUI.

sudo aa-complain cupsd
sudo mkdir /usr/share/cups/model
sudo ln -s /etc/init.d/cups /etc/init.d/lpd
sudo mkdir /var/spool/lpd
sudo apt-get install csh
sudo apt-get install psutils

I downloaded the LPR and cupswrapper driver to the ‘Downloads’ folder in my home directory so I changed the current working directory to that folder.

cd ~/Downloads
sudo dpkg -i –force-all mfc660cnlpr*deb
sudo dpkg -i –force-all mfc660cncupswrapper*deb

Check that the LPR and cupswrapper drivers are installed:-

dpkg -l | grep Brother

I had the following result confirming that the drivers were installed.

ii mfc660cncupswrapper 1.0.1-1 Brother CUPS Inkjet Printer Definitions
ii mfc660cnlpr 1.0.1-1 Brother lpr Inkjet Printer Definitions

To access the CUPS web interface, point your browser at http://localhost:631/printers

Under ‘Queue Name’, click the name of the printer (MFC660CN).

There should be two button menus displayed, ‘Maintenance’ and ‘Administration’. Click the ‘Administration’ button menu and select ‘Modify Printer’
You will be prompted to login, use your usual Ubuntu credentials.

Select ‘LPD/LPR Host or Printer’ and click Continue.

For ‘Connection:’ enter lpd://printer/binary_p1 where printer is the hostname or IP address of the printer that the LPR and cupswrapper drivers will print to. Then click Continue.

Enter a Description and Location. Share the printer by ticking the check box. Click Continue.

The printer driver that you just installed should be selected. Click ‘Modify Printer’ to activate the changes.

The ‘Administration’ button menu has a ‘Set Default Options’ selection. You can use this to change your paper type to A4 size.

To print a test page, click the ‘Maintenance’ button menu and select ‘Print Test Page’

You should now have a working CUPS print server.

Categories
Hardware Ubuntu

NEC MultiSync 5FGe on Ubuntu 9.10

I recently bought two used and abused Dell GX240 PCs for a software development project I am currently working on. I don’t have a spare LCD monitor to use with them at the moment but the guy that sold me the PCs also had some old CRTs that he wanted to get rid of. So, for an additional £3, a heavy 17″ CRT monitor is now on my desk. It takes up a lot of space, but for only £3 it’s a small sacrifice.

Ubuntu Desktop 9.10 installed on the GX240 without issue. However, the maximum resolution displayed was 800×600. I knew from previous experience of the NEC 5FGe was that it could go higher. In fact, the maximum resolution is 1024×768. Not much by today’s standards, but a lot better than 800×600.

The X-Window system from X.Org in Ubuntu is considered to be so good at doing device detection now that the traditional manually edited configuration file xorg.conf is no longer present when installed. This is great for most Flat Panel monitor users, but not that good for people using old fashioned display cards with CRT monitors. Fortunately, xorg.conf is still supported and it is possible to get old junk running at or near its best.

It took a while searching for the info on various web sites but it was worth doing. My 5FGe is running at 1024×768 and is good enough to use to type this. As I know I will probably need to do this again someday, I thought it would be worthwhile documenting the process while it was still fresh in my mind.

With Ubuntu Desktop running the GUI, press Ctrl+Alt+F1 together to switch to a character terminal interface.

At the prompt, login with your Ubuntu user ID and password. When logged in your current working directory should be your home directory.

Enter the following to shutdown the GNOME Display Manager:-

sudo service gdm stop

Enter the following to generate a basic xorg.conf file to work with:-

sudo Xorg -configure

At this point, you should have an xorg.conf.new file in your home directory. Copy this configuration file to the /etc/X11 directory.

sudo cp xorg.conf.new /etc/X11/xorg.conf

If you know what settings your display equipment needs in the xorg.conf file, now is the time to edit it to include them. You will need to know the ‘Modeline’ info for the display resolution. I chose to specify 1024×768 at 60hz refresh as that was a safe starting point. The GTF program can be used to generate a suitable Modeline. To make things easy, I redirected GTF’s output to append to xorg.conf .

sudo gtf 1024 768 60 >> /etc/X11/xorg.conf

I have got used to using Nano for editing files on Ubuntu but you can use whatever editor you like as long as you achieve the same result.

sudo nano /etc/X11/xorg.conf

Edit the section for the monitor settings so that it looks like this:-

Section "Monitor"
Identifier   "Monitor0"
VendorName   "NEC"
ModelName    "MultiSync 5FGe"
HorizSync    31-62
VertRefresh  55-90
Option       "DPMS"
# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
Modeline "1024x768_60.00"  64.11  1024 1080 1184 1344  768 769 772 795  -HSync +Vsync
EndSection

You must cut and paste the GTF output from the end of the file and insert it inside the Monitor section. These settings work for my NEC MultiSync 5FGe. Note that each Modeline is a single line in the file. The comment output from GTF doesn’t hurt if present with a leading #.

Next add the Device info for the display adapter. My Dell GX240 has an AGP graphics card that I am still looking for more X.Org info regarding suitable tweaks. For clarity, I’m not showing all the commented out options below. If you have an ATI Rage 128 Pro Ultra TF your settings will look something like this:-

Section "Device"
Option     "Display" "CRT"
Identifier  "Card0"
Driver      "r128"
VendorName  "ATI Technologies Inc"
BoardName   "Rage 128 Pro Ultra TF"
BusID       "PCI:1:0:0"
EndSection

The important option for the NEC MultiSync 5FGe is:-

Option     "Display" "CRT"

Almost done editing now. Just need to add all of the colour depth settings for the 1024×768 screen mode in the ‘Screen’ section:-

Section "Screen"
Identifier "Screen0"
Device     "Card0"
Monitor    "Monitor0"
DefaultDepth 16
SubSection "Display"
Viewport   0 0
Depth     1
Modes    "1024x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     4
Modes    "1024x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     8
Modes    "1024x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     15
Modes    "1024x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     16
Modes    "1024x768"
EndSubSection
SubSection "Display"
Viewport   0 0
Depth     24
Modes    "1024x768"
EndSubSection
EndSection

Save the file.

Restart the X-Window system using your new xorg.conf by entering the following at the command prompt.

sudo service gdm start

Once the GUI restarted on my PC, I clicked ‘Restart’ just to be sure that the AGP card and monitor were initialised properly. Then I went to ‘System’, ‘Preferences’, ‘Display’ and found that Xorg had now detected that my monitor could run at 75Hz despite not stating a Modeline for it. I have left mine running at 75Hz and all seems to be well so far.

Privacy Preference Center

Necessary

Advertising

Analytics

Other