Saturday, September 03, 2022

Enjoy Life

 I recently noticed that I've been hating life.   Like more so than normal for the past two years or so.   I've never had more than a few acquaintances, but geography, covid and politics mostly ended the relationships that I had.  

(I'm not very political or radical, I'm always willing to listen and I don't consider a difference of opinion to be relationship ending.  Unfortunately one of the people I used to be friends with is very radicalized and will absolutely fly off the handle every time anyone says anything 'wrong'.  -  It's strange, like, I love GNU/Linux, but if someone refers to 'Linux' with out saying GNU/Linux   I don't get angry, I don't mention it.  We are all just trying to communicate, getting every single part of language exactly correct is never going to happen.... ) 

   [sigh]..   I miss having friends.

Anyway...   Work is frustrating, I find myself with only my wife as company (which isn't fair to her), and my computers really haven't run the way I like them to for _Years_ ... 

{Sorry for being a curmudgeon I don't like systemd, I just don't understand.  Everything ran so well before systemd, and it was so easy to fix anything that broke.  Now so many problems can not be solved in user space, I've lost tremendous control over my computers; and when they do run they aren't flexible.  Gah!}

Ok, where was I..   Oh yeah, hating life.   Work is frustrating, Minimal companionship, My favorite hobby is in disarray...    And I think, maybe, ADHD is setting in, it happened to my dad anyway.  He started getting medicated for it around 58 years old (??) .  So I've got maybe 2 decades left before I either have to take meth, or I should retire. -  The intensity of focus that I used to have isn't guaranteed any more, certainly not like it used to be.  However I still think just as clearly, and I can focus and plan; it's just harder.

Compounding that is that I live in the PNW, we basically don't get sun for ~6-8 months a year, which completely messes most people up, for most of the year.  Compounding that is the problem that I work 3rd shift.  I barely get any sun in the summer!  Finally my relationship with sleep has always been troubled, working through the night every night doesn't make that any easier.  Day shift at my current job is maybe one retiree, or a few new hires away; fingers crossed.

So, yeah, I've been hating life.   That can't continue, it just can't.  So I've been trying to focus on things I enjoy.   Well, specifically, I've been focusing on enjoying living.  I started bringing my bike into the city and going riding once and a while, there are some really amazing bicycle groups in Portland.  I powered up my server and I'm rearranging my network so hopefully I can use the server, and keep it off the internet so hopefully it doesn't get hacked.   I may setup another internet accessible server with some VM's.  

I'd love to find a reasonable motherboard that is compatible with an E7-8891v4.  I fell in love with Broadwell when it came out but could never afford one; now they are super affordable!  Besides loving them, I can re-use my significant amount of ECC DDR3 Ram; this it the last server processor to support that.  Skylake and up are all DDR4.   As I understand it, these super-cheap ones were made for a specific client, they are "off menu".  The used market was flooded with them a while back.  However they might need special motherboards... And finding a motherboard for any of the E7-88xx chips is... iffy? I don't want a Supermicro X10QBI, it's an absurd motherboard! (Although impressive when it's put together well.)- PLEASE correct me if I'm wrong.  I'm considering throwing money at a bunch of LGA 2011-1 motherboards until I find one that works.  Someone told me that an X99 motherboard from Aliexpress _might_ work.  But they aren't what I'm looking for anyway.  My old AbuDhabi AMD Opteron 6328 powered HP servers seriously need to go away!  Building a server with lots of ECC memory and lots of PCI-express gets really expensive really fast, so I have to shop for old, old tech.  Comparing the CPU Value score and CPU Mark scores really makes this CPU shine!  Maybe 1/5 to 1/10 the speed of an EPYC system, but 1/500 to 1/1000 the cost.

{EDIT:  Ok, I finally got clear information regarding the motherboard CPU sockets, still looking for more information on chipset support.  
     LGA 2011 - Socket R - Supports Ivy Bridge-E/EP and Sandy Bridge-E/EP processors with the corresponding X79 (E – enthusiast-class) and C600-series (EP – Xeon class) chipsets.
        LGA 2011-1 - Socket R2 - Supports Ivy Bridge-EX (Xeon E7 v2), Haswell-EX (Xeon E7 v3) and Broadwell- EX (Xeon E7 v4) CPUs.
        LGA 2011-3 or Socket R3 - Supports Haswell-E and Haswell-EP CPU, maybe other newer chips too?}

 I bought two new cell phones. One of which I successfully got LineageOS installed on, the other I bricked.  I'm sending the bricked phone off for repair, and then I'll try to root it again.  If you don't have root on a computer you own, you don't control it, or own it; not really anyway.  Also I'm tired of my identity being a product for companies to fight over.  

