tag:blogger.com,1999:blog-89340442024-02-19T10:25:29.329-05:00dreamlayersBoris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.comBlogger351125tag:blogger.com,1999:blog-8934044.post-8794384001630229002022-01-11T17:00:00.000-05:002022-01-11T17:00:06.565-05:00Cascade Complete Gel may not be good enough<p>Recently the dishwasher started washing later than it should. Instead of spraying sounds starting early while it was filling, the sounds often started when filling was almost completed, and about a third of the time a few tens of seconds after filling was complete. It never failed to start, but still, this wasn't totally okay. I was wondering if <a href="https://dreamlayers.blogspot.com/2020/09/fixing-whirlpool-part-3378207-to-make.html">the repair I made over a year ago</a> somehow failed, though the symptoms weren't identical.<br /></p><p>I had been using Cascade gel detergent. First it was in a bright green bottle, though over the last few years it was replaced in stores by <a href="https://cascadeclean.com/en-us/products/complete-gel-fresh-scent/">Cascade Complete Gel</a>. Though I had some <a href="https://cascadeclean.com/en-us/products/by-line/platinum/">Cascade Platinum</a> for use if the gel ran out. Recently I was buying the gel ahead of time, and I hadn't used Platinum in almost a year. I ran out of gel and used Platinum once, and since then, the dishwasher always starts spraying early on while filling. This makes me think that some greasy residue had been making something sticky, and Platinum cleared it out. I don't think it was hard residue, because I don't think that would have been cleared out so quickly.</p><p>Since I didn't disassemble the dishwasher and actually see the residue, I can't be certain. This could be a random coincidence. But I am changing detergents.I also didn't like Cascade Complete Gel because it left hard residue below the detergent dispenser. That was not simply hard water residue, because so much of it was collecting below the detergent dispenser. Reading about dishwasher detergents, it also seems that since the reformulation to remove phosphates, gel detergents are the worst because they're not able to use enzymes.<br /></p>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-88363438254377348782020-11-25T23:13:00.001-05:002020-11-26T00:10:33.054-05:00I give up on running recent NetBSD on old hardware<p>NetBSD is an amazingly cross platform operating system. It also supports some very old hardware, such as most of the first small VAX systems. However, software in general gets bigger and slower over time. I recently tried to run NetBSD 9.1 on my KA650 based MicroVAX with 16 MB of RAM. It takes about 12 minutes to boot to a login prompt in multi-user mode with a stripped down configuration. It doesn't seem like there's any single reason why things are so slow, and comparing various NetBSD releases, I see things slowed down gradually. So I don't see hope for reasonable performance, and I give up on running NetBSD there.</p><p>I also couldn't run NetBSD 9.1 on my SPARCstation ELC. It has 16 MB RAM, but the real problem is that each of the 4 MB memory modules are isolated in the address space, and the kernel needs to fit in one of the modules. Probably I could run NetBSD 9.1 if I had bigger memory modules, but I expect the experience would be disappointing.</p><p>This isn't meant to be a complaint about NetBSD. The same trend has been followed by other operating systems, and software in general. I still feel it's a bit sad. I'm not sure that the bloat offers a proportional improvement in functionality. But computers have gotten so much faster, storage has gotten so much bigger, and it has all gotten cheaper, so it's not really a problem in practice.</p><p>Finally, here's a boot log of that KA650 based MicroVAX. The first number is the number of seconds from the start, and the second number is time since the previous line.</p><div style="text-align: left;"><div><span style="font-family: Roboto Mono; font-size: x-small;"> 0.00 0.00 >> NetBSD/vax boot [1.12 (Sun Oct 18 19:24:30 UTC 2020)] <<</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 4.91 4.91 >> Press any key to abort autoboot 0</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 4.93 0.02 Trying BOOTP</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 4.97 0.05 Using IP address: 192.168.1.4</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 5.00 0.03 myip: (192.168.1.4)</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 5.06 0.06 root addr=192.168.1.42 path=/srv/nfs/vax/netbsd/anoat</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 5.56 0.50 open netbsd.vax: No such file or directory</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 5.58 0.02 > boot netbsd</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 36.93 31.34 2043220+79088 [169744+162143]=0x25768c</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 57.60 20.67 [ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 57.70 0.10 [ 1.0000000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 57.80 0.10 [ 1.0000000] 2018, 2019, 2020 The NetBSD Foundation, Inc. All rights reserved.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 57.87 0.07 [ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 57.97 0.10 [ 1.0000000] The Regents of the University of California. All rights reserved.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 57.97 0.00 </span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 58.05 0.08 [ 1.0000000] NetBSD 9.1 (ANOAT) #1: Thu Nov 19 22:04:31 EST 2020</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 58.11 0.06 [ 1.0000000] <span style="white-space: pre;"> </span>root@:/usr/src/sys/arch/vax/compile/ANOAT</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 58.16 0.04 [ 1.0000000] MicroVAX 3500/3600</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 58.22 0.06 [ 1.0000000] total memory = 16328 KB</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 58.27 0.05 [ 1.0000000] avail memory = 13032 KB</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 60.40 2.13 [ 1.0000000] mainbus0 (root)</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 60.49 0.09 [ 1.0000000] cpu0 at mainbus0: KA650, CVAX microcode rev 4 Firmware rev 83</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 60.55 0.06 [ 1.0000000] lance at mainbus0 not configured</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 60.61 0.05 [ 1.0000000] uba0 at mainbus0: Q22</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 64.54 3.94 [ 1.0000000] sgmap exclusion at 0x3f0000 - 0x3fdfff</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 64.96 0.42 [ 1.0000000] uda0 at uba0 csr 172150 vec 774 ipl 17</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 65.43 0.47 [ 1.0000000] mscpbus0 at uda0: version 4 model 3</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 65.48 0.05 [ 1.0000000] mscpbus0: DMA burst size set to 4</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 72.80 7.32 [ 1.0000000] uda1 at uba0 csr 160334 vec 770 ipl 17</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 79.99 7.19 [ 1.0000000] mscpbus1 at uda1: version 6 model 13</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 80.05 0.06 [ 1.0000000] mscpbus1: DMA burst size set to 4</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 82.49 2.44 [ 1.0000000] qe0 at uba0 csr 174440 vec 764 ipl 17: deqna, hardware address 08:00:2b:XX:XX:XX</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 82.69 0.20 [ 1.0300080] ra0 at mscpbus0 drive 0: RD53</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 82.74 0.06 [ 1.0600080] ra1 at mscpbus0 drive 1: RD32</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 82.80 0.06 [ 1.0900080] rx0 at mscpbus0 drive 2: RX50</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 82.86 0.06 [ 1.1200080] rx1 at mscpbus0 drive 3: RX50</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 88.46 5.60 [ 1.1900080] boot device: qe0</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 88.50 0.04 [ 1.1900080] root on qe0</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 88.55 0.05 [ 1.1900080] nfs_boot: trying DHCP/BOOTP</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 91.68 3.13 [ 4.2200080] nfs_boot: DHCP next-server: 192.168.1.42</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 91.73 0.05 [ 4.2200080] nfs_boot: my_addr=192.168.1.4</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 91.79 0.06 [ 4.2200080] nfs_boot: my_mask=255.255.255.0</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 91.84 0.05 [ 4.2200080] nfs_boot: gateway=0.0.0.0</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 98.20 6.36 [ 10.3300080] root on synthesis:/srv/nfs/vax/netbsd/anoat</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 98.24 0.05 [ 10.3300080] root file system type: nfs</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 98.31 0.07 [ 10.3300080] kern.module.path=/stand/vax/9.1/modules</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 98.39 0.08 [ 10.3400080] TODR too smallWARNING: preposterous TOD clock time</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 98.45 0.05 [ 10.3400080] WARNING: using filesystem time</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;"> 98.50 0.05 [ 10.3400080] WARNING: CHECK AND RESET THE DATE!</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">122.88 24.38 Fri Nov 20 04:01:44 UTC 2020</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">155.75 32.87 Not checking /: not listed in /etc/fstab</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">162.67 6.92 mount: Unknown special file or file system `/'</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">177.78 15.11 Starting file system checks:</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">204.22 26.44 random_seed: /var/db/entropy-file: Bad file system type nfs</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">205.15 0.94 /etc/rc.d/random_seed exited with code 1</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">208.30 3.14 Setting tty flags.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">218.78 10.49 Setting sysctl variables:</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">221.91 3.13 ddb.onpanic: 1 -> 0</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">226.99 5.08 Starting network.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">227.28 0.29 Hostname: anoat.tff.ca</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">243.03 15.75 Configuring network interfaces:.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">243.75 0.72 Adding interface aliases:.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">245.54 1.79 Waiting for DAD to complete for statically configured addresses...</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">347.59 102.05 Building databases: dev, utmp, utmpx.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">369.39 21.81 Starting syslogd.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">428.49 59.10 Mounting all file systems...</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">444.08 15.59 Clearing temporary files.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">460.34 16.26 Creating a.out runtime link editor directory cache.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">546.65 86.31 Setting securelevel: kern.securelevel: 0 -> 1</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">558.94 12.29 /etc/rc: WARNING: No swap space configured!</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">559.65 0.71 /etc/rc.d/swap2 exited with code 1</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">562.11 2.46 Starting virecover.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">581.65 19.54 Checking for core dump...</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">585.27 3.62 savecore: no core dump (no dumpdev)</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">607.05 21.78 Starting local daemons:.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">616.16 9.11 Updating motd.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">704.94 88.78 Starting inetd.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">719.23 14.28 Starting cron.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">735.03 15.80 The following components reported failures:</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">735.07 0.05 /etc/rc.d/random_seed /etc/rc.d/swap2</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">735.13 0.05 See /var/run/rc.log for more information.</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">735.26 0.14 Fri Nov 20 04:11:44 UTC 2020</span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">741.85 6.59 </span></div><div><span style="font-family: Roboto Mono; font-size: x-small;">741.90 0.05 NetBSD/vax (anoat.tff.ca) (constty)</span></div><div><br /></div></div>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-23518884932642675952020-10-25T01:46:00.004-04:002020-10-25T01:47:18.438-04:00ULTRIX 4.00 problems writing to devices hosted on a Linux NFS server<p>When the VAX ULTRIX 4.00 Rev. 158 /usr/diskless/genvmunix kernel does a non-appending write to a device, like "echo foo > /dev/console", that fails if the device is located on a x86_64 Ubuntu 20.10 Linux 5.8.0-25-generic NFS server.</p><p>ULTRIX seems to be at fault. It sends an NFS V2 SETATTR call setting the length of that device file (eg. /dev/console) to zero, and that fails. This behaviour was observed after netbooting ULTRIX, on the root NFS file system, and is a problem for running netbooted ULTRIX. Even if I mount another NFS file system read-only, ULTRIX still sends the SETATTR there. Surely it shouldn't be trying to change things on a file system that's mounted read-only! </p><p>Use of SETATTR to truncate a file is standard behaviour when overwriting a file, like "echo foo > bar". In that case it works fine on a writable file system. Also, ULTRIX doesn't make attempts to change ordinary files on read-only mounted NFS file systems.</p><p>Appending to devices, like "echo foo >> /dev/console" works properly, both on writable and read-only file systems. </p>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-29253282552889187232020-10-19T21:17:00.000-04:002020-10-19T21:17:31.242-04:00Installing MIT Project Athena 4.3BSD onto a VAX<p>Athena 4.3BSD is an MIT modification of 4.3BSD for their <a href="https://en.wikipedia.org/wiki/Project_Athena">Project Athena</a> distributed computing environment. Although it is designed to work in such an environment, it can be installed and used on a single machine. A few things do break, but there are ways around that.</p><p>First, you need the Athena 4.3BSD <a href="https://stuff.mit.edu/afs/athena.mit.edu/system/vax_bsd43/srvd/">srvd tree</a>, and <a href="https://stuff.mit.edu/afs/athena/astaff/project/bootkit/">a way to boot the VAX</a> into a minimal environment. Both are available via http at those links, though if you want proper Unix permissions and ownerships, you should download srvd via <a href="https://en.wikipedia.org/wiki/Project_Athena">AFS</a> if possible.</p><p>You also may need a VAX. I have successfully installed on a VAXstation 2000, MicroVAX II, and VAXstation 3100 m38, but I have not successfully installed in simh yet. Though the RD53 drive image from the MicroVAX II does work in simh.</p><p>Export the srvd tree read-only via NFS, using a server which accepts version 2 NFS and mountd protocols. In Linux you can add --nfs-version 2,3,4 to nfsd and mountd options. In Ubuntu and probably also Debian, in /etc/default/nfs-kernel-server add --nfs-version 2,3,4 to both at the
start of RPCNFSDCOUNT (because RPCNFSDARGS won't make any difference)
and in RPCMOUNTDOPTS.</p><p>I have not mastered netbooting yet. The first stage seems to be etftp loaded via MOP, but then it seems you cannot simply TFTP load the kernel and expect it to run, and I'm not sure the kernel supports root over NFS. If interested take a look at the vax650 folder in bootkit and the LORE file there. In this case, I'm using an RX33 floppy image from bootkit, <a href="https://stuff.mit.edu/afs/athena/astaff/project/bootkit/vs2000/61+.floppy">61+.floppy</a>, to boot a VAXstation 2000. That's an ordinary 5.25" 1.2 MB floppy image, which can be written on a PC using dd or rawritewin. Maybe you could netboot NetBSD/VAX on the same VAXstation 2000 and write from there, but I don't know which version has working floppy support.</p><p>If not using an attached display and keyboard, hook up the serial console. The VAXstation 2000 uses 9600 baud. The initial steps seem to be 8-N-1, but later on the OS switches to 7-E-1, meaning you'll see lots of characters with the high bit set if you don't reconfigure your terminal emulator.</p><p>After booting from the floppy, you'll see kernel output, a few lines from the startup script, a big warning that this destroys the contents of the hard disk, and a prompt for the hostname. I don't believe you can get past this prompt, because it relies on Athena infrastructure to query the hostname. So just control-C out of that. Then you get a prompt. It's a very minimal environment, without even ls.<br /></p><p>Now you need to configure networking and mount the srvd tree via NFS. You need to use get_pack to mount via NFS, because mount doesn't seem to understand it. Change the network device name and IP addresses as needed. Note that the NFS server address and path are separate arguments, and not connected with a colon like you would use with mount.<br /></p><p># stty erase ^H<br /># ifconfig se0 192.168.1.5<br /># get_pack nfs 192.168.1.42 /srv/nfs/vax/athena/srvd /srvd<br />/srv/nfs/vax/athena/srvd server ok<br />/srv/nfs/vax/athena/srvd mounted on /srvd</p><p>At this point you could run stuff from /srvd if you wanted and explore. Note that the root filesystem is on a floppy and there is little space and few inodes available there. To continue the installation, you need to set some variables and run the phase 2 installer.</p><p># MACH=VS2000<br /># save_site_flag=false<br /># . /srvd/install/phase2.sh<br /></p><p>Actually, you might want to first look at phase2.sh, because it assumes some things. For me it was a perfect fit because it assumed the disk was an RD32, but you might have a different hard disk. Also, if your VAX has multiple hard disks, and you want to install onto a particular one, be careful. Remember the front panel write protect buttons.</p><p>The installer worked fine, except umount didn't work, and at the end I got a "/dev/rrd0a: DIRECTORY /etc/athena: LENGTH 1040 NOT MULTIPLE OF 512 (ADJUSTED)" warning. This should put a bootable system on your hard disk, but some customizations are needed for a successful multi-user boot. If you try to boot you'll get errors which might be mostly unreadable over serial because new console output starts before old output is finished, making network configuration failure look like "Setticannot opeUnablePleaseHaltinsyncing disks... done". If you do end up in that situation, boot with "b/2 dua0" to enter single user mode and fix things from there.</p><p>Since /etc/athena/rc.net relies on Athena infrastructure, I replaced that line in /etc/rc with just a simple "/etc/ifconfig se0 192.168.1.5". Also, change the configuration in /etc/athena/rc.conf. You can set everything false except for NFSCLIENT if you need it to mount srvd. In particular AFSADJUST takes a long time or maybe never completes, and needs to be disabled.</p><p>The installer only creates the root filesystem and a site filesystem for local storage. Most of the operating system is in the srvd tree, which will need to be read-only mounted at /srvd. If you don't have space to put it somewhere on the VAX, again mount it via NFS. Add the hostname of the server to /etc/hosts, and add the line for mounting it to /etc/fstab. You can't mount via IP address in fstab.<br /></p><p>In /etc/ttys, there are lines which either start an X display manager or getty in text mode. Booting the VAXstation 2000 from serial, X fails to start. This means a wait for a timeout before getting a login prompt. Commenting out the /etc/athena/dm line for console and uncommenting the /etc/getty line fixes that.</p><p>You can get rid of the root password by removing the 2pEdLRdD8rMnk from /etc/passwd. (Documents about Athena say the root password of workstations is identical and not secret, but I don't know what it is.) Trying to set a new password via passwd doesn't work because it wants to talk to a Kerberos server.</p><p>That should be it. You now have a VAX which runs Athena 4.3BSD. You can even run X on a VAXstation or a KA630 MicroVAX with QDSS. (The KA650 kernel doesn't include QDSS support, though the bootkit one seems to have it.) It's leaner than NetBSD, even working fine on a VAXstation 2000 with 4 MB RAM. <br /></p>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-15284234821672486552020-10-16T00:05:00.000-04:002020-10-16T00:05:18.205-04:00AT motherboard serial connector pinouts can differ between motherboards<p>Older AT format motherboards don't have a back panel with many connectors, like an ATX motherboard. The only direct external connection is for a keyboard. Many motherboards have onboard serial and parallel ports. These connect to the outside via ribbon cables which go to standard connectors. The standard connector is mounted on an expansion slot cover or elsewhere on the case (so slots aren't wasted for this), and the ribbon cable connects to the motherboard.</p><p>Different motherboards can have the same ribbon cable connectors for serial and parallel ports. However, the pinout of those connectors differs, and swapping motherboards may require swapping those connectors. <br /></p>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-15179019829760136992020-10-15T23:44:00.001-04:002020-10-15T23:44:10.173-04:00ATI Mach 64 GX character generator failure<p>This is an PCI video card from ATI, based on the 210888GX00 Mach64 chip. I think it's a Graphics Pro Turbo. It is only designed to accelerate the Windows desktop, and was released well before 3D cards became common. To the right you see a 2 MB VRAM expansion board which plugs into the main board.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxUOU6ImmmTGKm4O3yEKTgxrS-7KhReb05RdpIQGn3SAwNiTGYoftskjqcoBHzPgxlwMK7HbwNQXhRkKvy7sCK3LyNb2fbQQcSZNtXRRI1EcDEPT4gXuhvaJYt0HLhj9X04q97/s2048/PA140584-crop.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1177" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxUOU6ImmmTGKm4O3yEKTgxrS-7KhReb05RdpIQGn3SAwNiTGYoftskjqcoBHzPgxlwMK7HbwNQXhRkKvy7sCK3LyNb2fbQQcSZNtXRRI1EcDEPT4gXuhvaJYt0HLhj9X04q97/s320/PA140584-crop.JPG" width="320" /></a></div>Here's the image produced by the card: <div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEyCPE_x1Y-ii8fAKnAf9IhTMWw8DIaDxIcB41HDQPyKEfbu5XjHt9zzsbBcnCKuNeIQL5gAfYWxKa61m3l9L4C4R7ZKkKftpYaulLpygsctYyPD_dtubGFMtQCs1HdQdU3EW3/s2048/PA110321.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1699" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEyCPE_x1Y-ii8fAKnAf9IhTMWw8DIaDxIcB41HDQPyKEfbu5XjHt9zzsbBcnCKuNeIQL5gAfYWxKa61m3l9L4C4R7ZKkKftpYaulLpygsctYyPD_dtubGFMtQCs1HdQdU3EW3/s320/PA110321.JPG" width="320" /></a></div><p>Note that this isn't just random garbage. It is a text mode screen. Some characters are blank and the rest are all the same horizontal lines. Colours are still there. This is a BIOS startup screen. At the top right you would see the Energy Star logo in yellow and EPA pollution preventer in green. Those graphics are created in text mode by changing some characters of the font and putting them there. So, both standard and user defined characters are wrong the same way.</p><p>It's weird that such a card failed while sitting unused in a PC for a long time. I don't know what's wrong with it. If anyone knows, leave a comment.<br /></p>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-58037046622304340522020-10-15T23:22:00.001-04:002020-10-15T23:22:10.757-04:00An ugly fix for on ODIN OEC12C887A RTC<p>The Odin OEC12C887A chip contains a battery backed real time clock and a small amount of battery backed RAM. The battery and the crystal needed for this are part of the chip. Many old motherboards use these chips, and have them soldered onto the board. Of course, batteries don't last forever, and when they fail, motherboards lose the time, date and settings. Unfortunately it seems settings cannot be retained even while the PC is on. After applying settings, the BIOS reboots and then reports they're invalid. Some motherboards can function this way, with problems related to few settings, like floppy drive type. Others may not allow you to boot.<br /></p><p>Then the proper fix is to unsolder the chip, solder a socket, and put a new chip into the socket. Though it's also possible to drill into the chip and connect a new 3V lithium non-rechargeable battery, such as a CR2302. I don't have a Dremel or equivalent, so I used a soldering iron. The result is ugly but it works. Here is a photo of the chip with exposed connections:</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIHZa-OmJomQ8q6BhubIp9MoMzI-AY45UleuL5DAnyU0Skd3h_XqeM-DSGRyWtlvBOyG1YQFSvaqg2LKKrA0eKSyiBM4RkAqSNxSCq9mNaydQUniP3bxqGrzLl3Hh2VI9LMJDF/s2048/PA140010.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1532" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIHZa-OmJomQ8q6BhubIp9MoMzI-AY45UleuL5DAnyU0Skd3h_XqeM-DSGRyWtlvBOyG1YQFSvaqg2LKKrA0eKSyiBM4RkAqSNxSCq9mNaydQUniP3bxqGrzLl3Hh2VI9LMJDF/s320/PA140010.JPG" width="320" /></a></div>You can see 5 metal pieces among the melted plastic. Going clockwise you see a pin from the chip, a tiny bit of metal which it was pried away from (which connects to the bottom of the battery), the top of the battery, a bit of metal connecting to the top of the battery, and another pin from from the chip which was pried away from that.<p></p><p>To understand this better, imagine a normal <a href="https://en.wikipedia.org/wiki/Dual_in-line_package">dual in-line package (DIP)</a> chip. The pins come out the side and bend downwards, in order to go through holes in the circuit board and connect to the rest of the circuit. In this case, some of the pins instead bend upwards, and connect to the battery and crystal. If you look underneath the board you'll see that some pins are missing, and some or all of those are bent upwards. Probably these devices start off as a typical DIP package, which is then encased in a second layer of plastic after those components are added.</p><p>The pinout can be found at <a href="https://www.betaarchive.com/forum/viewtopic.php?t=22000">https://www.betaarchive.com/forum/viewtopic.php?t=22000</a>, in particular in <a href="https://www.betaarchive.com/imageupload/1315669616.th.50593.jpg">this image</a>. Pin 16 is negative, and pin 20 is positive. Pin 16 has continuity with motherboard ground. Pin 20 has continuity with the larger surface of the coin cell, which is generally positive. Probably the crystal is connected to pins 2 and 3.</p><p>It doesn't smell too bad, and controlling the temperature so it's mostly melting and not burning plastic helps. I'm not going to recommend it because plastic fumes might be unhealthy, and I certainly wouldn't want to do this on a regular basis. But the repair was a success. The PCI slot is fine too, with only very minor cosmetic damage to the outer surface.<br /></p>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-14502847121124439522020-10-12T11:08:00.004-04:002020-10-12T11:16:58.960-04:00Fix for Tseng ET3000AX SVGA card displaying monochrome<p>This is a <a href="https://www.microlabs.com/">Micro-Labs</a> VGA Solution, an ISA super VGA card based on the Tseng Labs ET3000AX. It seems to be a reference design because other brands of cards also exist with the same board layout. It displayed in monochrome on the SVGA monitor.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp4k_ZnnQjNzl2_86NH1pzjzz9Fc2KPzwziwVZtPoijsMDYcgWq1bV2V9hdsp65EhabCiZSr2IwIrBRSwbayOsWJuHfyO6p0FLrj3AHXNF6fDloqHxQh5IT1a3CK6PomPnVWwz/s2268/PA110334-crop.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="898" data-original-width="2268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp4k_ZnnQjNzl2_86NH1pzjzz9Fc2KPzwziwVZtPoijsMDYcgWq1bV2V9hdsp65EhabCiZSr2IwIrBRSwbayOsWJuHfyO6p0FLrj3AHXNF6fDloqHxQh5IT1a3CK6PomPnVWwz/s320/PA110334-crop.JPG" width="320" /></a></div><p>At first I thought the switches on the back were set incorrectly. They tell the board what kind of monitor is connected and whether it's primary or secondary. <a href="ftp://ftp.oldskool.org/pub/drivers/HardwareDoc/Graphic%20Cards/et3000ax/et3000ax.html">They're documented here</a>, but basically they all need to be off. That tells it a that it's the primary card, a "multisync analog monitor" is connected, and a secondary monochrome card may or may not be present. Up, away from the circuit board, is off.</p><p>The switches seemed to make no difference. So, I thought the board was broken. But no, the <a href="https://en.wikipedia.org/wiki/VGA_connector">VGA connector standard</a> changed. Those switches only talk about colour and monochrome regarding TTL monitors, using the DB9 connector. The VGA monitor is detected via monitor ID bits according to the old VGA connector standard. The current standard doesn't include those and instead uses an EEPROM providing information about the monitor. It seems that based on what the board detects on those ID bits, it can go into monochrome mode. All the palette entries get transformed via <a href="http://www.techhelpmanual.com/173-int_10h_12h_bl_33h__enable_disable_gray_scale_summing.html">gray-scale summing</a>, making everything black and white. This even happens if you try to set the palette via int 10h.</p><p>A software solution is <a href="https://www.vogons.org/viewtopic.php?t=27398#p213315">coloron.com</a>, which uses int 10h functions to switch the card to colour mode from DOS. Another solution is to boot with the monitor disconnected. This doesn't only mean power-on, but also if you reboot via the reset button or control-alt-delete. I opted for a hardware solution, cutting the circuit board trace between those connector pins and the rest of the card:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXsZusuChafpBrLIhZRZdO8uoouB2QnpO0jpVqyy1IIt88fbLxtxNhlCunFoEgJ0ihOddkfzgcS6HLUzOPQHWRliR2T3e8kVIxtWKo3UByIdfsW38XnZYp4nac1EmciPYiUPgv/s2048/PA110327.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1532" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXsZusuChafpBrLIhZRZdO8uoouB2QnpO0jpVqyy1IIt88fbLxtxNhlCunFoEgJ0ihOddkfzgcS6HLUzOPQHWRliR2T3e8kVIxtWKo3UByIdfsW38XnZYp4nac1EmciPYiUPgv/s320/PA110327.JPG" width="320" /></a></div><p>One last thing. The old VGA connector standard has a key at pin 9, meaning no pin there in the male and no hole there in the female. Now that is +5 V DC supplied to the monitor for the identification EEPROM. You might want to drill a hole there in the connector to avoid breaking pins on more modern VGA connectors.</p>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-20400736991133760762020-10-05T23:25:00.002-04:002020-10-05T23:25:27.086-04:00Telequipment D54 oscilloscope bad MPS6518 transistor in sweep-gating bistable<p>My Telequipment D54 oscilloscope didn't show a trace. Instead, if I turned up brightness all the way there were some very faint blobs which changed a bit with the horizontal position adjustment. If I pulled the plug, the spot appeared coming from the left of the screen. This is similar to when trigger stability has been turned up and it is not being triggered, but stability couldn't make it work and even external X input mode did not work.</p><p>The service manual (<a href="https://www.radiomuseum.org/r/telequip_oscilloscope_d54.html">available at radiomuseum.org</a>) contains schematics and a detailed circuit description.</p><p>Clearly the horizontal deflection circuit was pushing the beam all the way to the left. I first removed JFET TR107 and connected a resistor to ground from the sawtooth output. This affected the voltage at the collector of TR108, and the horizontal deflection amplifier worked as expected. But there was still no spot on the screen. I assumed that was due to blanking.</p><p>The fact the CRT was blanked and even external X input didn't work made me focus on the sweep-gating bistable built around TR105 and TR106 transistors. After probing it a bit I unplugged TR105, an MPS6518 transistor, and to my surprise the base seemed open circuit. I don't know what made it fail there. Putting in a 2N2907A made it work. This replacement was very easy thanks to the fact all the transistors are socketed. Here's the right side board with the timebase circuitry, a closeup on TR105, and the bad MPS6518 transistor:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuVvyZnzgJLDaEHCFK-JqMK2lYnZvs6ToYQY7bM3vA-FEoQvANQxWzhdeWIWl9EIzLnRhKKaDvL8GX9In8XjDHRW_TBn-5i2fehudemEUjp6i3CmqhxZwn2XkYGy11fe1dDw5W/s2288/PA050286.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1712" data-original-width="2288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuVvyZnzgJLDaEHCFK-JqMK2lYnZvs6ToYQY7bM3vA-FEoQvANQxWzhdeWIWl9EIzLnRhKKaDvL8GX9In8XjDHRW_TBn-5i2fehudemEUjp6i3CmqhxZwn2XkYGy11fe1dDw5W/s320/PA050286.JPG" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8kJXdl6f9skCdkG6SDShXiqFhW-IgiuWn8RVriOI2DW9-Q-LplNqQM5fqd9puwZRZt7tZoOWTNIthSKgtwv5nBYQWogWcstSYM1sNazhI2Q76R3b-18K1uzfalmMTEltxfZyp/s2288/PA050276.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1712" data-original-width="2288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8kJXdl6f9skCdkG6SDShXiqFhW-IgiuWn8RVriOI2DW9-Q-LplNqQM5fqd9puwZRZt7tZoOWTNIthSKgtwv5nBYQWogWcstSYM1sNazhI2Q76R3b-18K1uzfalmMTEltxfZyp/s320/PA050276.JPG" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6UtD7J6R6Vtqg7CaaY2K_r7YgKbsDANtMC8YQA7O1XyM6mpu79zbWR0hiL5Pqa2fw-dtalFuqBm-eVKgjMd8SRxUZZWitvfs80YZcORbHviWjj9eIPGDHE8K_ZqOq4DajBz1f/s776/PA050282-crop.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="776" data-original-width="727" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6UtD7J6R6Vtqg7CaaY2K_r7YgKbsDANtMC8YQA7O1XyM6mpu79zbWR0hiL5Pqa2fw-dtalFuqBm-eVKgjMd8SRxUZZWitvfs80YZcORbHviWjj9eIPGDHE8K_ZqOq4DajBz1f/s320/PA050282-crop.JPG" /></a></div><br /><p>For completeness, here's the left side board, with the two channel inputs, vertical amplifiers, and trigger circuitry which provides an input to that sweep-gating bistable:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK8XhtNkpdCsxLYWTZgnSM8cCJumG4pOplrcoQW9kE_2MVZh6gL60u6dQf-mOAzy7MqKaZMYRlUifiAkMbzXlmuec-iyQ4TNRjdW6c6whX9g_LP-ZSbn2sti2ABRoudRIsCkiY/s2288/PA050290.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1712" data-original-width="2288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK8XhtNkpdCsxLYWTZgnSM8cCJumG4pOplrcoQW9kE_2MVZh6gL60u6dQf-mOAzy7MqKaZMYRlUifiAkMbzXlmuec-iyQ4TNRjdW6c6whX9g_LP-ZSbn2sti2ABRoudRIsCkiY/s320/PA050290.JPG" width="320" /></a></div><br /><p><br /></p>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-19120472209677157532020-10-02T11:36:00.002-04:002020-10-02T11:50:35.991-04:00DEC KA650 (MicroVAX III / 3500 / 3600) error 62 can mean a bad keyboard connected to QDSS<p>My MicroVAX produced no output via the QDSS. I saw the monitor flash as if the QDSS was initialized, but video output appeared. Instead text went to the serial console of the KA650 CPU board. There, at the start of self test, I saw an error:</p><p>?62 2 08 FF 00 0000</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7aUlOiiSg5q7df2wUvmsNsRFexkXGBWL1sNkVSqFjJaOAv-vUhK1Khnxtxj8nr0_KgZ_AvW7nifN3LYyLklJl8NB_OS2FZ-2u__fEsQnD0OAidtQsExulHhar67XLOa8MYrBY/s2048/PA010277.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1532" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7aUlOiiSg5q7df2wUvmsNsRFexkXGBWL1sNkVSqFjJaOAv-vUhK1Khnxtxj8nr0_KgZ_AvW7nifN3LYyLklJl8NB_OS2FZ-2u__fEsQnD0OAidtQsExulHhar67XLOa8MYrBY/s320/PA010277.JPG" width="320" /></a></div><br /><p></p><p>According to the <a href="http://bitsavers.trailing-edge.com/pdf/dec/vax/650/EK-KA650-UG-003_KA650_CPU_Module_Technical_Manual_Mar89.pdf">KA650 CPU Module Technical Manual</a>, this is:</p><p>62 2004 E254 console QDSS mark_notpresent self test r0 self test r1 ****</p><div>It appeared at the same time as a keyboard beep. At the end of self tests there was the ominous "Normal operation not possible" warning. Swapping the LK201 keyboard fixed the problem. The keyboard causing the problem had all 4 LEDs lit, while the working keyboard had them all unlit except for a flash during initialization. There is no more error, and QDSS console works fine.</div><div><br /></div><div>The MicroVAX can still boot NetBSD/VAX 1.3_BETA from the RA90 drive. Digital sure built this stuff to last!</div><div><br /></div><div>The known failing parts are the RD53 drives. They can spin up with the trick of disconnecting the head actuator coil at startup, but have many read errors. I'll try reformatting them.</div>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-47500328645914470132020-09-24T14:09:00.006-04:002020-09-24T14:15:48.113-04:00Netbooting SunOS on a SPARC workstation from Ubuntu 20.04<p>The general procedure for booting a Sun SPARC workstation over the network is well documented. I <a href="https://kb.pocnet.net/wiki/SunOS_4_network_boot_howto">liked this guide</a>.The post here exists to document ways in which things break in modern Ubuntu and changes which need to be made. I was booting a SPARCstation ELC.</p><p>First you need an IP address. It is best to choose a name, add that line to /etc/hosts, and use the name whenever possible.</p><p>The boot process starts with the workstation requesting its IP address via Reverse Address Resolution Protocol (RARP). This simply works. Install the rarpd package and put the address in /etc/ethers.</p><p>You can now load boot (like kvm/stand/boot.sun4c) or the kernel (kvm/stand/vmunix) via TFTP. Note that the file name is the IP address followed by period and the architecture, capitalized, like C0A8017B.SUN4C for a SPARCstation ELC at 192.168.1.123.</p><p>In either case the next step is an answer from bootparamd. Install the bootparamd package, but it won't see the requests, because they're broadcasts and not sent to the server's IP address. You need to add -r to OPTIONS in /etc/default/rpcbind for bootparamd to see the requests. For some reason the lines adding to options weren't expanding ${OPTIONS}, so I had to set them all at once. It will then answer. You must supply both root and swap values in /etc/bootparams.</p><p>After that the final step is NFS. Install nfs-kernel-server. SunOS will want NFS and rpc.mountd version 2 protocols, which are disabled. In /etc/default/nfs-kernel-server add --nfs-version 2,3,4 to both at the start of RPCNFSDCOUNT (because RPCNFSDARGS won't make any difference) and in RPCMOUNTDOPTS. Note that /etc/exports requires directories, so to share a swap file you need to share a directory containing it.</p><p>If you sent boot via TFTP, it will make a bootparamd request and then load the kernel via NFS. That might be faster than loading the kernel via TFTP, because TFTP is simple and inefficient. The kernel makes another bootparamd request, and then mounts root and swap. What happens afterwards is up to what's in the root file system.</p><p>Don't forget to restart daemons after changing configuration files.</p><p>When creating devices in the root file system, ./MAKEDEV std is insufficient. You need ./MAKEDEV pty for telnet or xterm, and ./MAKEDEV win for the windowing system. The MAKEDEV script worked fine from Linux. The arch -k error is harmless unless you're using a sun4m system.</p>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com3tag:blogger.com,1999:blog-8934044.post-18698925292307991912020-09-24T13:32:00.001-04:002020-09-24T13:32:30.459-04:00SPARCstation ELC repair<p>The SPARCstation ELC is a SPARC workstation built into a monochrome CRT monitor. It is fanless, and gets quite hot, which is bad for electrolytic capacitors. I suspect that also some particular capacitor models used are bad.</p><p>Accessing the computer motherboard (under the cover at the back of the top) is very easy. Unfortunately, disassembling the rest isn't very convenient. Maybe the design tried to make it convenient at first, and then changes defeated that.</p><p>Before disassembling further, consider the shock and electrocution hazards. Obviously the line voltage side of the power supply is dangerous. The secondary side is dangerous too, because besides supplying safe voltages to the computer, it also supplies higher voltages to the monitor. The main monitor board uses those to make even higher voltages, and sends some of these to the CRT socket board. Due to capacitors, voltages can persist even when the device is turned off and unplugged.</p><p>The first problem was the power supply, the board to the right when viewed from the rear. It seems like it could be possible to lift out, but the speaker bracket screwed into its bottom prevents that. So the whole side needs to be freed and moved outwards.</p><p>The power supply was pulsing. This can happen when an SMPS detects a fault, shuts down and restarts, but that's not what was happening here. The -12 V rail had excessive ripple, and I replaced its 100 µF 16 V filter capacitor (the missing C528 in the photo) to fix that, but it wasn't causing the problem either.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv7K_bC7-KtyFyxs7fDuJemAi-UDc5JvhQWa_VKwFAu63UrZ7u-n5cjkU_UpAxulgSGOn6nr4hp4-CsqEP9eOFYHrIcERqrMq5BfM0wjiV7TrT2Ol9Cc0ICFvz-hbKKK3lvv0V/s2288/P9190136.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1712" data-original-width="2288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv7K_bC7-KtyFyxs7fDuJemAi-UDc5JvhQWa_VKwFAu63UrZ7u-n5cjkU_UpAxulgSGOn6nr4hp4-CsqEP9eOFYHrIcERqrMq5BfM0wjiV7TrT2Ol9Cc0ICFvz-hbKKK3lvv0V/s320/P9190136.JPG" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><p>Just guessing I saw the 100 µF 35 V capacitor near what seems to be the SMPS controller IC. The board in that area was browned due to heat around various holes, so it makes sense that the capacitor may have been ruined by heat. Also, a failure in power supply to that IC could cause the symptoms. After testing the theory by temporarily placing a capacitor in parallel, I replaced the capacitor and fixed the problem.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6sJhdtZPrp8kvzMLGMWhdDx2kbWMibsZtVd_ar2m2t5e7NOzkZSMspeL2nyvFqCfVfpvRND7Dy7qfFX3T22k96pP32Q_xzGqnDB3F-cJjoXNn8jDXnLz4EL0HK3UusSe62OU-/s2288/P9190138.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1712" data-original-width="2288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6sJhdtZPrp8kvzMLGMWhdDx2kbWMibsZtVd_ar2m2t5e7NOzkZSMspeL2nyvFqCfVfpvRND7Dy7qfFX3T22k96pP32Q_xzGqnDB3F-cJjoXNn8jDXnLz4EL0HK3UusSe62OU-/s320/P9190138.JPG" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>Now the picture was barely visible. The firmware screen has black text on a white background, but the text was just a bit darker than the background. Replacing the two visibly leaking pairs of back to back 100 µF 10 V capacitors at the bottom of the CRT socket board took care of that.It turned out those transistors, labelled ITT 895 115C, near the corner of the board were bad as well. According to NTE's cross reference, 2N4401 was a good substitute. I don't know why they failed. I thought maybe I damaged them by accidentally solder bridging surface mount tubular C417S to the neighbouring resistor on the underside while replacing the rightmost capacitor, but that solder bridge apparently needs to be there. I also replaced some other capacitors but am not sure any of that was necessary. This board is probably the worst for capacitors because it is in its own RFI shield box inside the monitor.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcVfyXQmaD5FF8ndHyKzZEca8yLiw52hlU14yClrKzdYsO-TDznhFhkL2edn7TO8zQA-mZgaWVf4mnI1RDR8HnL528Z8_LS-ojn9eF79omnTsatAhU5lRIvBTTwp9R_rAvisw4/s2064/P9190154.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1292" data-original-width="2064" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcVfyXQmaD5FF8ndHyKzZEca8yLiw52hlU14yClrKzdYsO-TDznhFhkL2edn7TO8zQA-mZgaWVf4mnI1RDR8HnL528Z8_LS-ojn9eF79omnTsatAhU5lRIvBTTwp9R_rAvisw4/s320/P9190154.JPG" width="320" /></a></div><br /><div><br /><p>Note that the CRT socket board requires the RFI shield to make ground connections. The main ground area visible at the CRT socket and the three tabs to the left of it need to be connected by wires if you remove that shield and want to power on the monitor.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6ZX2rOIiVD8JnlDsUCm2FgjIkQ_HPlj96uiBlVRztFodU9MHwRXOH-EWZADNKqjdxoUuwWn4AIXpOvHk3pPapT6rOBIDEI_6Yag9fpRDerVT3CSpSC4g0zFaVOPpBdqQ-L3dI/s2272/P9220206.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1066" data-original-width="2272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6ZX2rOIiVD8JnlDsUCm2FgjIkQ_HPlj96uiBlVRztFodU9MHwRXOH-EWZADNKqjdxoUuwWn4AIXpOvHk3pPapT6rOBIDEI_6Yag9fpRDerVT3CSpSC4g0zFaVOPpBdqQ-L3dI/s320/P9220206.JPG" width="320" /></a></div><p>Finally there was some vertical foldover at the top. It was interesting to note that its start stayed in place as vertical size and position was adjusted. Multiple guides about this problem with CRTs in general say that the prime suspect is the pump-up capacitor. The vertical deflection circuit needs a pulse of higher voltage to overcome inductance and quickly move the beam back to the top. This is accomplished via a charge pump, which charges a capacitor in parallel with the supply, and then connects it in series, to provide that higher voltage. That was another one of those 100 µF 35 V light blue capacitors, like in the power supply (the large cap in this photo). Here are the definitely bad components:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpuQLUiJ4W8vKFguYDyvSaKzfG9_pSlR7Wl7-VMKGxgQY7MTneZrKUOqCtIUZle2S0KCu0jLKOoQEeH_sCdsbJQt2uwcf6e6-NLO60izCt7VsXQmpMc8fs0v9qV0gRMLMlwOFw/s2236/P9230238-crop.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="750" data-original-width="2236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpuQLUiJ4W8vKFguYDyvSaKzfG9_pSlR7Wl7-VMKGxgQY7MTneZrKUOqCtIUZle2S0KCu0jLKOoQEeH_sCdsbJQt2uwcf6e6-NLO60izCt7VsXQmpMc8fs0v9qV0gRMLMlwOFw/s320/P9230238-crop.JPG" width="320" /></a></div><p>If you want to see more photos, <a href="https://photos.app.goo.gl/RFemZ5PzCDtBJyEX8">take a look at the album</a>.</p></div>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-65358063404649399282020-09-04T21:07:00.002-04:002020-09-04T21:07:48.556-04:00Fixing Whirlpool part 3378207 to make dishwasher start washing reliably<p>A dishwasher doesn't simply recirculate water while washing. It tries to separate solids coming off the dishes from the water, and recirculate only the water. Some dishwashers have filters. This dishwasher has a soil separator. First, a chopper breaks up any large particles. Then part of the water being pumped by the wash impeller goes through the plastic doughnut surrounding it, where baffles try to trap particles. Later, when the dishwasher pumps out water, it pumps from the soil separator, sending the particles down the drain.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDBOGmy-oPBKr1k4l_K9mwF2Kpd8B3UiFxa1Ira3EtVzVvaaWH3OzSxNS5-lxIOyF1EjO70oi8zv8wjUJRbP1UUHA52JYU7Z6dopbhm7q8CzZmIw_JuDtuUFMujKa6lYmqM_vV/s2048/P8280220.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1532" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDBOGmy-oPBKr1k4l_K9mwF2Kpd8B3UiFxa1Ira3EtVzVvaaWH3OzSxNS5-lxIOyF1EjO70oi8zv8wjUJRbP1UUHA52JYU7Z6dopbhm7q8CzZmIw_JuDtuUFMujKa6lYmqM_vV/s320/P8280220.JPG" width="320" /></a></div>The outlet of the soil separator connects to the drain pump via the drain pump cover. Also, the outlet of the soil separator has a simple valve operated by water pressure. Under that little cover to the right is a diaphragm which is pushed down by a spring to open the passage. When pressure builds up, it acts against the spring, pushing the diaphragm upwards, and pulling a rubber cone which blocks the passage.<p></p><p>But, how does that pressure build up in the first place, while the passage is open? I'm assuming it builds up due to the drain impeller spinning the wrong way. Both the wash and drain impellers are on the same shaft, and the current function depends on the rotation direction, determined via the motor start winding.</p><p>However, if water leaks out elsewhere, then pressure may not build up enough to push up the diaphragm and seal off the passage. That Whirlpool 3378207 drain pump cover has a rubber gasket on top. It has a thin plastic ridge surrounding that gasket, to keep the gasket in place. That ridge breaks off, and then pressure stretches the gasket, allowing water to leak out. The result was that sometimes the dishwasher would fill with water normally and not start washing, even though the pump was running. It's surprising that enough water can escape that way to cause this, but apparently it can.</p><p>If I stopped and restarted it while full of water, it always started properly. I guess the big pulse happening when the pump starts provided enough pressure to move the diaphragm, but the slow pressure increase happening as it was filling didn't.</p><p>I cut two thin slices from a copper water line, and soldered them into the appropriate shape for holding the gasket in place. The gasket had been stretched a lot, but I managed to squeeze it into place.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi05Vf9Cf9Qgm6JA1AJNblf7RrEL2VQoRhyphenhyphen-UmI9taNk5Xz8s-P5dNfjCMEBdca8frSzu8sL4x7nJms98Es8wXXVRnoCKkycMCZ8sc05kTwgnntkcxmkehH6GIJNQ0fSaKDajPh/s2048/P8280233.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1532" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi05Vf9Cf9Qgm6JA1AJNblf7RrEL2VQoRhyphenhyphen-UmI9taNk5Xz8s-P5dNfjCMEBdca8frSzu8sL4x7nJms98Es8wXXVRnoCKkycMCZ8sc05kTwgnntkcxmkehH6GIJNQ0fSaKDajPh/s320/P8280233.JPG" width="320" /></a></div><br /><p></p>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-6778663563731072192020-05-14T23:42:00.000-04:002020-05-14T23:42:19.731-04:00Using SpeedFan's driver to call Dell BIOS functions for fan control<div><a href="https://www.almico.com/speedfan.php">SpeedFan</a> uses a signed driver to talk to hardware for temperature measurement and fan control. The fact it's signed is important because Windows 10 makes running unsigned drivers difficult. <a href="http://www.bugtrack.almico.com/view.php?id=3090">I wasn't satisfied</a> with how SpeedFan fights with Dell Inspiron 6400 laptop's built in Fan control. <a href="https://www.diefer.de/i8kfan/index.html">I8kfanGUI</a> was better, but didn't have a signed driver, so I only used that in Windows 7 and earlier.</div><div><br /></div><div>I also wasn't satisfied with fan control options in Linux. The Linux kernel provides access to Dell BIOS temperature measurement and fan control functions via the i8k driver, but attempting fan control led to the same issues. So, I first created a small fan control program in C in Linux. Getting it to run in Windows was surprisingly easy, thanks to SpeedFan's driver. First one needs to open the driver:</div><div><br /></div><div> sfdrv = CreateFile("\\\\.\\SpeedFan",<br /> FILE_ALL_ACCESS, FILE_SHARE_READ, NULL,<br /> OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);<br /></div><div><br /></div><div>Then one can use the IOCTL to call Dell BIOS functions:</div><div><br /></div><div>#define SFD_CALL_DELL 0x9C402424<br /></div><div><br /></div><div>int call_dell(uint32_t eax, uint32_t ebx)<br />{<br /> uint32_t inbuf[4], outbuf[4];<br /> DWORD readbytes = 0;<br /><br /> inbuf[0] = eax;<br /> inbuf[1] = ebx;<br /> inbuf[2] = 0;<br /> inbuf[3] = 0;<br /><br /> if (DeviceIoControl(sfdrv, SFD_CALL_DELL,<br /> &inbuf, sizeof(inbuf),<br /> &outbuf, sizeof(outbuf),<br /> &readbytes, NULL) == 0 ||<br /> readbytes < 4) {<br /> return -1;<br /> } else {<br /> return outbuf[0] & 0xFF;<br /> }<br />}<br /></div><div><br /></div><div>I don't know if you need to read and write 16 bytes. SpeedFan always did it this way. I guess they're probably eax, ebx, ecx and edx, in little endian order of course. Certainly the first two seem to be eax and ebx. The i8k Linux driver, now part of <a href="https://elixir.bootlin.com/linux/latest/source/drivers/hwmon/dell-smm-hwmon.c">dell-smm-hwmon.c</a>, will show you what to do with this.</div><div><br /></div><div>#define I8K_SMM_SET_FAN 0x01a3<br />#define I8K_SMM_GET_FAN 0x00a3<br />#define I8K_SMM_GET_TEMP 0x10a3<br /></div><div><br /></div><div>int get_temp(unsigned int which)<br />{<br /> return call_dell(I8K_SMM_GET_TEMP, which);<br />}<br /><br />int get_fan(void)<br />{<br /> return call_dell(I8K_SMM_GET_FAN, 0);<br />}<br /><br />int set_fan_real(int speed)<br />{<br /> if (speed < 0 || speed > 2) return -1;<br /> return call_dell(I8K_SMM_SET_FAN, (speed << 8) | 0);<br />}<br /></div><div><br /></div><div>In my program I used the following rules to reduce fighting between my fan control and the built in fan control: Read fan speed setting (not RPM, but off / low / high) before setting
it. Only write it to change it (because otherwise it's pointless). It is
always okay to raise fan speed. Once the program raises fan speed, it
is allowed to lower it. If the program reads a speed that is higher than
the last one it set, it is not allowed to lower it anymore until after
the next time it raises fan speed.</div><div><br /></div><div>I used the <a href="http://www.rohitab.com/apimonitor">rohitab.com API Monitor</a> to figure this out by watching the DeviceIoControl calls that SpeedFan was using.</div><div><br /></div><div>Other people have also used the SpeedFan driver. Although you need to have Administrator rights to talk to the driver, the driver seems to be a bit of a security hole because even Administrator isn't supposed to have such absolute total control in Windows. Here's one example: <a href="https://github.com/SamLarenN/SpeedFan-Exploit/">https://github.com/SamLarenN/SpeedFan-Exploit/</a></div><div><br /></div><div>Here's an example of MSR reading to get the temperature from the CPU's internal thermal sensor:</div><div><br /></div><div>#define SFD_READ_MSR 0x9C402438<br /><br />int read_msr(uint32_t msr, uint64_t *dest)<br />{<br /> DWORD readbytes = 0;<br /> if (DeviceIoControl(sfdrv, SFD_READ_MSR,<br /> &msr, sizeof(msr),<br /> dest, sizeof(*dest),<br /> &readbytes, NULL) == 0 ||<br /> readbytes != sizeof(*dest)) {<br /> return -1;<br /> } else {<br /> return 0;<br /> }<br />}<br /><br />int get_coretemp(void)<br />{<br /> uint64_t msrdata;<br /> if (read_msr(0x19C, &msrdata) < 0) return -1;<br /> if (msrdata & 0x80000000) {<br /> return 100 - ((msrdata >> 16) & 0x7F);<br /> } else {<br /> /* Reading not vaid */<br /> return -1;<br /> }<br />}</div><div><br /></div><div>I'm not using that because the CPU sensor reported by the Dell BIOS gives the temperature of the hottest core. It seems if I read the MSR directly I would have to run the code on each core I want to measure. Calling Dell BIOS once is simpler.</div><div><br /></div><div>I hope the code didn't get mangled by blogger. I haven't written anything here in a long time. Trying to format stuff as code, in a fixed font, made it too wide, so I didn't bother.<br /></div>Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com1tag:blogger.com,1999:blog-8934044.post-44335219345455754162020-05-14T23:00:00.000-04:002020-05-14T23:00:12.565-04:00Opening a "single use" armband plastic snap together button<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqx1VmE-8OnWOIv1ujHAJkh3bLgV3gmRy-AFCzwrstdYC2bVAVsXQen3AX-Q0duW5SUbqXMP3iUjiTmNFsVg5oc-ynlV-ePjMaLnBHMgo7mELboRnoeHngDpXr01m-SwY2NY1b/s1600/P6070081.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1072" data-original-width="1600" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqx1VmE-8OnWOIv1ujHAJkh3bLgV3gmRy-AFCzwrstdYC2bVAVsXQen3AX-Q0duW5SUbqXMP3iUjiTmNFsVg5oc-ynlV-ePjMaLnBHMgo7mELboRnoeHngDpXr01m-SwY2NY1b/s320/P6070081.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
As you can see the armband's button was secured by 4 plastic ribs which stick out from the post. The ribs on the post and the profile of the ring act like a wedge, temporarily deforming plastic to allow you to close and latch the button. But, once latched, the slope you would have to work against to unlatch is very steep. So, the button is easy to close but very hard to open via pulling.<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
In order to open the button less destructively, a pipe is needed, to go in the slot between the post and ring and . Finding a pipe of the right diameter and thickness would be difficult. So, I took a sheet of aluminum, cut a small piece, and shaped it onto a pipe using a suitably sized wire and pliers. Such aluminum can be easily be cut by scissors, though you probably shouldn't use good scissors which you want to keep sharp. Once I made the pipe, I adjusted it, making it a bit smaller by cutting a tiny sliver with scissors to reduce circumference and again shaping with pliers. Then I forced the pipe into the gap between the ring and core.</div>
Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-62742121531260534322017-12-30T11:58:00.002-05:002017-12-30T12:01:30.453-05:00Dealing with a partially installed Windows 7 updateOn one computer the June 2017 monthly rollup (KB4022719) somehow installed improperly or got corrupted. It couldn't be uninstalled, and future rollups couldn't be installed. Apparently, the process of installing a new rollup first needs to uninstall the previous one.<br />
<br />
The Windows Update user interface simply gave the useless 80004005 error, but detailed information about the failure was available in c:\windows\logs\cbs\cbs.log:<br />
<br />
<code>2017-12-28 20:54:05, Error CBS Failed. Attempted to uninstall a version of a non-driver component that is not installed, version: 0X700061db15cfe, component: amd64_microsoft-windows-w..lient-aux.resources_31bf3856ad364e35_7.6.7601.23806_en-us_e79af1b12d6db6c9, owner: Package_835_for_KB4022719~31bf3856ad364e35~amd64~~6.1.1.6.4022719-2919_neutral_LDR [HRESULT = 0x80004005 - E_FAIL]</code><br />
<div>
<br /></div>
<div>
Each update is a package which refers to many other packages, like Package_835_for_KB4022719~31bf3856ad364e35~amd64~~6.1.1.6.4022719, and each of those packages refers to components, like 2919_neutral_LDR. If you're curious, you can unpack an update and look inside it. First unpack the .msu to get the CAB and then unpack the CAB. You probably must use Microsoft's expand.exe to unpack the CAB because it may use intra package delta (IPD) compression which is not supported by 7-Zip.</div>
<div>
<br /></div>
<div>
Inside the CAB you will find various .mum files, which correspond to the main package and those sub-packages. The logical thing to do would be to reinstall these problematic components. However, I don't see a way to install from a .mum file.</div>
<div>
<br /></div>
<div>
So, I ended up uninstalling the messed up update by editing its already installed .mum file, found in c:\windows\servicing\packages, as package_for_kb4022719_sp1~31bf3856ad364e35~amd64~~6.1.1.6.mum. (Note the absence of a number after "package" in the file name.) That directory is set up by default so only TrustedInstaller can write there. Not even SYSTEM can write there! So, I had to temporarily grant access to Administrators. The sections to remove are like this:</div>
<div>
<br /></div>
<div>
<div>
<code> <update name="4022719-4117_neutral_PACKAGE"><br />
<package integrate="hidden"><br />
<assemblyIdentity name="Package_835_for_KB4022719" version="6.1.1.6" language="neutral" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" /><br />
</package><br />
</update></code><br />
<div>
<br /></div>
After removing the sections referring to messed up sub-packages, it was possible to uninstall the rollup. However, reinstalling it didn't fix the problem. I guess the messed up partly installed sub-packages don't get reinstalled? Fortunately, I was able to install the December roll-up without problems. Hopefully future roll-ups will install, and the only consequences will be a few small unnecessary but harmless files and registry entries.</div>
</div>
Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com3tag:blogger.com,1999:blog-8934044.post-38777702080530588422017-12-04T11:43:00.002-05:002017-12-04T12:30:31.423-05:00How to log in to SoundCloud in KodiThe <a href="http://kodi.wiki/view/Add-on:SoundCloud">SoundCloud add-on for Kodi</a> accesses SoundCloud via its API and OAuth2 authentication. It is supposed to log in once using your username and password, and get a token. After this, there is no need for your password, and it can access SoundCloud using just the token.<br />
<br />
The problem is that SoundCloud's initial procedure for obtaining the token has changed, and you now need to use the <a href="https://developers.soundcloud.com/docs/api/reference#connect">/connect method</a>. But, once the add-on has the token, it can log in. So, the solution is to get the token using another method.<br />
<br />
<a href="http://www.soundnodeapp.com/">Soundnode</a> is a desktop app which also authenticates to SoundCloud via OAuth2. After authenticating, the token can be found in its configuration files. In Linux, URL strings including the token can be found in <code>~/.config/Soundnode/Cache/data_*</code>. Look for URL inside like <code>https://api.soundcloud.com/me.json?&oauth_token=something</code> . Then add the token to your add-on configuration file, in Linux at <code>~/.kodi/userdata/addon_data/plugin.audio.soundcloud/settings.xml</code>. You need to add <code><setting id="login.access_token" value="something" /></code> .<br />
<br />
While the add-on doesn't need the <code>login.username</code> and <code>login.password</code>, its code is written such that they need to exist and the <code>login.hash</code> needs to match. You can compute the hash in Python using:<br />
<br />
<code>import hashlib<br />
username = 'username'<br />
password = 'whatever'<br />
m = hashlib.md5()<br />
m.update(username.encode('utf-8') + password.encode('utf-8'))<br />
m.hexdigest()</code><br />
<div>
<br /></div>
Since the add-on is incapable of actually using this information to log in, feel free to not actually put your real password there. The OAuth2 token provides access to your SoundCloud account, so keep that secure.<br />
<br />
This may not be a complete solution, because although I can access lists of things, playback fails with a HTTP 401 error. I don't know if that means the SoundNode API quota is depleted or if I need to do other things. Setting CLIENT_ID and User-Agent in ~/.kodi/addons/plugin.audio.soundcloud/resources/lib/content/client.py did not help.Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-30634737158555858182017-03-17T22:53:00.000-04:002017-03-17T22:53:29.313-04:00Streaming video from an MJPEG network camera to applications in LinuxI recently got a D-Link DCS-930L network camera. It outputs a motion JPEG (MJPEG) stream at http://address/video.cgi. Although there's no kernel driver for receiving that, it is possible to send it to applications from user space via <a href="https://github.com/umlaeute/v4l2loopback">v4l2loopback</a>.<br />
<br />
First you need to install the module. Debian and Ubuntu have it in the v4l2loopback-dkms. If your distribution doesn't have it, then you'll need to build it and install it yourself. Then, load the module. If you <a href="https://github.com/umlaeute/v4l2loopback/issues/78">want Chrome to see it</a>, load it with the <code>exclusive_caps=1</code> parameter, like <code>sudo modprobe v4l2loopback exclusive_caps=1</code> .<br />
<br />
Then, run a program to read the video and send it to the loopback device. It's possible with ffmpeg, using something like this:<br />
<br />
<code>ffmpeg -f mjpeg -i http://user:pass@192.168.1.30/video.cgi -s 640x480 -vf format=pix_fmts=yuv420p -f v4l2 /dev/video0</code><br />
<div>
<br /></div>
<div>
Note <code>user:pass</code>, which would be the credentials needed to log in to the camera. If you put yours there, note that it's insecure, as <code>ps</code> shows command lines. Also note the resolution and video device, which you may need to change.<br />
<br />
A similar method could be used if you wanted to read from one video device, apply effects, and then present the video with effects to an application.</div>
Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-7996237589954806552016-12-18T15:00:00.003-05:002016-12-18T15:00:52.443-05:00How to find good yogurt in CanadaWhile living in Croatia in the 80s, I enjoyed plain yogurt every day. After moving to Canada, I was very disappointed with the yogurt here.<br />
<br />
Now I can find good yogurt in Canada. It's really quite simple: look at the ingredients. Yogurt is supposed to contain milk ingredients and bacterial culture. It is not supposed to contain various gums, gelatin or corn starch. I suppose factories add that to create consistent texture even when they're unable to make proper yogurt which would have a good texture on its own.<br />
<br />
<a href="http://www.astro.ca/">Astro</a> Original is consistently good. Middle Eastern brands like Halal and Phoenicia are also good. Danone usually disappoints.<br />
<br />
In Canada you can buy lots of different yogurt with added flavour and/or fruit. I generally avoid those, because they have lots of added sugar or artificial sweeteners. It's better to enhance yogurt with fruit on your own. Sour cherries which were washed and pitted in the summer are great for this. Preparing it is a lot of work one day, but it's kind of fun and after that they're easy to use. I freeze them in small containers which after defrosting last for a week or so.<br />
<br />
Don't shy away from fat. Research shows that fat isn't that bad, sugar is far worse, and even artificial sweeteners are unhealthy. Without fat, it's hard to get the right consistency and flavour, and many low fat products add other unhealthy things instead. So, 3% yogurt is fine, and don't assume 0% is better.<br />
<br />
The same general advice applies to other milk products like kefir, huslanka and even sour cream.Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-63784144787221492472016-12-18T14:36:00.000-05:002016-12-18T14:36:40.536-05:00Facebook friend request accepted even though I never sent oneA while ago someone I stayed in touch with over 10 years ago appeared in my suggested friends list. That was probably due to a mutual friend. I looked at the suggested friend's page and public posts for a bit, and decided to not send a friend request. Later that day I was told that he accepted my friend request.<br />
<br />
I don't think I made a mistake and accidentally sent a friend request. Furthermore, in the friends activity log at <a href="https://www.facebook.com/dreamlayers/allactivity?privacy_source=activity_log&log_filter=cluster_8">https://www.facebook.com/dreamlayers/allactivity?privacy_source=activity_log&log_filter=cluster_8</a> I see a "became friends" entry, but no "sent a friend request" entry. I just scrolled through the entire log, to the beginning of my time on Facebook, and still see no friend request. For various other people I see a "sent a friend request" entry followed by "became friends".<br />
<br />
This isn't a problem and what happened was probably a good thing. So, I'm not complaining. It's just weird and I'm wondering why this happened.Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-23622382838646170152016-12-12T00:16:00.000-05:002016-12-12T00:16:04.027-05:00Notes about unlocking a Vonage VDV23 VoIP boxI got a used Vonage VDV23 VoIP box to play with. <a href="https://www.vonage.ca/">Vonage</a> seems expensive and limited compared to other VoIP providers like <a href="https://voip.ms/">voip.ms</a>, so I decided to unlock the box for use with other providers. A <a href="http://voipfan.net/unlock/vportal.php">guide is available</a>, but I ran into various problems trying to follow it, and this was quite an adventure. You can access the guide for free, but need to register at voipfan.net and log in there. The comments here are meant as a supplement to the guide, not a replacement.<br />
<br />
Note that buying this device for use with Vonage may be pointless. Vonage will give you a new adapter if you sign up, and may not allow you to use an old one.<br />
<h4>
Firmware loading via TFTP</h4>
<div>
Always use the internal phy. It will tell you if autonegotiation worked and you got an Ethernet connection. I never had any success whatsoever when I selected external phy.<br />
<br />
Network connectivity from the bootloader sometimes seems terribly unreliable. Pinging the VDV23 only worked once. Other times it at best answered a few pings, often with delays of more than a second. Received pings also spit out error messages to the console. Trying to ping first may even break subsequent TFTP attempts. Don't bother testing the network connection with ping; just try TFTP.</div>
<div>
<br /></div>
<div>
After trying my main PC and router, I ended up using the Ethernet port on this Inspiron 6400 laptop. Also, I was always setting up the network immediately after startup, not later on via the menu. When I did this, TFTP always worked.</div>
<div>
<br /></div>
<div>
The "Board IP Gateway" must exist, because the VDV23 will perform ARP queries for it when starting TFTP. Yes, it will even do this if the address is within the LAN. I just set it to the TFTP server address.</div>
<h4>
Getting the Admin password</h4>
<div>
Ignore the password at BF7F0118. Yes, there seems to be a password there, but I could never log in using it. If the password at BF3D00FA is all zeros, you didn't wait long enough for the VDV23 to download the password from Vonage and configure itself. If you wait too long, it will start upgrading firmware.</div>
<div>
<br /></div>
<div>
The first time I couldn't log in with the password from BF3D00FA either. I'm not sure if the "safe" vdv21-3.2.6-na_boot.bin firmware needs to get the password over the Internet from Vonage again. It may also start upgrading firmware if you wait too long. So, you need to disconnect from the Internet and continue with the rest of the guide.</div>
<h4>
Configuring SIP</h4>
<div>
I chose to configure via the XML file. First I tried to use an address accessible from the blue WAN port, but I didn't see any HTTP requests. Then I chose the default http://192.168.15.10 address and it worked via the yellow Ethernet port.</div>
<div>
<br /></div>
<div>
The device always sends an HTTP request soon after booting, so I was just unplugging it and plugging it back in to change the configuration. Seems like it first configures itself using stored parameters. Then if the XML file has different parameters the phone light will go out for a while as it reconfigures itself. Don't take the phone off hook during that process, because it will be testing the line. You may end up with a blinking phone light and a console complaint about the ringer equivalence number (REN) being too high.</div>
<div>
<br /></div>
<div>
Pay attention to the dialPlan lines. The one in the provided XML isn't enough for some voip.ms numbers, leading to a fast busy. I couldn't figure out how to support 2 and 3 character * codes except using *xx.T, which waits for a timeout before proceeding with the call. For experimenting, I could reconfigure dialPlan once from the console and see immediate results.</div>
<div>
<br /></div>
<div>
I forwarded port 8660 because it is localPort in the XML, but am not sure if that was necessary. The device is meant to be directly connected to the Internet and act as your gateway, providing NAT while prioritizing VoIP traffic. Since I'm still playing with it, I'm not going to do such a drastic change to my network.</div>
Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com3tag:blogger.com,1999:blog-8934044.post-48942593470376701292016-12-06T08:17:00.000-05:002016-12-06T08:17:48.318-05:00How to set the MAC address when connecting to wireless using /etc/network/interfacesIf you try to set the mac address using <code>hwaddress ether xx:xx:xx:xx:xx:xx</code> in <code>/etc/network/interfaces</code>, that fails. It seems <code>ifup</code> tries to set the address after connecting to WiFi. The address needs to be set before, while the interface is down. If you need the MAC address to connect, you won't connect, and if you don't need it and connect, you'll get <code>RTNETLINK answers: Device or resource busy</code> at the end. The solution is to use a <code>pre-up ifconfig wlan0 hw ether xx:xx:xx:xx:xx:xx</code> line instead of the <code>hwaddress ether</code> line.Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0tag:blogger.com,1999:blog-8934044.post-92040848448075860902016-12-05T15:05:00.000-05:002016-12-05T15:05:12.594-05:00Exiftran for WindowsThe Windoze 10 Photos app doesn’t actually rotate JPEG files, and instead just sets the EXIF orientation. I want my photos to always be displayed in the correct orientation, so this is not acceptable, because the flag is ignored in many situations. Photos can be rotated with <a href="http://jpegclub.org/jpegtran/">jpegtran</a>, but my camera photos also contain a JPEG thumbnail in the Exif data, which also needs to be rotated. I used <a href="https://www.kraxel.org/blog/linux/fbida/">exiftran</a> for this in Linux and I cross-compiled it for Win32 from Linux using i686-w64-mingw32-gcc. <a href="https://dl.dropboxusercontent.com/u/16662598/Ports/fbida-2.12-win.tar.xz">Download the build directory here</a>. I'm distributing the whole thing because of the GPL. To use exiftran, rename exiftran to exiftran.exe and run it. For example, to rotate a file by 90 degrees in place, replacing it with a losslessly rotated version, use "exiftran -9i file".Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com1tag:blogger.com,1999:blog-8934044.post-73967783497274145612016-11-28T13:32:00.000-05:002016-11-28T21:39:01.778-05:00Switching from IDE to AHCI on an ICH7-M based laptopMany older laptops have SATA controllers and SATA drives, but set up the chipset in IDE mode instead of AHCI mode. Compared to IDE mode, AHCI can provide faster transfer rates, NCQ and power savings. It may not be possible to select AHCI mode in the BIOS, but it can be done by writing to PCI configuration registers directly. The actual IDE (PATA) ports are not supported in AHCI mode, so a PATA DVD drive would not be usable when AHCI is enabled.<br />
<br />
You can read and write PCI registers using <code>setpci</code> in Linux, but if you want to make this change, it must be done before the device is detected. One way to do it is via a kernel patch, but recompiling the kernel every time for updates is kind of annoying. Another way is via GRUB's <code>setpci</code> command. This is very easy, and works well, but breaks resume from sleep, because GRUB doesn't run then and the kernel will encounter the device in IDE mode.<br />
<h4>
How to do this via GRUB</h4>
First, you need to find your controller. Use <code>lspci</code> and look at the output. On my Inspiron 6400 I find "<code>00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7-M Family) SATA Controller [IDE mode] (rev 01)</code>". The <code>00:1f.2</code> is the device's identifier in Linux, and <code>lspci -n | grep 00:1f.2</code> shows "<code>00:1f.2 0101: 8086:27c4 (rev 01)</code>" This gives you the PCI ID of the device: 8086:27c4.<br />
<br />
According to the <a href="http://www.intel.ca/content/dam/doc/datasheet/i-o-controller-hub-7-datasheet.pdf">ICH-7 datasheet PDF</a>, you need to set the 8-bit MAP—Address Map Register at offset 0x90 to 0x40. (A patch I had before also set the SCRAE bit in the register at offset 0x94, but that just provides access to some AHCI registers when AHCI is not enabled, and is irrelevant when AHCI is enabled.) This means the following GRUB command is needed.<br />
<br />
<code>setpci -d 8086:27c4 90.b=40</code><br />
<code><br /></code>
You can press e when the GRUB menu is displayed, and add it to the end of the command that boots Linux. Adding it earlier caused a hang, probably because the BIOS cannot handle AHCI mode, and so it needs to be set after the kernel and initrd are loaded. After finding this works, I added an <code>/etc/grub.d/42_ahci</code> file with a stripped down Linux menu entry taken from <code>/boot/grub/grub.cfg</code>. It would be better if I could call the Ubuntu menu entry as a subroutine, but that doesn't seem possible with GRUB.<br />
<br />
<code>#!/bin/sh<br />
exec tail -n +3 $0<br />
# This file provides an easy way to add custom menu entries. Simply type the<br />
# menu entries you want to add after this comment. Be careful not to change<br />
# the 'exec tail' line above.<br />
menuentry 'Ubuntu AHCI' --class ubuntu --class gnu-linux --class gnu --class os {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>recordfail<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>insmod ext2<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>set root='hd0,msdosPARTITION_NUMBER_HERE'<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>linux<span class="Apple-tab-span" style="white-space: pre;"> </span>/vmlinuz root=UUID=PUT_UUID_HERE ro resume=SWAP_PARTITION<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>initrd<span class="Apple-tab-span" style="white-space: pre;"> </span>/initrd.img<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>setpci -d 8086:27c4 90.b=40<br />
}</code><br />
<h4>
The Results</h4>
<div>
This change increases <code>sudo nice -n -19 dd if=/dev/sda bs=1M of=/dev/null count=1000</code> speed from 128 MB/s to 141 MB/s with a PNY SSD2SC120G1CS1754D117-551 SSD. It also enables NCQ, and causes the DVD drive to not be detected at all. Here are the IDE lines which disappear from dmesg. Note that this is based on <code>diff</code> output and is just a list of lines in order, not a continuous section.</div>
<div>
<br /></div>
<code>
pci 0000:00:1f.2: [8086:27c4] type 00 class 0x010180<br />
pci 0000:00:1f.2: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]<br />
pci 0000:00:1f.2: legacy IDE quirk: reg 0x14: [io 0x03f6]<br />
pci 0000:00:1f.2: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]<br />
pci 0000:00:1f.2: legacy IDE quirk: reg 0x1c: [io 0x0376]<br />
ata_piix 0000:00:1f.2: version 2.13<br />
ata_piix 0000:00:1f.2: MAP [ P0 P2 IDE IDE ]<br />
scsi host0: ata_piix<br />
scsi host1: ata_piix<br />
ata1: SATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xbfa0 irq 14<br />
ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xbfa8 irq 15<br />
ata2.00: ATAPI: SONY DVD+/-RW DW-Q58A, UDS2, max UDMA/33<br />
ata1.00: 234441648 sectors, multi 2: LBA48 NCQ (depth 0/32)<br />
ata2.00: configured for UDMA/33<br />
scsi 1:0:0:0: CD-ROM SONY DVD+-RW DW-Q58A UDS2 PQ: 0 ANSI: 5<br />
sr 1:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray<br />
cdrom: Uniform CD-ROM driver Revision: 3.20<br />
sr 1:0:0:0: Attached scsi CD-ROM sr0<br />
sr 1:0:0:0: Attached scsi generic sg1 type 5</code>
<br />
<div>
<br /></div>
<div>
Here are the new lines which appear instead:</div>
<div>
<br /></div>
<code>pci 0000:00:1f.2: [8086:27c5] type 00 class 0x010601<br />
pci 0000:00:1f.2: reg 0x24: [mem 0x00000000-0x000003ff]<br />
pci 0000:00:1f.2: BAR 5: assigned [mem 0x80000000-0x800003ff]<br />
ahci 0000:00:1f.2: version 3.0<br />
ahci 0000:00:1f.2: enabling device (0005 -> 0007)<br />
ahci 0000:00:1f.2: forcing PORTS_IMPL to 0xf<br />
ahci 0000:00:1f.2: SSS flag set, parallel bus scan disabled<br />
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 1.5 Gbps 0xf impl SATA mode<br />
ahci 0000:00:1f.2: flags: 64bit ncq ilck stag pm led clo pmp pio slum part <br />
scsi host0: ahci<br />
scsi host1: ahci<br />
scsi host2: ahci<br />
scsi host3: ahci<br />
ata1: SATA max UDMA/133 abar m1024@0x80000000 port 0x80000100 irq 27<br />
ata2: SATA max UDMA/133 abar m1024@0x80000000 port 0x80000180 irq 27<br />
ata3: SATA max UDMA/133 abar m1024@0x80000000 port 0x80000200 irq 27<br />
ata4: SATA max UDMA/133 abar m1024@0x80000000 port 0x80000280 irq 27<br />
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)<br />
ata1.00: 234441648 sectors, multi 2: LBA48 NCQ (depth 31/32), AA<br />
ata2: failed to resume link (SControl 0)<br />
ata2: SATA link down (SStatus 0 SControl 0)<br />
ata3: SATA link down (SStatus 0 SControl 300)<br />
ata4: failed to resume link (SControl 0)<br />
ata4: SATA link down (SStatus 0 SControl 0)</code><br />
<div>
<h4>
A better solution</h4>
Another alternative, which can support suspend to RAM, is to set registers from an altered DSDT. <a href="https://www.tonymacx86.com/threads/ihc7-dsdt-ahci-patch.165120/" rel="nofollow">Read about the DSDT changes here</a> and <a href="https://www.kernel.org/doc/Documentation/acpi/initrd_table_override.txt" rel="nofollow">read about how to use a custom DSDT in Linux here</a>. You first need to dump your DSDT, decompile it and fix it so it can compile properly. People do this sort of thing for running Mac OS on a PC, and you can find plenty of info on sites relating to that. Then you can add your modifications. In Ubuntu, simply copy the compiled <code>dsdt.aml</code> to <code>/boot</code> and run <code>update-grub</code>.</div>
Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com5tag:blogger.com,1999:blog-8934044.post-75294410057322507312016-11-22T00:01:00.001-05:002016-11-22T00:03:29.990-05:00Sharing an IR receiver via an opto-isolatorI wanted to share an infrared remote receiver between the Pace DC550D cable box and Raspberry Pi 2 B running Kodi. This way there is no need to mount another visible IR receiver. It turned out to be a harder than anticipated because I used the wrong opto-isolator.<br />
<h4>
IR Receivers</h4>
An IR receiver has 3 connections: ground, power and signal output. With many IR receivers, the output is open collector and active low. This means when there is no remote signal detected, the output is not driven, and when a signal is detected, it is driven low. In order to actually see a voltage change at the output, a pull-up resistor is needed. Then the output stays high with no signal and goes low when a signal is detected.<br />
<br />
The Pace DC550D, like many devices, connects to the IR receiver via a standard headphone jack. The tip supplies 5 V power, the ring (middle contact) is the signal output, and the sleeve is ground. This arrangement makes the most sense, but I don't know if every other device uses it.<br />
<br />
The signal stays at just over 3 V normally and goes low when IR is detected. This might be because it connects to 3.3 V device. With an open collector output, the pull-up resistor does not need to connect to the same voltage as the device's power supply. So, an IR receiver powered by 5 V and with the pull-up resistor connected to 3.3 V will properly interface with 3.3 V devices.<br />
<h4>
Opto-isolation</h4>
Accessing the IR receiver signal is easy via headphone splitter and headphone plug. It ought to be possible to connect the IR receiver directly to the Raspberry Pi. Everything is grounded together via HDMI, though also connecting grounds would be good. However, I wanted opto-isolation for protection.<br />
<br />
I connected the opto-isolator LED between 5 V power and signal output. This meant the LED would come on when a signal is detected. This seems better because it is drawing power through the IR receiver output, not the pull-up resistor. Though there is a problem because the off state is just over 3 V and LED voltage drop is only 1 V. I added 3 diodes in series to deal with this. A current limiting resistor is also required for the LED.<br />
<br />
At first I tried to just connect the opto-isolator output to ground and a GPIO pin, and use the Raspberry Pi's internal pull-up. First, this did not work at all, because the lirc_rpi module parameter for setting that is <a href="https://github.com/raspberrypi/linux/issues/1711">ignored</a>. Pull up can either be enabled by running a short Python program every time, or by by adding a <code>dtparam=gpio_in_pull=up</code> line after the <code>dtoverlay=lirc-rpi</code> line in <code>/boot/config.txt</code>. With the pull-up enabled, I got a signal, but it was useless.<br />
<br />
The problem was the turn-off time of the optocoupler. I chose a TIL113 with photodarlington output, so that I would need to draw less power from the IR receiver. However, photodarlington opto-isloators have very slow shutoff. Adding a base resistor didn't help much, and even with a pull-up to 3.3 V on the output, LIRC was unreliable. Eventually I changed to a PS2010 with a just a normal phototransistor. Due to its much lower current transfer ratio, I had to carefully choose LED current limiting and output pull-up resistors. The output pull-up was still necessary; the Raspberry Pi's internal pull-up did not give a good enough signal.<br />
<h4>
The Results</h4>
This seems fully reliable now. I'm using a Harmony 300 remote, with the device set to Microsoft Media Player [Microsoft Xbox Media Center Extender]. It maps to the <a href="http://lirc.sourceforge.net/remotes/mceusb/lircd.conf.mceusb">mceusb LIRC remote</a>. The MyHarmony software doesn't configure all the possible keys, so it is necessary to edit the key configuration. The Prev button, corresponding to KEY_BACK is especially important for the Kodi interface.Boris Gjenerohttp://www.blogger.com/profile/01198202583955918644noreply@blogger.com0