The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: PC Tweakage

Remembering which tweaks worked

  • Epson R380 Printer: Resetting the Waste Ink Counter Again

    The Epson R380 printer never gets turned off, so it rarely has a chance to complain. After a powerdown due to refreshing the UPS batteries, it lit up with the dreaded “Service required. Visit your friendly Epson repair center” message that indicates you should just throw the printer out, because replacing the internal ink absorber mats / draining the internal tank is, mmm, economically infeasible when you pay somebody else to do it.

    Having done this before, though, it’s almost easy…

    • Pop a PC with a Windows partition off the to-be-recycled stack
    • Boot System Rescue CD
    • Back up the partition to a junk hard drive, just for practice
    • Copy the subdirectory of sketchy utilities to the Windows drive
    • Boot Windows (with no network connection)
    • Run sketchy utility to reset the ink counter
    • Boot SRC, restore partition
    • Return hard drive & PC to their respective piles
    • Declare victory and move on

    This time, a sketchy utility that resembled the Official Epson Reset Program actually reset something and the printer started up normally. As before, however, the saved MBR didn’t match the on-disk MBR, suggesting that either I don’t understand how to save / restore the MBR or that something once again meddled with the MBR in between the backup and the restore.

    I’ve emptied the waste ink tank maybe three times since the last reset: plenty of ink down the drain. Fortunately, I loves me some good continuous-flow ink supply action…

    Sheesh & similar remarks.

  • Inspiron Mini 10 as a 3D Printer Controller

    It turns out that the dual-core Intel Atom Inside an old Dell Mini 10 isn’t up to the demands of rendering modern web design; disk I/O speed has nothing to do with the CPU’s (lack of) ability to chew through multiple layers of cruft adorning what used to be straightforward static HTML.

    So, equipped with Linux Mint / XFCE, it’s now found a new purpose in life:

    SnowWhite back in action
    SnowWhite back in action

    In truth, an Atom isn’t quite up to the demands of modern 3D printing, either, at least in terms of processing a huge G-Code file into a layer-by-layer path preview. Fortunately, Pronterface doesn’t generate the preview until you ask for it: arranging the UI to put the preview on a separate tab eliminates that problem.

    The Mini 10 can dribble G-Code into the printer just fine and looks much cuter than the hulking laptop in the background.

  • Opening a Dell Inspiron Mini 10 Case

    I volunteered to update an old Inspiron Mini 10 netbook (or whatever they called the things) with Mint Linux and wanted to see what replacing the dead-slow 5400 rpm hard drive with an SSD would do for the struggling Intel Atom Inside. Dell provides a Service Manual showing how to remove the three screws on the bottom of the case, then gently remove the keyboard (!) to get access to the innards.

    You start by covering the screen with some low-tack plastic film that you’ve been saving for this very purpose, sticking a small screwdriver into the center screw hole, and pushing the keyboard firmly away from the case. This bends the keyboard enough to get your fingernails underneath, after which you can pull / pry it away from the latches on each side.

    The left side of the keyboard (as seen from the normal vantage point) comes out first, after clearing a small latch just over the single left-side USB port:

    Dell Inspiron Mini 10 - left keyboard latch
    Dell Inspiron Mini 10 – left keyboard latch

    The right side pops free from its latch over the HMDI port when you push the keyboard firmly to the left:

    Dell Inspiron Mini 10 - right keyboard latch
    Dell Inspiron Mini 10 – right keyboard latch

    Then release the keyboard’s ribbon cable clamp, pull the cable out, remove the keyboard, remove the single screw holding the hard drive carrier in place, and swap drives in the obvious manner.

    Conclusion: an SSD helps a lot, but Firefox on an Atom CPU remains pretty slow off the starting blocks …

  • Streaming Player: Wireless Keypad

    Moving the streaming media player control panel across the Sewing Room for E-Z access:

    Wireless Keypad - colored labels
    Wireless Keypad – colored labels

    Stipulated: garish labels that don’t fit the keys well at all.

    I need more than one stream for testing; the only one that matters is Classical.

    The keypad uses the same 2.4 GHz ISM band as the Raspberry Pi’s Wifi radio, which means holding a key down (which should never happen) puts a dent in mplayer’s cache fill level. Even absent that interference, the WiFi link seems more than a little iffy, probably because it’s at the far end of the house and upstairs from the router.

    Other WiFi devices report that 2.4 GHz RF has trouble punching through the intervening fifty feet of hardwood floor (on the diagonal, the joists amount to a lot of wood) and multiple sets of doubled wallboard sheets; the RPi probably needs a better radio with an actual antenna. I did move the WiFi control channel away from the default used by the (relatively distant) neighbors, which seemed to improve its disposition.

  • Raspberry Pi: USB Keypad Via evdev

    The general idea is to use keystrokes plucked from a cheap numeric keypad to control mplayer, with the intent of replacing some defunct CD players and radios and suchlike. The keypads look about like you’d expect:

    Numeric keypads
    Numeric keypads

    The keypad layouts are, of course, slightly different (19 vs 18 keys!) and they behave differently with regard to their NumLock state, but at least they produce the same scancodes for the corresponding keys. The black (wired) keypad has a 000 button that sends three 0 events in quick succession, which isn’t particularly useful in this application.

    With the appropriate udev rule in full effect, this Python program chews its way through incoming events and reports only the key-down events that will eventually be useful:

    from evdev import InputDevice,ecodes,KeyEvent
    k=InputDevice('/dev/input/keypad')
    for e in k.read_loop():
    if (e.type == ecodes.EV_KEY) and (KeyEvent(e).keystate == 1):
    if (KeyEvent(e).keycode == 'KEY_NUMLOCK'):
    continue # we don't care about the NumLock state
    else:
    print KeyEvent(e).scancode, KeyEvent(e).keycode

    Pressing the keys on the white keypad in an obvious sequence produces the expected result:

    82 KEY_KP0
    79 KEY_KP1
    80 KEY_KP2
    81 KEY_KP3
    75 KEY_KP4
    76 KEY_KP5
    77 KEY_KP6
    71 KEY_KP7
    72 KEY_KP8
    73 KEY_KP9
    98 KEY_KPSLASH
    55 KEY_KPASTERISK
    14 KEY_BACKSPACE
    74 KEY_KPMINUS
    78 KEY_KPPLUS
    96 KEY_KPENTER
    83 KEY_KPDOT
    

    Observations

    • KeyEvent(e).keycode is a string: 'KEY_KP0'
    • e.type is numeric, so just compare against evcodes.EV_KEY
    • KeyEvent(e).scancode is the numeric key identifier
    • KeyEvent(e).keystate = 1 for the initial press
    • Those KeyEvent(e).key_down/up/hold values don’t change

    If you can type KEY_KP0 correctly, wrapping it in quotes isn’t such a big stretch, so I don’t see much point to running scancodes through ecodes.KEY[KeyEvent(e).scancode] just to compare the enumerations.

    I’m surely missing something Pythonic, but I don’t get the point of attaching key_down/up/hold constants to the key event class. I suppose that accounts for changed numeric values inside inherited classes, but … sheesh.

    Anyhow, that loop looks like a good starting point.

  • Adaptek AVA-2902E/I SCSI Card: Low Profile Bracket Hack

    I picked up an Adaptek AVA-2902 SCSI card from eBay to use with an ancient Epson Perfection 636 SCSI scanner from the heap, but it came with a high-profile bracket wrapped around its DB-25 connector:

    SCSI card bracket fix - before
    SCSI card bracket fix – before

    The old-school serial port card sitting atop it (from one of the off-lease Optiplexes in the stable) has a low-profile bracket that seemed promising, so I swapped the brackets.

    Alas, the SCSI card positioned the DB-25 just a smidge higher than the serial card, putting the right-angle top of the bracket about 2 mm above the ledge, where it prevented the locking cover from engaging. I filed the bracket’s DB-25 mounting holes into ovals, using up all the slop around the connector shell, to no avail.

    So I snipped off most of the bracket’s top, grabbed it in the bench vise, smashed the corner with a drift punch, and bashed the whole affair 2 mm lower. It fit reasonably well, although there’s an air gap near the bottom of the bracket where it tapers down to the guide slot. The SCSI connector barely fit, with some persuasion, under the locking cover:

    SCSI card bracket fix - installed
    SCSI card bracket fix – installed

    Close enough for me; the scanner (looming over the SCSI connector) works fine and delivers much better image quality / color balance than the crappy HP 7400C with an auto-feeder that I’d been using.

    SCSI cables look like gas pipes in this day & age of tiny USB cables and teensy HDMI connectors

  • Improving Avahi Startup Speed

    At least on my network, disabling the IPv6 functions makes Avahi start up faster. You do that by tweaking the obvious IPV6 line in /etc/avahi/avahi-daemon.conf:

    use-ipv4=yes
    use-ipv6=no
    

    It’s also useful to disable power management in the USB WiFi dongle by adding /etc/modprobe.d/8192cu.conf:

    # Disable power saving
    options 8192cu rtw_power_mgnt=0 rtw_enusbss=0