YouTube censors all ideas that are not conducive to commerce, and then attempts to ransom my sanity by offering to remove ad's for, uh what 12$ / month.   -   It's an extra special dystopia!  I want out!   So I'm trying to de-google my phones.   Thank god for the people that made CyanogenMod and the people who are making it's progeny, LineageOS.

So enjoying living...   Part of enjoying living is not being scared to be flawed.   I'm not perfect, I have some odd interests, privacy, opensource, cyberpunk, science fiction, walking my dog's, an obsession with really good electrical work.  :-)

So yeah, I'm trying to enjoy living.  

One thing I'm getting excited about again is that the large ball screws that I need, for the CNC machine I'm going to build, are purchasable again!   I tried to buy them during the pandemic, and the order got canceled.  I got a nice note from the supplier about how shipping was just nearly impossible (stupid, lazy, bribe-taking, canal drivers [captains?]....  I don't blame the EverGiven, or the Affinity V, only the special canal crews, not sure if that's fair, but that's where I'm at.) .  So... the CNC project can continue.  Unfortunately I missed an opportunity to get some really cheap I-beams locally, oh well, I'll just have to keep looking...   I still need to save up for a 3-phase converter.  I tend to focus on the biggest challenge for any project.  If I can't solve that, then the project needs to be modified, or I should shelve it for a while.  So I guess I'm going to futz around with my servers, brick some phones, and save up for a Phase Perfect PTE215RQT.

I'm having trouble finding information about supporting a long ball screw.  I suppose you could have multiple ball nuts and drive them simultaneously, but I swear there was a product you could get that would follow the screw passively to help support the ball screw itself...  I'm still working out the design.   I bought some small ball screws that were labeled 1200mm on-line, but when they arrived they were labeled 900mm.  The screw is _overall_ 1200mm, but the available travel is only 900mm.  So that was a fairly cheap lesson!  I think I can still use them for a 3D printing project, it's just going to be a bit smaller, but that's fine....   I wonder if you can get a ball screw with ball nuts that move at different speeds.  Like if the machine was driven by a normal ball nut, but there could be other ball nuts that travel at fraction of the speed.  You could use the fractional nuts to  help support the ball screw.  Fun to think about, but I think it's probably a terrible idea.   See fun!   Enjoying Life.   Ha! Victory!

I think I will buy a E7-8891v4 and my best guess at a compatible motherboard..  If it doesn't work I'll just get a CPU that does work in that motherboard and I'll only be out a few bucks...

Thursday, December 16, 2021

SD Card File Transfers Done Carefully

SEE WARNING BELOW, DON'T DO WHAT I SUGGEST IN THIS POST!

 With USB2 SD card readers there really isn't any need to slow them down, they are already not fast.  But if you are like me and you like fast file transfers you probably looked for and found a USB3 SD card reader.  

Unfortunately some combos of SD cards and SD card readers bog down real bad when large transfers are done at high speed. On Linux, this is the solution I use:

tar -cf - {source_files} | pv -q -L {transfer_rate_limit} | tar -C {destination_files} -xvf -

The {transfer_rate_limit} is specified in bytes/sec; a suffix (k, m, g, or t) can be added to the end for specifying KiB, MiB, GiB, or TiB's per second. 

I got this from Matt on stack exchange.

Another use for this: If the transfer is being done between two modern computers, you can speed up the transfer by adding encryption at the source and decryption at the destination, the 'z' is for gzip which is fairly fast:

tar -czf - {source_files} | pv -q -L {transfer_rate_limit} | tar -C {destination_files} -xzvf -

lz4 compresses smaller and much faster, as show by CatchChallenger, but make sure it's installed and supported by your version of tar: 

tar -I lz4 -cf - {source_files} | pv -q -L {transfer_rate_limit} | tar -C {destination_directory} -I lz4 -xvf -

