Sunday, August 8. 2021Messing with CQRLOG data behind the application![]() ![]() Currently, in CQRLOG 2.5.1 of Ubuntu 21.04, QSL export for label printing is broken due to a FreePascal bug: TRegExpr exec: empty input string. Version 2.5.2 contains a fix, though. Now I had the choice between these unpleasent options:
Couldn’t I somehow work around that bug? After all, I just wanted to dump certain log entries to a CSV. This could be done using an ordinary MySQL client! And this is the procedure to do so: Start CQRLOG, this launches a MySQL (MariaDB) server instance in the CQRLOG data directory, which is ~/.config/cqrlog/database by default, listening on port 64000. Now, simply connect to it: $ mysql -h 127.0.0.1 -P 64000
Use the desired database: > use cqrlog001;
Query, using the columns you usually export: > select qsodate, time_on, callsign, mode, freq,
rst_s, qsl_via, remarks, stx, stx_string
into outfile ’/path/to/qsl_test.csv’
fields terminated by ’,’
from cqrlog_main
where qsl_s in (’SM
The resulting CSV is already almost in the usual format, except for the date. In Vim, I did these transformations: :%s/^\(\d\+\)-\(\d\+\)-\(\d\+\)/\3-\2-\1
:%s/-05-/-May-
:%s/-06-/-Jun-
:%s/-07-/-Jul- etc. As soon as I was satisfied with the result (in gLabels), I marked these QSL as sent: > update cqrlog_main set qsl_s = ’B’ where qsl_s = ’SB’;
> update cqrlog_main set qsl_s = ’M
Querying around in that table is also a good opportunity for one’s own statistics.
Posted by Stephan Paukner
in GNU/Linux, Ham Radio
at
17:51
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: software
Wednesday, October 19. 2016Rescuing data from an Epson HX-20 to a Linux PC![]() ![]() I recently managed to reactivate my dear old Epson HX-20, a retro computer released in 1983 which I used at the end of the 1980’s and early 1990’s to learn programming. Since I even could read in some BASIC programs that were still stored on the micro cassette, I wondered if I could rescue the code directly, without using OCR on printouts or even typing it off by hand. I was aware that I was very lucky that this machine still worked after all those years—the soldering seemed to have been much more rigid back then, it might cause more issues to attempt to run old PCs which are a decade younger! To be on the safe side, I invested into a new NiCd battery pack and replaced the original one. My research first led me to the machine’s RS-232 output, internally called “COM0”. Someone had used that some years ago to directly connect an HX-20 to a PC’s serial port, using a special cable and some adapters. Sadly, it seems that this is no longer an option, since these cables disappear, and serial-to-USB adapters only seem to work with a certain chip in this case. Then I stumbled upon the GPL software HXTape, and I was totally baffled: What, the Epson HX-20 had an external cassette interface as well? I knew that concept from our even older machine, the Texas Instruments TI-99/4A. It connected to a special music cassette recorder and encoded data into simple “magnetic bits” onto the tape: It was quite funny to listen to the noisy sounds when playing the MCs on an ordinary player. This bidirectional data transfer works over ordinary mono audio cables, one for each direction. And now, it turns out the HX-20 had such an interface as well, and we never used it. But the point is, one could exploit it to decode the audio signals into the original bits and bytes by connecting the HX-20’s “MIC” port to the microphone input of a PC using a simple mono audio cable with standard 3.5 mm jacks! (How tremendous the analog world was! Keep a music cassette lying around in the basement for decades and then just play it. Try this with your ¡Phone!) And that audio decoding is exactly what HXTape is doing. Continue reading "Rescuing data from an Epson HX-20 to a Linux PC"
Posted by Stephan Paukner
in GNU/Linux, Information Technology
at
19:21
| Comments (2)
| Trackbacks (0)
Wednesday, December 4. 2013grub rescue >![]() My boot partition was so small that I couldn’t do any initramfs-updates any more, so I backed it up, deleted /dev/md0 (boot) and /dev/md1 (swap) to recreate both with new sizes, restored my backup, and after a reboot grub couldn’t find anything due to the new UUIDs of the partitions. Before I rebooted, I should have merged the output of # update-grub
# grub-install /dev/sda
# grub-install /dev/sdb Instead, I had to go through this: At grub rescue prompt: > ls (md/md0)/
> set root=(md/md0)/
> set prefix=(md/md0)/grub
> insmod linux
> linux (md/md0)/vmlinuz-3.11.0-13-generic
> initrd (md/md0)/initrd.img-3.11.0-13-generic
> boot
... bringing me to a BusyBox/initramfs emergency prompt: # ls /tmp
# cd /tmp
# mkdir disk
# mount /dev/md2 disk # root directory
# chroot disk
... bringing me to a simple bash prompt in my system: # mount /boot
... as well as: # mount /proc
# mount /sys
# mount /dev
... to be able to run: # update-grub
# grub-install /dev/sda
# grub-install /dev/sdb
You wouldn’t learn much if you weren’t forced to fix things once in a while. — myself
Posted by Stephan Paukner
in GNU/Linux
at
07:46
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: gnu-linux
Wednesday, November 27. 2013Server migrated from virtual to virtual, II![]() Quote of myself from four years ago: I had to do the migration to a parallel machine and had only one week to accomplish this. I’ll never do it this way again, however, rather pay for two servers for a short time and decide when to finally switch. This is exactly how I did it this time. Although Debian 5 lenny had been released in Feb 2009, it didn’t yet make it into Host Europe’s 4.0 line of virtual servers; instead, that virtual machine was still based on 2007’s Debian 4 etch, which received its last kernel update, still 2.6.18, by the provider in Aug 2011. I upgraded it to Debian 6 squeeze nonetheless. I noticed that this year’s Debian 7 wheezy does not run under an etch kernel (especially libc6, rkhunter and aide), and as squeeze is already oldstable since May and will no longer be maintained by next May, it was time to perform an upgrade. Now I run an instance of their 7.0 line with the same price, but RAM and disk space were both doubled (to 2 GB and 100 GB, respectively). It is still based on squeeze with a 2.6.32 kernel; based on my experience, I expect it to run wheezy and jessie before I have to switch again (in about another four years). Like previously (and like seven years ago), I did the TCP forwarding using rinetd, except for Postfix, for which I set up relaying again. Tuesday, February 28. 2012How to add new quote sources to GnuCash![]() ... or, actually, to Perl’s Finance::Quote, under Ubuntu 11.10:
Your new quote source should now be available to GnuCash:
Thursday, March 3. 2011Admin search FAILFriday, February 25. 2011Syncing with rsync to FAT devices![]() (I started this as a draft two years ago, but wasn’t sure about its correctness then.) Usually, one uses the -a switch when archiving files with rsync from Unix to Unix. -a is an abbreviation for -rlptgoD, which means
but this doesn’t make sense if the target is an MS FAT device (such as a USB key) or a CIFS/SMB/Samba host, as that old file system cr4p doesn’t know anything about symbolic links, file permissions, ownerships or other Unixy properties. Thus, rsync fails to match these features at all and synchronizes every single bit of every single file again. The solution I found is to simply use the tuple of time-stamp and file size as the only criteria whether something has changed. This still results in warnings about that the time-stamps of directories couldn’t be set, but at least the sync works. An example command line could thus be $ rsync -rt $source $target
Posted by Stephan Paukner
in GNU/Linux
at
16:35
| Comment (1)
| Trackback (1)
Defined tags for this entry: software
Sunday, December 20. 2009I should do a web comic![]()
« previous page
(Page 7 of 7, totaling 49 entries)
|
AboutCalendar
ArchivesCategoriesShow tagged entriesandroid anti-spam apache astronomy austria automobile ballooning bash bug career cloud collecting comic cooking crypto cw debian diy dreams education electronics event fail fashion finance flickr fuerteventura fun gentoo geography german gnu-linux google google earth graphics guitar hardware history image processing internet kernel kids language lanzarote lhc lifestyle linkroll literature ltd machine learning making mathematics matlab microsoft migration movies munich music nautilus numismatics octave pdf perl philosophy phone photo gear photography physics podcast politics postfix private programming public transport rant religion review salzburg samsung science security shtf social web software statistics storage sustainability symbian tablet time lapse transceiver tv usenet venice video virtualization wordplay work www yahoo
Syndicate This BlogFollow meBookmarks
Powered by |