<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2017-01-06:2733095</id>
  <title>Postcards from Semaphore</title>
  <subtitle>VK5TU</subtitle>
  <author>
    <name>Glen Turner</name>
  </author>
  <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom"/>
  <updated>2021-09-18T06:09:28Z</updated>
  <dw:journal username="gdt" type="personal"/>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:60970</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/60970.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=60970"/>
    <title>Compiling and installing software for the uBITX v6 QRP amateur radio transciever</title>
    <published>2021-01-13T11:09:10Z</published>
    <updated>2021-09-18T06:09:28Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;The uBITX uses an Arduino internally. This article describes how to update its software.&lt;/p&gt;

&lt;h3&gt;Required hardware&lt;/h3&gt;

&lt;p&gt;The connector on the back is a Mini-B USB connector, so you'll need a &amp;quot;Mini-B to A&amp;quot; USB cable. This is not the same cable as used with older Android smartphones. The Mini-B connector was used with a lot of cameras a decade ago.&lt;/p&gt;

&lt;p&gt;You'll also need a computer. I use a laptop with Fedora Linux installed.&lt;/p&gt;

&lt;h3&gt;Required software for software development&lt;/h3&gt;

&lt;p&gt;In Fedora all the required software is installed with &lt;b&gt;sudo dnf install arduino git&lt;/b&gt;.  Add yourself to the users and lock groups with &lt;b&gt;sudo usermod -a -G users,lock $USER&lt;/b&gt; (on Debian-style systems use &lt;b&gt;sudo usermod -a -G dialout,lock $USER&lt;/b&gt;). You'll need to log out and log in again for that to have an effect (if you want to see which groups you are already in, then use the &lt;b&gt;id&lt;/b&gt; command).&lt;/p&gt;

&lt;p&gt;Run &lt;b&gt;arduino&lt;/b&gt; as your ordinary non-root user to create the directories used by the Arduino IDE. You can quit the IDE once it starts.&lt;/p&gt;

&lt;h3&gt;Obtain the uBITX software&lt;/h3&gt;

&lt;blockquote&gt;
&lt;pre&gt;
$ cd ~/Arduino
$ git clone https://github.com/afarhan/ubitxv6.git ubitx_v6.1_code
&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Connect the uBITX to your computer&lt;/h3&gt;

&lt;p&gt;Plug in the USB cable and turn on the radio. Running &lt;b&gt;dmesg&lt;/b&gt; will show the Arduino appearing as a "USB serial" device:&lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;
usb 1-1: new full-speed USB device number 6 using xhci_hcd
usb 1-1: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
usb 1-1: Product: USB Serial
usbcore: registered new interface driver ch341
usbserial: USB Serial support registered for ch341-uart
ch341 1-1:1.0: ch341-uart converter detected
usb 1-1: ch341-uart converter now attached to ttyUSB1
&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you want more information about the USB device then use:&lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;
$ lsusb -d 1a86:7523
Bus 001 Device 006: ID 1a86:7523 QinHeng Electronics CH340 serial converter
&lt;/pre&gt;
&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=60970" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:60842</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/60842.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=60842"/>
    <title>Blocking a USB device</title>
    <published>2020-11-13T12:07:40Z</published>
    <updated>2020-11-13T12:11:07Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;udev can be used to block a USB device (or even an entire class of devices, such as USB storage). Add a file /etc/udev/rules.d/99-local-blacklist.rules containing:&lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;
SUBSYSTEM=="usb", ATTRS{idVendor}=="0123", ATTRS{idProduct}=="4567", ATTR{authorized}="0"
&lt;/pre&gt;
&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=60842" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:60309</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/60309.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=60309"/>
    <title>Jupyter notebook and R</title>
    <published>2019-03-21T12:26:22Z</published>
    <updated>2019-03-21T12:26:32Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;This has become substantially simpler in Fedora 29:&lt;/p&gt;

&lt;pre&gt;
sudo dnf install notebook R-IRKernel R-IRdisplay
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=60309" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:59786</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/59786.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=59786"/>
    <title>wpa_supplicant update trades off interoperation for security</title>
    <published>2019-03-07T14:06:00Z</published>
    <updated>2019-03-07T14:07:01Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;In case you want to choose a different security compromise, the update has a nice summary:&lt;/p&gt;