It's a long command with lots of fiddly bits; this is exactly how UNIX was initially designed.  It was supposed to be a system where you can string fairly simple programs together to accomplish complex tasks.  Check out Brian Kernighan talking about it on YouTube.

I haven't figured out what the best speed to transfer at is, I assume it depends on your card and card reader.  The program "time" will measure how long the command takes to run:


anon@grayghost:~$ time tar -I lz4 -cf - ToDo.txt | pv -q -L 4096 | tar -C /home/anon/Sy/ -I lz4 -xvf -
ToDo.txt

real 0m0.015s
user 0m0.009s
sys 0m0.016s
anon@grayghost:~$ time tar -I lz4 -cf - ToDo.txt | pv -q -L 1024 | tar -C /home/anon/Sy/ -I lz4 -xvf -
ToDo.txt

real 0m0.287s
user 0m0.016s
sys 0m0.019s
anon@grayghost:~$

 Neat!

Update; works great with making ISO images with dd:

dd bs=1M if=[image_name] | pv -q -L 10M | dd of=/[your_director_here]
(I haven't tested that dd command YMMV)

I just ran into a problem.  The contents of my SD card was corrupted.  Transferring data slowly off of the card actually heated it up to 164°F, while just letting it run was only 99°F.  I don't yet know if the heat and transfer speed was source of the problem.  Until I can figure it out avoid, or at least be a bit cautious, using this technique!



Wednesday, December 15, 2021

GRUB2

I've always loved GRUB.  It's not easy to use, but man it works well, usually the setup is automatic, but maybe a little scary if you have to do something manually.  But then it's setup and it works for years.  

If/when GRUB fails it doesn't wreck your data, and can usually be recovered with a boot disk and a few commands.

Seriously love GRUB, and GRUB2 is dramatically better!

Yesterday I got tired of putting 2-4GiB ISO images on to 32GiB SD cards.  My friends were starting to wonder if I needed an intervention:

 So I started looking at tools to put multiple ISO's on to one large bootable SD card, and simply choose which one you wanted to boot at boot time.  I found the excellent website of LinuxBabe.com who suggested MultiBootUSB  and MultiSystem - but both of those appear to be abandoned projects from some time ago.

Someone on Discord suggested PLOP. Truly hilarious name.  But that also looked really sketch.  Then I found another LinuxBabe article;  apparently GRUB2 can boot directly to ISO's!!

So I made these partitions on a USB stick: 

Number  Start   End     Size    File system  Name      Flags
 1      1049kB  2097kB  1049kB               bios
 2      2097kB  68.2MB  66.1MB  fat32        efi_boot  boot, esp
 3      68.2MB  128GB   128GB   ext2         iso_cube

The first partition is a BIOS protective partition and has no file system, some old computers or misbehaving software will overwright the beginning little bit of a disk.  1 MiB is excessive, but it also helps ensure partitions are 4k block aligned, and I don't care about 1 Mib.

Mounted new filesystems:

mkdir /mnt/efi_boot
mkdir /mnt/iso_cube
mount /dev/{usbstick}2 /mnt/efi_boot
mount /dev/{usbstick}3 /mnt/iso_cube
mkdir /dev/efi_boot/boot
 

Installed GRUB2 onto the USB stick (this was on an Ubuntu system, YMMV):

grub-install --efi-directory=/mnt/efi_boot --boot-directory=/mnt/efi_boot/boot --removable

Booted to the USB stick, and then proceeded to boot directly to an ISO file.  The 'ls' commands are me looking for files, GRUB names disks in a way that is easiest for GRUB - we just have to deal with it:

ls
ls (hd0,gpt2)/
ls (hd1,gpt3)/
set isofile="/ubuntu-20.04.3-desktop-amd64.iso"
loopback loop (hd1,gpt3)$isofile
ls (loop)
ls (loop)/
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet noeject noprompt splash
lnitrd (loop)/casper/initrd
boot

Victory!

So LinuxBabe showed how to add ISO entries to the GRUB menu so you don't have to memorize and type a bunch of commands every time.  After I add a bunch more ISO's and test them out I expect I'll probably do that.  For now I just made a file on the usb stick with the commands I typed.  The grub command line has 'cat' so I can read my instructions, I don't boot from USB very often, so I might just leave it.  Having to use the GRUB command line every once and a while will go a long way to helping me learn it. 

Monday, December 13, 2021

tar

I regret what I wrote below.  It turns out that tar has gotten easier over the years, it now supports the origional unix style arguments and some easier to understand "GNU" style arguments.  All I had to do to extract my tar file was:

tar --extract --file=$filename

I need to be less grumpy.  Tarball creation is easier now too:

tar --create --file=$newtarball --$options $files

compression options; pick one: --[bzip2,xz,lzip,lzma,lzop,gzip,compress,zstd]
 

other options:
  --label=$TEXT
  Handling of file attributes - (there are a lot of confusing options here, I'm only listing a few that I can see might be useful to me:)
  --sort=[none,name,inode] (inode is a performance tweak)
  --atime-preserve
  --preserve-permissions
  --preserve-order
  --format=$tldr
      (there are some archaic (?) formats supported, the important thing to know is that tar itself has two formats tar<=1.12.x  and tar=>1.13.x - hopefully I never have to care about this; but it seems like something that could bite the llamas ass.)
  Device blocking options - (these are options that you don't need until you really need then, and then you find out that good-ol-tar is [hypothetically] the only archive format that can handle your input...)
  Device selection and switching - (these options seem to have everything to do with tape backups.  I have three Tandberg tape libraries.  I want to learn how to use amanda. I don't want to use tar to make multi-volume tape backups.  But it's good to know I could; but I'd never be able to find anything without some sort of very complicated index.)
    Extended File Attributes - ACL's, SELinux, and xattrs options.
 

I still think we need a revolution in open source usability.  But; we're not going to be there by spreading grumpiness.  - Perhaps I should limit the number of blog posts I write at 2:45AM.  :-)

I've come to dread every tar ball download.  Because I know I'm going to sit there for at least 10 minutes desperately scrolling through the contents of 'man tar'  trying to figure our how to extract the files.

I still remember how to use pkzip and pkunzip, version 2.04g - their help files were SOOOOO easy to read and understand.

Why does tar have to be so horrible?  I can't even imagine how much more difficult it would be if I wasn't a native english speaker.  -- Although I suspect the man pages are probably smart enough to display help text in your language of choice; if such help exists.

Manual page tar(1) is 965 lines long.  At ~60 lines per page that's 16 pages.  There are about 4 million websites out there that have been written to answer the question "how to untar"

Open source software is CONSTANTLY shooting itself in the foot.  Because the philosophy is so attractive, so GOOD, uncountable human hours have been spent developing amazing open source tools, which any sane person would/should avoid like the plague, because they are just too complicated to use.

We need a revolution in open source, a usability revolution.

[Snort]  check this out...

"failed-read
                     Suppresses  warnings  about unreadable files or directories. This keyword applies only if used together with the --ignore-failed-read option."

So to suppress an unreadable file warning you have to use the --ignore-failed-read option and the --failed-read option?  I'm so confused and flabbergasted....   The madness just doesn't end!  These 16 pages are the BRIEF version!  Apparently I'm supposed to read the 'info' pages for the full version.


Computer Name Resolution, DNS and Friends - My Musings and Ramblings

 I intend this to be a blog post that I'm going to update, but it might make more sense to move this information to a personal knowledge web....   We'll see.

 DNS  -  You want to contact a computer to which you know the name of?  No problem.  The computer your using makes a request to a Domain Name Service, asking for an IP address for the server, then proceeds to connect to the server using it's IP address. - Simple!

Many internet fundamental technologies were created by very clever people in robust and simple ways and have either stood the test of time; or developed such a historical inertia that they had to be kept the same or else everything thing would break.  Many of these technologies have been extended and expanded in very clever ways to function better and more completely today then they ever have.

At first blush Computer Name Resolution doesn't seem to be one of these golden children.  Check out the Wikipedia History on DNS - In 1973 ARPANET used a hosts.txt file on each system, and apparently it was managed by Jake over at Stanford.  She managed all computer name resolution for ~17 years.  --  Stick that on your resume and smoke it.  --  Oh, and she invented Domains.  --  Although I 100% believe Jake was clever; the systems that she and her team put into place have not been robust.  The one constant for DNS seems to be that it constantly changes; and stays the same.

I imagine there is a ton of awesome history between 1989 and now.  But I'm trying to get my server to work, so I'm going to focus on today.  Today Jake has been replaced by a group known as the"Internet Assigned Numbers Authority" (IANA). 

Or excuse me maybe it's the Public Technical Identifiers (PTI) that actually run things, they are an affiliate of ICANN, contracted to preforn the IANA functions on behalf of ICANN.

Based on my messed up preconceived notions and the very few things I think I've learned about ICANN I believe them to be completely morally bankrupt.    --  Really, never in history has a bureaucracy been worse than ICANN.  As far as I know they are completely useless and  a massive detriment to society in general.  The only way to get anything done with ICANN is to provide nation state level bribes to it's ~388 employees. 

Jon Postel did it better in his spare time and without charging anything for his services.  

None of this should have happened, it's a modern tragedy. 

"Once you realize what a joke everything is, being the Comedian's is the only thing that makes sense."

—Eddie Blake

So forget it, lets move on.  Lets look at the technology, and see what's been done and where we can go from here.

If you have something on the internet, you probably started with getting a name from Jon/ICANN/PTI/IANA, lets call them JIPI.  JIPI authorizes registrars to charge you yearly for your name. 

Either those registrars, a hosting company, or you, must provide DNS servers to go along with your name.  You maintain 'records' with those DNS servers so that when someone requests information on how to contact your site the DNS server responds with an IP address, or such, which the requestor can use to contact the computer that is hosting your site.  "Site" in this case could be a web page, game, virtual world, or whatever...

I just looked up "josiahluscher.com" and a name server ns3.dreamhost.com replied with an 'A' record and the IP address 64.90.48.157

Neat eh?  DNS servers are hierarchical, and divided up into zones.  So if whatever DNS server you contact doesn't have an authoritative answer, it asks the lowest server that it knows will be able to find the answer....  That might be the root DNS server. The root server won't give an answer though, it just refers the requester to a higher level server that should have the answer.  this referral process may repeat several times. Finally the "authoritative" DNS server is found, and then you get an answer.

Obvious challenges to traditional DNS:

  1. Internet DNS, doens't know about local networks, so a local DNS is needed.
  2. Multiple computers serving many users who all expect to use the same service.
  3. Prevent malicious actors from replying with fake destinations to perpetrate man-in-the-middle attacks.
  4. Others?



Pieces of software that I want to learn about related to DNS:
nmcli - NetworkManager
systemd-resolvd
dnsutils
ifupdn
iproute2
resolvconf
dhclient
net-tools
mDNS

nmcli

In terms of ease of use and the help information available nmcli is one of those programs that give Linux a bad name. 

 [Good news though I did solve my immediate problem that inspired this post.  My eno1 wired gigabit ethernet interface was setup with a static IP and static DNS records which were no longer correct. The way to change that interface to DHCP and remove the old records is this:

nmcli device show eno1
less /etc/sysconfig/network-scripts/ifcfg-eno1

nmcli con mod eno1 ipv4.ignore-auto-dns no
nmcli device modify eno1 ipv4.method auto
nmcli device modify eno1 ipv6.method auto
nmcli con mod eno1 -ipv4.dns [Old.Incorrect.DNS.IP]
nmcli con mod eno1 -ipv4.dns [Old.Incorrect.DNS.IP]
systemctl restart NetworkManager

nmcli device show eno1
less /etc/sysconfig/network-scripts/ifcfg-eno1


To be continued someday....

Sunday, November 28, 2021

Serial RS232 Lessons and Musings

Yesterday and today I made all the mistakes I could possibly make connecting to a serial device, EXCEPT for letting the smoke out.   Win? ¯\_(ツ)_/¯  For posterity, and for future Josiah, here are the two big mistakes and I made and lessons learned.

First mistake: I used an Isolated 5v RS485 adapter to attempt to connect to an RS232 device. - It didn't work; but I do wonder if it would have worked, if I had used a level shifter.  I might try that later.

The differences between RS232, RS485:
(Table copied from here.)


RS232RS485
Voltage SystemVoltage level-basedDifferential
Total Drivers and Receivers on One Line1 Driver, 1 Receiver32 Drivers, 32 Receivers(One Driver active at a time)
Line ConfigurationPoint-to-pointMultidrop
Maximum Operational Distance15M / 50FT1,200M / 3000FT
Maximum Data Transmission Rate1MBit/s10MBit/s
Duplex ModeFull DuplexHalf Duplex or Full Duplex
Maximum Driver Output Voltage+/-25V-7V to +12V
Receiver Input Resistance3 to 7 kΩ12 kΩ
Receiver Input Voltage Range+/-15V-7V to +12V
Receiver Sensitivity+/-3V±200mV
 

  • The RS485 standard does not  define a communications protocol, these are the ones I'v been able to find so far.:
    • Modbus - Open Protocol, common in factory automation.
    • Profibus - IEC 61158 standard, common in factory automation.
    • (?) - Commercial aircraft cabins' vehicle bus
    • DMX512 - Stage lighting and effects.
    • AES3 - Digital audio transmission between some 'pro' audio gear.
    • (?) -Building automation, surveillance and door control devices.
    • DCC - Digital Command Control for Model Railways
  • Regarding distance for RS485: A quick approximation is that the length of the line in meters and the data rate in bits per second should not exceed 108. For example, a 20-meter cable would probably allow a data rate of 5 Mbits/s.
  • RS-422 is a variation of RS-485 with similar specifications but is designed only for one driver and up to 10 receivers. 
  • RS-423 is a single-ended rather than differential variation of RS-422.

Both RS485 and RS232 send data serially, but that's about where the similarities end.  RS485 is great for long distance multi device connections. RS232 is great for cheap device to host connections.

 Why use RS232 at all if RS485 is better?  Many reasons. First like the width of railroad tracks, RS232 has been around forever.  It has historical inertia.

(Historical information from LinusAkesson, and Wikipedia.)
    RS232 became a standard in May of 1960; but it's roots go MUCH farther back than that.  The stock ticker, invented in 1869, is really the start of serial data transmission standards.
    But it gets so much more wild than that!!  The stock ticker evolved into the ASCII teletype.  Teletypes were once connected across the world in a network called Telex; used to send telegrams.  Global text messaging(!); but you know, on paper at both ends.
    As computers moved from batch processing static data, like punch cards, to becoming fast enough to interact with humans in real time; some sort of user interface was needed, and Telex machines were readily available.  Underneath the hood the Unix/Linux Kernel still today relies heavily on manipulating streams of data; exactly like those from a serial teletype, or to a cast iron stock ticker from the mid 1800's.  If you want to understand Linux, I strongly recommend digging into this.  Amazingly technology from 1869 influenced how the terminal on modern computers today operate.  Seriously, check out the Linus Akesson site, link above; it's good!

Second reason why you pretty much never see RS485:  I feel like RS485 never really caught on.  Today on Digi-Key a 500kbps RS485 chip costs $3.37, a 10mbps Ethernet chip is $3.06, and if you want them in bulk you can get 100mbps Ethernet chips for less than a dollar.  I suspect that RS485 didn't catch on because for single devices RS232 was easier and cheaper, and for multiple devices networks like Ethernet were in most cases a better option.  -  Clocks in buildings are an interesting exception.  I've seen some strange systems for synchronizing the clocks throughout a building, including RS485.

 Second mistake: For my second attempt I used an isolated 5v RS232 to USB adapter to connect to a 3.3v serial device.  

I was able to get some garbled data from the device using this.  At first I thought it was a problem with baud rate, or something more esoteric like a bit-wise inversion.  However it was just the wrong voltage.

 A few notes on real world use of RS232:
    The early RS232 official standard "zero" was represented by a voltage of between +3 and +15 volts, and "one" was a voltage between -3 to -15 volts.  In the EIA-232 standard it was increased to +/-25 volts!  Today, "nobody" does this.  RS232 voltage is either 0v/5v - or - 0v/3.3v.  If you connect your expensive computer to a lot of serial devices it's a good idea to get an isolated USB to serial adapter.  Then if you do happen to plug into a real/old RS232 port you don't fry your computer with 50v AC into your USB port.
    RS232 officially has 11 different wires (DCD, DSR, RI, RTS, RTR, CTS, TxD, RxD, GND, PG) - Unless your using a modem over a POTS phone line you will only use three wires, TxD, RxD, and GND (maybe also a shield for PG).  I remember connecting to BBS's as a kid and having a vague knowledge of RI and CTS and such.  I'll be surprised if I ever have to do that again. Three wires and a shield are all you need.
    I plan on making a level shifter with DB-9 plugs on either side that I can add to my little collection of gender adapters and null-modem adapters.

Third lesson: Not all inexpensive USB to serial adapters are the same or even sane.
    Some inexpensive USB to serial adapters that have a 3.3v Vout pin: still output 5v on the Tx pin!  -  Also strange, but more useful are adapters that are the reverse:  3.3v Rx and Tx, with a 5v Vout to maybe power a device with.

    Be careful when buying a USB to serial adapter, know what your getting, and know that eventually you might need more than one type!

If you use USB serial adapters professionally: don't use a cheap adapter.  It's not worth your job.  When I'm connecting to an expensive PLC processor, or the console port of a fancy network switch, I don't use a serial adapter I got from a stranger in another country for 5$.  For professional work I really like the ones made by Advantech, I have an older version of BB-USO9ML2-A, 2,000+ volt isolation, quality design, and no corners cut provide a lot of piece of mind.

    But for hobby work, if you want to spend much, much, less you can get isolated or non-isolated ones from Aliexpress.  If you want to buy American, Adafruit sells a nice selection.

*** NOTE!!  If you don't want headaches, consider paying a little bit more and get a USB to serial adapter with a real FTDI chip.  The cheaper chips like the PL2303 and CP2102 usually work fine after you find, download, and install drivers for them.  But there are some devices that you just can't connect to if you don't have a real FTDI chip;  and yes there are fake FTDI chips out there.  I've held one in my hand, it was labled FTDI, but it was not.  Even with the correct drivers it could not connect to many Allen Bradley PLC's.  ***

(These are not affiliate links, I don't care what you buy.  :-) )

Now that you know about the variety of USB to serial adapters, you are going to have much fewer problems transferring data over serial ports!  Have fun!

PS: I've already expanded and updated this post, several times.  This may end up less of a blog post and more of a 'living' document.







Thursday, July 15, 2021

Linux Sucks!

 So I tried to take a screenshot today, but I couldn't find it.  I had previously set a setting that saved my screenshots in a specific place.  It took about an hour for me to figure out where they were going.  

 (I was slightly thwarted because I was hitting Ctrl-PrintScreen - on my last laptop the print screen button required hitting Fn and I got confused.  Ctrl-PrintScreen puts the screenshot into a paste buffer.)

So after finding out where the screenshots were going I tried to set the setting again to get the screenshots to once again save in the correct place.

Things like this shouldn't happen in a modern polished Linux Distribution like Debian; but the popular belief is that there are a lot of volunteer programmers who work on Linux, so mistakes happen, because they aren't professionals.

That's not the case here, check out the webpages linked below. These are small people who have the power to help, but are too focused on maintaining their power over their little corner of the operating system.  They refuse to communicate effectively; or solve a problem that many users are having.

After doing a bit of research, there are a few ways to fix it and make it work again.  Users shouldn't be expected to go to great lengths to change a setting...  I may give this more consideration later and see if I can unravel this web of garbage; but I have to work in the morning, I need to sleep now.

Relevant pages:

https://askubuntu.com/questions/114429/how-can-i-specify-the-default-save-directory-for-gnome-screenshot
https://bugzilla.gnome.org/show_bug.cgi?id=699642
https://cialu.net/how-to-change-default-gnome-screenshot-savings-folder/
https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en
https://unix.stackexchange.com/questions/279985/how-do-i-change-the-location-where-screenshots-are-saved-in-linux-mint-17-cinnam
https://unix.stackexchange.com/questions/279985/how-do-i-change-the-location-where-screenshots-are-saved-in-linux-mint-17-cinnam
https://wiki.debian.org/ScreenShots
https://forum.manjaro.org/t/gnome-change-default-screenshot-location/67834
https://forums.debian.net/viewforum.php?f=6&sid=96b34c5e3e27354cd0582ff268e79c68

So you can install custom scripts in your home directory.  You can disable the six included shortcuts and make new ones pointing to a different screenshot program, you can install a 3rd party "Gnome Shell' extension, or. apparently there is a way to do it with systemd user units???  But you get the idea...

Petty bickering has removed this feature for millions of people.
Linux Sucks!

But at least you can fix it, if Microsoft doesn't want you to take a screenshot you simply won't be able to.