&lt;pre&gt;wpasupplicant (2:2.6-19) unstable; urgency=medium

  With this release, wpasupplicant no longer respects the system
  default minimum TLS version, defaulting to TLSv1.0, not TLSv1.2. If
  you&amp;apos;re sure you will never connect to EAP networks requiring anything less
  than 1.2, add this to your wpasupplicant configuration:

    tls_disable_tlsv1_0=1
    tls_disable_tlsv1_1=1

  wpasupplicant also defaults to a security level 1, instead of the system
  default 2. Should you need to change that, change this setting in your
  wpasupplicant configuration:

    openssl_ciphers=DEFAULT@SECLEVEL=2

  Unlike wpasupplicant, hostapd still respects system defaults.

 -- Andrej Shadura &amp;lt;&amp;hellip;@debian.org&amp;gt;  Sat, 15 Dec 2018 14:22:18 +0100&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=59786" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:59462</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/59462.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=59462"/>
    <title>Finding git credentials in libsecret</title>
    <published>2019-03-05T01:30:25Z</published>
    <updated>2019-03-05T01:33:31Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;To find passwords in libsecret you need to know what attributes to search for. These are often set by some shim but not documented. The attributes tend to vary by shim.&lt;/p&gt;

&lt;p&gt;For git's libsecret shim the attributes are: protocol, server, user.&lt;/p&gt;

&lt;p&gt;A worked example, the account gdt on git.example.org:&lt;/p&gt;

&lt;pre&gt;
$ secret-tool search --all 'protocol' 'https' 'server' 'git.example.org' 'user' 'gdt'
[/org/freedesktop/secrets/collection/login/123]
label = Git: https://git.example.org/
secret = CvKxlezMsSDuR7piMBTzREJ7l8WL1T
created = 2019-02-01 10:20:34
modified = 2019-02-01 10:20:34
schema = org.gnome.keyring.NetworkPassword
attribute.protocol = https
attribute.server = git.example.org
attribute.user = gdt
&lt;/pre&gt;

&lt;p&gt;Note that the "label" is mere documentation, it's the "attribute" entries which matter.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=59462" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:58164</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/58164.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=58164"/>
    <title>MacbookPro8,2 boots with very bright screen</title>
    <published>2018-07-29T13:24:39Z</published>
    <updated>2019-03-05T01:34:52Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;The screen brightness is held in a EFI variable.&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;hexdump /sys/firmware/efi/efivars/backlight-level-7c436110-ab2a-4bbb-a880-fe41995c9f82 
0000000 0007 0000 0101&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=58164" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:57606</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/57606.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=57606"/>
    <title>Installing NetCDF for R in Fedora</title>
    <published>2018-04-13T06:43:40Z</published>
    <updated>2018-04-13T06:55:42Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;pre&gt;
$ &lt;b&gt;sudo install netcdf-devel&lt;/b&gt;
$ &lt;b&gt;R --no-restore --no-save&lt;/b&gt;
&amp;gt; &lt;b&gt;install.packages('ncdf4')&lt;/b&gt;
&amp;gt; &lt;b&gt;q()&lt;/b&gt;
&lt;/pre&gt;

&lt;p&gt;There's a good summary of using NetCDF &lt;a href="http://geog.uoregon.edu/bartlein/courses/geog490/week04-netCDF.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=57606" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:57406</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/57406.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=57406"/>
    <title>Jupyter notebook for Fedora 27</title>
    <published>2018-04-11T12:44:12Z</published>
    <updated>2018-04-12T08:01:46Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;h2&gt;Jupyter with Python&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://fedoralovespython.org/"&gt;Fedora loves Python has the good oil:&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;$ &lt;b&gt;sudo dnf install notebook&lt;/b&gt;
$ &lt;b&gt;jupyter notebook&lt;/b&gt;&lt;/pre&gt;
&lt;h2&gt;Jupyter with R&lt;/h2&gt;
&lt;p&gt;Firstly, install Jupyter with Python, as above.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://irkernel.github.io/installation/"&gt;IRkernel&lt;/a&gt; has the good oil. I've modified their advice to install RPM packages where they are available:&lt;/p&gt;
&lt;pre&gt;$ &lt;b&gt;sudo dnf install czmq-devel libcurl-devel openssl-devel&lt;/b&gt;
$ &lt;b&gt;sudo dnf install R-crayon R-pbdZMQ R-repr&lt;/b&gt;
$ &lt;b&gt;R --no-restore --no-save&lt;/b&gt;
&amp;gt; &lt;b&gt;install.packages('devtools')&lt;/b&gt;
&amp;gt; &lt;b&gt;devtools::install_github(paste0('IRkernel/', c('IRdisplay', 'IRkernel')))&lt;/b&gt;
&amp;gt; &lt;b&gt;IRkernel::installspec()&lt;/b&gt;
&amp;gt; &lt;b&gt;q()&lt;/b&gt;
&lt;/pre&gt;
&lt;p&gt;If you want to do a system-wide installation then run R as root, proceed as above, but the last step is:
&lt;pre&gt;
&amp;gt; &lt;b&gt;IRkernel::installspec(user = FALSE)&lt;/b&gt;
&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=57406" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:57197</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/57197.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=57197"/>
    <title>Checking Meltdown and Spectre fixes, and not thinking about usage</title>
    <published>2018-03-16T03:37:38Z</published>
    <updated>2018-03-16T03:53:35Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;The Linux kernel has fixes for Meltdown, Spectre v1 and Spectre v2. Check the status with:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;
$ &lt;b&gt;cat /sys/devices/system/cpu/vulnerabilities/meltdown&lt;/b&gt;
Mitigation: PTI
$ &lt;b&gt;cat /sys/devices/system/cpu/vulnerabilities/spectre_v1&lt;/b&gt;
Mitigation: __user pointer sanitization
$ &lt;b&gt;cat /sys/devices/system/cpu/vulnerabilities/spectre_v2&lt;/b&gt;
Mitigation: Full generic retpoline&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;You'd think that would be enough. But Linux has fucked it up. Here's the output from a Raspberry Pi 3 running 4.9.80. That ARM CPU doesn't have instruction speculation and this isn't vulnerable to Meltdown or Spectre-style bugs.&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;
$ &lt;b&gt;ls /sys/devices/system/cpu/vulnerabilities&lt;/b&gt;
ls: cannot access '/sys/devices/system/cpu/vulnerabilities': No such file or directory&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;That's right. We can't tell if the CPU is immune to the issue or if the Linux kernel is too old to have a fix for the issue. A program wanting to check this is going to have to carry around a table of CPU architectures and Linux versions. Which is likely going to be wrong, because who's going to know the data a fix for Spectre made it into a MIPS build. Classic. All Linux needed to do was to create /sys/devices/system/cpu/vulnerabilities for all architectures. Sigh.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=57197" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:56637</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/56637.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=56637"/>
    <title>Finding Google DNS cluster</title>
    <published>2017-08-28T11:06:51Z</published>
    <updated>2017-08-28T11:07:05Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;p&gt;From NANOG list:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;
dig o-o.myaddr.l.google.com -t txt +short @8.8.8.8
&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=56637" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2017-01-06:2733095:56109</id>
    <link rel="alternate" type="text/html" href="https://gdt.dreamwidth.org/56109.html"/>
    <link rel="self" type="text/xml" href="https://gdt.dreamwidth.org/data/atom/?itemid=56109"/>
    <title>dd</title>
    <published>2017-03-31T23:08:55Z</published>
    <updated>2017-03-31T23:09:46Z</updated>
    <category term="linux"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">The reason for using &lt;strong&gt;dd&lt;/strong&gt; to write to USB flash sticks is historical.&lt;br /&gt;&lt;br /&gt;On some other UNIX-like operating systems only &amp;quot;raw&amp;quot; block devices present the partition table, boot sector and unpartitioned space. Specifically, whereas Linux presents a &lt;tt&gt;/dev/sda&lt;/tt&gt; block device containing all the bytes of a disk, in those other operating systems the equivalent would be a &lt;tt&gt;/dev/rsda&lt;/tt&gt; raw block device.&lt;br /&gt;&lt;br /&gt;In those other UNIX-like operating systems you must write to raw block devices in multiples of the sector size of the device. &lt;strong&gt;dd&lt;/strong&gt; can do this, &lt;strong&gt;cp&lt;/strong&gt; and &lt;strong&gt;cat&lt;/strong&gt; cannot. How you discover a device's sector size was left as an exercise for the reader, it is traditionally 0.5KB, more recently 4KB, and three orders of magnitude larger again for flash devices.&lt;br /&gt;&lt;br /&gt;Linux doesn't have raw devices, so using &lt;strong&gt;dd&lt;/strong&gt; isn't needed to write an image to a disk. You can &lt;tt&gt;wget -O /dev/sd𝐱 &amp;hellip;&lt;/tt&gt; a Fedora .iso file directly onto the USB flash drive.&lt;br /&gt;&lt;br /&gt;Note that some devices perform better when handed data is particular block sizes. Most USB sticks perform best if handed data in 4MB chunks. &lt;strong&gt;dd&lt;/strong&gt; is useful if you want that optimisation: &lt;tt&gt;wget -O - &amp;hellip; | dd of=/dev/sd𝐱 bs=4M status=progress&lt;/tt&gt;. Note that if you do not set the &lt;tt&gt;bs&lt;/tt&gt; blocksize then the default of 0.5KB is going to make writing a USB flash stick very slow.&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gdt&amp;ditemid=56109" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
