<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2025-10-05T17:28:10-04:00</updated><id>/feed.xml</id><title type="html"> adamd’s place</title><subtitle>My home on the web</subtitle><entry><title type="html">IBM Personal System/2 Model 30 286</title><link href="/computer/retro/2025/10/05/IBM-Personal-System2.html" rel="alternate" type="text/html" title="IBM Personal System/2 Model 30 286" /><published>2025-10-05T09:00:00-04:00</published><updated>2025-10-05T09:00:00-04:00</updated><id>/computer/retro/2025/10/05/IBM-Personal-System2</id><content type="html" xml:base="/computer/retro/2025/10/05/IBM-Personal-System2.html"><![CDATA[<p><a href="/img/ibmsys2/IMG_20251005_161007_sm.jpg"><img src="/img/ibmsys2/IMG_20251005_161007_sm.jpg" alt="Computer Overview" /></a></p>

<video width="640" height="480" controls="">
  <source src="/img/ibmsys2/IBM_Personal_SYS2sm.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
<p><br /></p>

<p><a href="/img/ibmsys2/IMG_20251005_154014_sm.jpg"><img src="/img/ibmsys2/IMG_20251005_154014_sm.jpg" alt="Computer Front" /></a></p>

<p><a href="/img/ibmsys2/IMG_20251005_154021_sm.jpg"><img src="/img/ibmsys2/IMG_20251005_154021_sm.jpg" alt="Computer Top" /></a></p>

<p><a href="/img/ibmsys2/IMG_20251005_154040_sm.jpg"><img src="/img/ibmsys2/IMG_20251005_154040_sm.jpg" alt="Type and Serial Number" /></a></p>

<p><a href="/img/ibmsys2/IMG_20251005_154055_sm.jpg"><img src="/img/ibmsys2/IMG_20251005_154055_sm.jpg" alt="IBM Personal System 2 badge" /></a></p>

<p><a href="/img/ibmsys2/IMG_20251005_154118_sm.jpg"><img src="/img/ibmsys2/IMG_20251005_154118_sm.jpg" alt="Computer Back" /></a></p>

<p><a href="/img/ibmsys2/IMG_20251005_154346_sm.jpg"><img src="/img/ibmsys2/IMG_20251005_154346_sm.jpg" alt="Computer Inside1" /></a></p>

<p><a href="/img/ibmsys2/IMG_20251005_154356_sm.jpg"><img src="/img/ibmsys2/IMG_20251005_154356_sm.jpg" alt="Computer Inside2" /></a></p>

<p><a href="/img/ibmsys2/IMG_20251005_162404_sm.jpg"><img src="/img/ibmsys2/IMG_20251005_162404_sm.jpg" alt="Monitor Badge" /></a></p>

<p><a href="/img/ibmsys2/IMG_20251005_162416_sm.jpg"><img src="/img/ibmsys2/IMG_20251005_162416_sm.jpg" alt="Monitor Label" /></a></p>]]></content><author><name></name></author><category term="computer" /><category term="retro" /><summary type="html"><![CDATA[Your browser does not support the video tag.]]></summary></entry><entry><title type="html">Mach-E update 11 Months, ~20K miles</title><link href="/auto/ev/2025/01/25/MachE-20K-update.html" rel="alternate" type="text/html" title="Mach-E update 11 Months, ~20K miles" /><published>2025-01-25T08:00:00-05:00</published><updated>2025-01-25T08:00:00-05:00</updated><id>/auto/ev/2025/01/25/MachE-20K-update</id><content type="html" xml:base="/auto/ev/2025/01/25/MachE-20K-update.html"><![CDATA[<h3 id="short-version">Short version</h3>
<p>2023 Mustang Mach-E Select AWD (Standard Range, 226M rated)<br />
The most convenient car I have owned.<br />
–No gas station stops.<br />
–No oil changes.<br />
–Other then a tire rotation, no maintenance at all.</p>

<p>I charge at home and its ready to go every day.</p>

<h3 id="stated-epa-range">Stated EPA range</h3>

<p>Battery: 70 KWh<br />
City: 237.7 Miles<br />
Highway: 206.5 Miles<br />
Combined Range: 224</p>

<h3 id="my-charging-experience">My charging experience</h3>
<p>Most trips are within the range of the car so charging on the road is not common. Most on the road charging has been for the experience and not need. When I actually have needed to, I did get ‘range anxiety’ which isn’t surprising for me.</p>

<p>When I charge on the road its usually pretty easy. Plug in, get coffee, unplug, go.</p>

<p>My most recent frustrating experience.  I booked a hotel with a charger so I could just charge and come back home.  They had two chargers, one worked, the other was in use.  I fought with the broken one for a long time only to give up and go find a rapid charger. I spent about an hour total getting the car ready for the return trip.</p>

<h3 id="is-standard-range-enough">Is Standard Range Enough?</h3>
<p>The longer range NCM batteries have been meeting or exceeding expectations so I can’t say they are bad choices. For me, a worrier, I like the LFP battery and its longer expected life, more stable chemistry. I look forward to advances in battery tech and longer range in my next vehicle but this one has enough for me.</p>

<p>I commute to an office on average 3 times per week. A typical commute day is about 90 miles. Never have I owned a car that could do this without the need to visit a gas station regularly. After charging at home evenings I can do this every day, no gas station stops required.</p>
<h3 id="warm-weather-driving-10c-and-up">Warm weather driving 10C and up.</h3>
<p><img src="/img/EVs/CarInAp.png" alt="" title="Screen shot from the FordPass ap. Shows 100% chage, 263 mi. A silver Mustang Mach-E and Vehicle Parked at the bottom." class="img/img-responsive" width="300" /><br />
Guess-O-Meter regularly showed ranges around 250 miles. Driving under most circumstances I could get this range. Hot days didn’t seem to effect range much, if at all.</p>

<h3 id="cool-weather-driving-temps-around-0c">Cool weather driving, temps around 0C</h3>
<p><img src="/img/EVs/CarInAp2.png" alt="" title="Screen shot from the FordPass ap. Shows 100% chage, 200 mi. A silver Mustang Mach-E and Vehicle Parked at the bottom." class="img/img-responsive" width="300" /><br />
Guess-O-Meter regularly showing ranges from 200 to 210. I suspect I would get this range if I were to drive the entire 200 miles at once but with warming up and shorter trips I suspect 200 would be pushing it.</p>

<h3 id="cold-weather">Cold weather</h3>
<p>Not much difference between the starting GOM reading between cool and cold.  I have been setting to go times so the car does the battery and cabin warming thing.  I depart home with about 190 to 210 on the meter.  I suspect if I drive continuously I would get that. Driving short trips with the car cooling and re-heating would likely get closer to 160-180 based on the GOM through the day.  Since I rarely put more then 90 miles a day on the car I’m not sure where I would have ended up exactly.</p>

<h3 id="parked-cold-at-an-airport-for-a-week">Parked, cold, at an airport for a week.</h3>
<p>We just returned from a trip to Florida. The car was parked at the Portland Maine Jetport for several days.</p>

<p>This screen shot was taken the day we dropped it off, after it had set at the airport around 0C for 12 hours.</p>

<p><img src="/img/EVs/FordPassDropOffDayCold.png" alt="" title="Fordpass ap screen shot showing 76% with 121 mile estimated range." class="img/img-responsive" width="300" /></p>

<p>This was taken on pick up day after sitting for a week outside. The pick up day average temperature had been about -8C.</p>

<p><img src="/img/EVs/FordPassPickupDayCold.png" alt="" title="Fordpass ap screen shot showing 74% with 97 mile estimated range." class="img/img-responsive" width="300" /></p>

<p>This shows the temperatures the car was exposed to for the week.</p>

<p><img src="/img/EVs/2025-01-PWM_Weather.png" alt="" title="This is a screen shot showing the temps for January 19th to the 24th 2025. It shows 5C has the highest temp for the week, -20C for the lowest for the week. The average is about -7C" class="img/img-responsive" width="200" /></p>

<p>I used the Fordpass app to remote start the car and it was warm and ready by the time I got from the gate, to the car.  No issues.</p>

<h3 id="ending-summary">Ending summary</h3>
<p>I really like my car. :)</p>]]></content><author><name></name></author><category term="auto" /><category term="ev" /><summary type="html"><![CDATA[Short version 2023 Mustang Mach-E Select AWD (Standard Range, 226M rated) The most convenient car I have owned. –No gas station stops. –No oil changes. –Other then a tire rotation, no maintenance at all.]]></summary></entry><entry><title type="html">Electric Vehicle misc Thoughts</title><link href="/auto/ev/2024/07/25/MachE_Mustang.html" rel="alternate" type="text/html" title="Electric Vehicle misc Thoughts" /><published>2024-07-25T10:00:00-04:00</published><updated>2024-07-25T10:00:00-04:00</updated><id>/auto/ev/2024/07/25/MachE_Mustang</id><content type="html" xml:base="/auto/ev/2024/07/25/MachE_Mustang.html"><![CDATA[<p><img src="/img/EVs/CarInAp.png" alt="" title="Screen shot from the FordPass ap. Shows 100% chage, 254 mi. A silver Mustang Mach-E and Vehicle Parked at the bottom." class="img/img-responsive" width="300" /></p>

<p>I purchased my 2023 Ford Mustang Mach-E in early March 2024 as a leftover, standard range, AWD.  It’s been an amazing adventure going all electric, one I am really enjoying.</p>

<h1 id="topics-include">Topics include</h1>
<p><a href="#head1">EV Economics</a><br />
<a href="#head2">Environmental Impact</a><br />
<a href="#head3">Energy Usage</a><br />
<a href="#head4">Range</a><br />
<a href="#head5">Charging on the road</a><br />
<a href="#head6">Battery longevity</a><br />
<a href="#head7">Battery Fires</a><br />
<a href="#head8">But my use case is X</a><br />
<a href="#head9">The grid will collapse</a></p>

<h3 id="summary">Summary</h3>
<p>I have really enjoyed owning and driving this car. I am not likely to own an internal combustion engine vehicle as my primary transportation any time soon, perhaps never again.  It seems clear to me electric is the way to go unless you have a use case that it just doesn’t fit.</p>

<h3 id="about-the-facts-here">About the ‘Facts’ Here.</h3>
<p>You should do your own research.  My information is from the internet or my observations and can be wrong.  If you find something that is just plain wrong I appreciate you letting me know. I will update this blog post.</p>

<h3 id="ev-economics"><a name="head1"></a>EV Economics</h3>
<p>Driving an EV can reduce your expenses on fuel and maintenance, leading to savings over time. However, purchasing decisions should not be based solely on financial savings. The cost of EVs in the US is now comparable to that of gas-powered cars. For example, my Mach-E Mustang had a sticker price of $42K, which is similar to an equivalent gas-powered car.</p>

<h3 id="environmental-impact"><a name="head2"></a>Environmental Impact</h3>
<p><img src="/img/EVs/CarPanels.png" alt="" title="A space gray, that kid of looks white, Mustang Mach-E sits in front of 6 solar panels on a horizontal ground mount. Grass below, trees behind" class="img/img-responsive" width="300" /></p>

<p>A gallon of gas in an efficient vehicle can get you 40 miles. The equivalent amount of energy in an EV can get you about 90 miles. I have owned all my previous vehicles beyond 100K miles. 100K  would be about 2500 Gallons of gas or about 82,500 KWH of energy in a gas car. In my EV I will get about 3 miles per KWH so I will use 33,333 KWH of electricity. That is about 60% less energy used in my EV.</p>

<p>The mining of elements for making batteries for EV has an impact but considering an EV will use less than half the energy of a gas car through its lifetime I can’t believe its worse than a gas car.  We can’t ignore that obtaining oil and burning it has its costs also.</p>

<p>My EV has a LFP battery. Lower energy density than other technologies but easier to get the elements to make it. Easier to recycle. Longer life span.</p>

<p>Then we could talk about where the energy comes from. There are many solar and wind farms out there now producing an increasing amount of our energy needs. I have some solar panels myself but only 3.2KW array. Its estimated to produce 4,250 KWH per year which if used just for driving would be greater than 12K miles.</p>

<p>If you park your EV in a small garage and turn it on what happens?  Pretty much nothing at all. Lets imagine doing the same with a gas powered car.  The garage will warm up from the waste heat.  The garage will likely get smokey. You may also die.</p>

<h3 id="energy-usage"><a name="head3"></a>Energy Usage</h3>
<p>Once you look into just how much energy your electric car doesn’t use its amazing.  Let me give you some points I think really highlight this.</p>

<p>My commute is 44 miles, 88 round trip.  A gallon of gas has 33KWH of energy. For the fun of it lets say my last car, a hybrid, got 44 miles per gallon.  This means I can drive to the office using 1 gallon of gas. Now lets put the same energy in my electric car, 33KWH.  My car is doing about 3.5 miles per KWH for summer driving. That means with the same energy it took to get my gas powered car to the office, 44 miles, I can drive my electric car 115 miles.</p>

<p>A few of my co-workers will often eat lunch in their cars. Its summer time and has been pretty hot so they sit with the AC running.  The average 4 CYL car uses about 0.35 gallons per hour when idling, closer to 0.5 with the AC on. Gas has 33KWH per gallon so assuming they sit in the car 30 minutes they will use about 0.25 Gallons of gas. That works out to 8.25 KWH of energy used. So they sit in a hot car while the ~25% efficient engine creates mostly heat, trying to stay cool. The engine block, exhaust system, radiator, etc all radiating waste heat, so they can stay cool.</p>

<p>Now lets talk about one of the ‘bad’ things about an EV. The range drops a lot in the winter time. A large part of the reason for this drop is that there isn’t much waste heat. A gas powered car is about 70% waste heat so if you need some to keep the cabin warm, you’ve got it. Its difficult for me to see this as a negative.  I have so much less wasted energy as heat, that if I want heat, I have to make it.</p>

<p>Not sure its easy to ignore just how much more energy efficient an EV is compared to even the best, hybrid, gas powered cars.</p>

<h3 id="range"><a name="head4"></a>Range</h3>
<p>My standard range vehicle has an EPA rating of 226 Miles.  This summer I’m finding I’m getting 250+. On the coldest days of the winter I suspect I’ll be getting somewhere between 150 and 180. I’ll report back more about that later after I have it through a winter.  I’ll use the number 200 as an average moving forward.</p>

<p>How many days a year do you drive more than 200 miles? 200 miles is a long drive. For every day you don’t drive more than 200 miles you only need to charge at home.  Every day you get in your vehicle it will be ready to travel another 200 miles.  No trip to the gas station required and your energy cost will be significantly less. Since I purchased my car I have charged on the road because of need twice. I have had it nearly 4 months and drove over 7K miles.</p>

<p>When my wife fills her gas powered car her range is closer to 500 miles so this on the surface seems like a big negative for EVs. The funny thing is she will likely spend more time at gas stations than I will at charging stations because every morning I wake up I can drive up to another 200 miles without needing to stop for gas. Its only rare occasions I need to stop and charge on the road.</p>

<h3 id="charging-on-the-road"><a name="head5"></a>Charging on the Road</h3>
<p><img src="/img/EVs/CarCharging.png" alt="" title="White Mustang Mach-E charging at an Electrify America charging station with 4 chargers, three are available." class="img/img-responsive" width="300" /></p>

<p>When I purchased my car I told myself and people around me that I just didn’t plan to use it for long trips.  My wife drives a beautiful SUV and the plan was I would just swap vehicles with her for the day.  One person I told, the owner of a Chevy Bolt EV told me that wasn’t going to happen. He said charging on the road wasn’t a big deal and I would just take my electric car. He was correct.</p>

<p>My Mach-E, and just about any EV are pretty fun to drive.  They are quiet, smooth, and accelerate faster than most cars.  The technology packages are impressive, and fun. So there is a strong desire to just drive my own car.  Turns out that is pretty easy to do.</p>

<p>At first you’re nervous about charging but it goes away.  When I first started driving my car I looked for any possible DC rapid chargers and gave them a try. Every trip I took, even close to home, I would pretend I needed to charge. I learned a lot. For example there is one charging location with first generation DC rapid chargers and they are not reliable, often not working.  I have found others I categorize as awesome.  I found DC rapid chargers in very convenient places such as shopping centers, super markets and highway rest stops.</p>

<p>Of the two times I actually needed to charge on the road, I chose to only charge for 10 minutes.  This is because both trips were just to the high side of my range and a 10 minute charge gets me about 50 more miles.  I just didn’t need to charge any more.</p>

<p>Don’t dismiss standard L2 chargers. They are everywhere. Getting 30 miles of range per hour of charging is pretty slow but lets say your visiting a small town to spend some time shopping and getting lunch. You will likely spend a couple of hours there.  That’s 60 more miles you can drive.</p>

<p>One negative point of note about DC fast charging on the road.  You will pay almost three times the price for electricity you will pay when charging at home.  Home charging saves money when compared to having a gas powered car. Charging on the road will cost you more. There are many Level2 chargers that are completely free, as long as you have the time to wait.</p>

<p>Any building with electricity is a potential place you can charge.  Most cars come with a charger that can work on 120V or 240V. 120V charging plugs are everywhere but you will only gain about 3 Miles for every hour your plugged in. 240V plugs will get you closer to 30 miles per hour of charging but are harder to find. You will find suitable plugs at campgrounds and commonly used for an electric cloths dryer.</p>

<h3 id="battery-longevity"><a name="head6"></a>Battery Longevity</h3>
<p>Many think a degrading battery is a major concern for EV owners. It really isn’t.  First the manufacturers take away this concern by offering very generous warranties on the EV battery. Not to mention an LFP (Lithium Iron Phosphate) battery is rated for anywhere from 3000 to 10,000 cycles. A cycle is a full charge and fully discharged. In my car that translates to somewhere between 600K and 2M miles before my battery hits a point where it only has 80% capacity.</p>

<p>Lets say you have the longer range battery, the NCM type. You should worry if you expect to put more than 250K miles on your car, very uncommon.</p>

<h3 id="battery-fires"><a name="head7"></a>Battery Fires</h3>
<p><img src="/img/EVs/CarFire.png" alt="" title="A small white EV fire below, and above, black smoke. Charge cable hanging out from the fender" class="img/img-responsive" width="300" /></p>

<p>National Fire Protection Association (NFPA) and other studies indicate that gasoline vehicles experience significantly more fires compared to EVs. Think about it.  They are frequently hot and carrying around a highly flammable liquid. It only makes sense.  We are at a time when any EV catching fire is national news, not so much for a gasoline powered car. They have been catching on fire for years.</p>

<p>Many fire departments have expressed concerns about fighting EV fires, and rightfully so. They are trained how to fight gasoline fires. The training and experience with EVs is a work in progress.</p>

<p>Recently a Tesla crashed driving at a high rate of speed in Naples Maine, USA.  It hit so hard it scattered individual battery cells over a wide area, the driver was killed instantly.  I watched the fire chief being interviewed.  There were small pieces of battery burning all over the place. My take away was that a big problem for them was debris collection. How do we handle the scattered pieces of this battery?  Where do we put them to insure more fires don’t start?  These are real problems but I don’t believe they are unsolvable.</p>

<p>Not all batteries are the same. Chemistries and manufacturer quality are important.  There have been products with design flaws such as the Galaxy Note 7, that sparked a lot of fires.</p>

<p>Lithium batteries are now everywhere. I’m sitting in a room that has 4 I can think of quickly. There are 2 laptops, a cell phone, and a portable battery for cell phone charging.  They have a great safety record.</p>

<p>For my EV and battery power tools I keep them in my garage. A garage that has thicker sheet rock that was mandated many years ago to protect me from my gas powered car, that is significantly more likely to catch fire than my battery operated things.</p>

<h3 id="but-my-use-case-is-x"><a name="head8"></a>But my use case is X</h3>
<p>There will be use cases where a gas powered car is a better choice. From what I can tell it takes a lot of energy to plow roads, tow trailers, move cargo long distances, etc. Energy that just isn’t available in an EV with current technology. There are some remote locations, or remote locations with really cold climates. etc..</p>

<p>I think many things can be made to work, if you want them to.  For example you own a remote camp you frequently drive to.  Take a look, are there charging locations in route? Do you have electricity at your remote camp and can charge while there for your return trip?</p>

<p>Are you on on the road sales person and drive more than 200 miles in a day frequently?  Take a look around. Do some of your customers have EV charging?  Perhaps a lunch stop charging station. Most cars can charge in less than 30 minutes to 80% capacity, that is pretty quick.</p>

<p>Do you drive 1500 miles to Florida every fall to return in the spring?  That can be done in an EV. In my car I would have to charge just under 6 hours total at DC fast chargers.  This 6 hours is if I did NOT plan to charge at any hotel I may stay at. So every 2 hours of driving I need to sit at a charger for 30 minutes. Keep in mind this is in my ‘standard range’ 226 EPA rated vehicle. Many EVs can do better. Like I said, it can work if you want it to. If you don’t then you will see this as unacceptable. I hope to do this trip, this year, just to see how it goes. My figures were generated by a trip from Portland, Maine to Orlando, FL using https://abetterrouteplanner.com/ as my trip tool.</p>

<h3 id="the-grid-will-collapse"><a name="head9"></a>The Grid will Collapse</h3>
<p>The usual narrative is something like that if everyone swapped over to EVs the grid couldn’t handle it.  I guess the premise being everyone switched over at the same time.  I agree, if the completely impossible were to happen and we all were driving EVs suddenly the grid would collapse.  What is possible, and currently happening, is we are swapping over slowly and in a manner that enables our power supply and delivery companies to keep up.</p>

<p>There may eventually be policies put in place to encourage off peak charging. Newer technologies that allow for the fleet of EVs to give power back to the grid during peak demands, etc. Time will tell how this all works out but the collapsing grid is not a likely outcome.</p>]]></content><author><name></name></author><category term="auto" /><category term="ev" /><summary type="html"><![CDATA[I purchased my 2023 Ford Mustang Mach-E in early March 2024 as a leftover, standard range, AWD. It’s been an amazing adventure going all electric, one I am really enjoying.]]></summary></entry><entry><title type="html">Furi Labs FLX1 Linux Phone first impressions</title><link href="/computers/mini/2024/07/20/FLX1LinuxPhone.html" rel="alternate" type="text/html" title="Furi Labs FLX1 Linux Phone first impressions" /><published>2024-07-20T10:00:00-04:00</published><updated>2024-07-20T10:00:00-04:00</updated><id>/computers/mini/2024/07/20/FLX1LinuxPhone</id><content type="html" xml:base="/computers/mini/2024/07/20/FLX1LinuxPhone.html"><![CDATA[<h1 id="topics-include">Topics include</h1>
<p><a href="#head0">Docked Mode</a><br />
<a href="#head2">Processing Power</a><br />
<a href="#head3">Cell Coverage in the USA</a><br />
<a href="#head4">Battery Life</a><br />
<a href="#head5">State of the Software</a><br />
<a href="#head6">Camera</a></p>

<h1 id="links">Links</h1>
<p><a href="https://furilabs.com/" target="_blank">Furi Labs FLX1</a><br />
<a href="https://fosstodon.org/@furilabs" target="_blank">Furi Labs on Mastodon</a><br />
<a href="https://t.me/furilabs_chat" target="_blank">Furi Labs on Telegram</a></p>

<h3 id="summary">Summary</h3>
<p>The FLX1 has much better specifications then my Librem5 making it faster, longer battery life, better pictures, etc. The Librem 5 is still the winner for me because of the FLX1 having a modem that doesn’t work well in the USA. The software is still a work in progress.</p>

<p>If they ever offer a model with a modem that works well in the USA I’ll likely purchase one.</p>

<p><br />
<img src="/img/linphones/FLX1_L5_Front.png" alt="" title="FLX1 phone on left with desktop showing many launch icons, Librem5 on the right also showing desktop with icons. The FLX1 is physically larger then the Librem5" class="img/img-responsive" width="600" /></p>

<p>Here you can see the FLX1, on the left, is physically larger then the Librem5.</p>

<h3 id="docked-mode"><a name="head0"></a>Docked Mode</h3>
<p>I didn’t do any testing but was told there is no support for an external display. This is OK for me as I would want it for a phone mostly anyhow but it should be noted if you are thinking of making a purchase. Docked mode is something the other Linux phones I have messed with can do. (pinephone, Librem5)</p>

<h3 id="processor-power"><a name="head2"></a>Processor Power</h3>
<p>A fun test I always like to do on a processor is to calculate PI to 4000 places and see how long that takes. It doesn’t tell a full story but it is informative. A summary would be that the FLX1 is way faster.</p>

<p>Here on my Librem 5. I pick one of the four cores. I don’t think I need to as they are all the same.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>purism@pureos:~$ taskset -c 3 bash -c "time echo 'scale=4000;a(1)*4' | bc -l &gt; /dev/null"
real    0m36.805s
user    0m36.793s
sys     0m0.005s
</code></pre></div></div>
<p>#Now on the FLX1.  First on a fast core, then a slow one.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@FuriPhoneFLX1:~# taskset -c 6 bash -c "time echo 'scale=4000;a(1)*4' | bc -l &gt; /dev/null"
real    0m16.428s
user    0m16.420s
sys     0m0.000s
root@FuriPhoneFLX1:~# taskset -c 0 bash -c "time echo 'scale=4000;a(1)*4' | bc -l &gt; /dev/null"
real    0m41.158s
user    0m41.142s
sys     0m0.009s
</code></pre></div></div>

<h3 id="cellular-service-in-the-usa"><a name="head3"></a>Cellular Service in the USA</h3>
<p>Its crap.  Let me explain.  You can follow this link to see how the modem in this device fairs in the USA.<br />
<a href="https://www.kimovil.com/en/frequency-checker/US/gigaset-gx6" target="_blank">Compatibility of the FLX1 modem in the USA</a><br />
I have T-Mobile and work in Portland, Maine, USA.  I can get nearly zero coverage with the exception of the phone saying ‘2.75G’ which I’m told is 2G on steroids.</p>

<p>Even with this 2.75G coverage its spotty in Portland.  Driving home and the situation was very bad. I would freqently have no coverage at all.  At my house nothing. This is really bad considering both my wife with AT&amp;T and myself with T-Moble have excellent signal strengths. You may notice the Librem5 in the picture above is 4 out of 5 bars.</p>

<p>A little digging shows that there is no 2G or 5G service in my area.<br />
<a href="https://www.cellmapper.net" target="_blank">Cellmapper.net</a><br />
Since there is only 4G and not on a band that works with the FLX1, I am out of luck.  I have ordered a verizon SIM for testing but my expectations are pretty low.  Hopefully I can get 5G in Portland but suspect I will still get nothing at home.</p>

<p>Furi Labs is looking into what it will take to get coverage in the USA. Likely a USA specific model, less likely a modem firmware change.</p>
<h3 id="battery-life"><a name="head4"></a>Battery Life</h3>
<p>Nothing but good news to report here.  It seems to last for a couple days without issues. Perhaps partly because I don’t keep a SIM card in the device, not sure.  When the screen blanks it uses something called ??batman?? to turn off cpu cores. It keeps just core 7, one of the fast cores running.</p>

<p>It doesn’t go into sleep so you continue to get notifications from all applications. This is awesome.  To get more then about 5 hours from the Librem5 I have to let it sleep. When the L5 is sleeping only a phone call or text will wake it up.  I tend to not let it sleep and just keep in plugged in whenever I can. The FLX1 is a clear winner for battery life.</p>

<h3 id="state-of-the-software"><a name="head5"></a>State of the software</h3>
<p><strong>This phone is very new and its software is in a rapid state of development. Many issues mentioned here may already be fixed.</strong><br />
Firefox was crashing but I was given the fix for it. Seems to have to do with accelerated graphics. I believe the command I was given disabled OpenGL but this phone is powerful enough it still worked quite well.</p>

<p>When I had ‘2.75G’ service I was able to make calls and receive simple SMS messages. MMS did not work. I started looking into that but was told by helpful Furi Labs people on Telegram chat to just wait, I would have working MMS very soon.</p>

<p>Speaking of audio devices.  Since the phone modem was such an issue I proceeded to try and setup a SIP account. With the applications I tried I could hear the remote end fine but could not be heard.  When I asked Furi they said they are aware of audio issues that should be sorted out with the next release.</p>

<p>I was able to connect my Nextcloud account at murena.io but..  Everything synced in OK but the calendar changes made on the FLX1 didn’t reflect back. While trying to test output audio I was trying to set calendar reminders, which I could not.</p>

<p>I could not make gnome-clocks alarms or timers make any sound. I have since been told I needed to ‘sudo apt install libgtk-4-media-gstreamer’ and sound would have worked.</p>

<p>I transferred some Linux Magazines to the device. After installing evince, so I had an application to view them, I was very impressed by the graphical performance.</p>

<h3 id="camera"><a name="head6"></a>Camera</h3>
<p>I didn’t do a lot of testing here but what I did do was all good. It works and seems to work quite well. Great pictures, fast, and even video. I didn’t get audio with the video but am told that is being taken care of.  The one quickly noticeable bad thing is if you keep screen rotation on, putting the camera on its side is confusing as it also rotates the image. I just turned off screen rotation when using the camera.</p>]]></content><author><name></name></author><category term="computers" /><category term="mini" /><summary type="html"><![CDATA[Topics include Docked Mode Processing Power Cell Coverage in the USA Battery Life State of the Software Camera]]></summary></entry><entry><title type="html">TRS80 Model III RISC-V</title><link href="/computers/special/2023/09/18/TRS80M3RISC.html" rel="alternate" type="text/html" title="TRS80 Model III RISC-V" /><published>2023-09-18T01:39:00-04:00</published><updated>2023-09-18T01:39:00-04:00</updated><id>/computers/special/2023/09/18/TRS80M3RISC</id><content type="html" xml:base="/computers/special/2023/09/18/TRS80M3RISC.html"><![CDATA[<p>This models specs<br />
CPU: StarFive JH7110 (Star64 by Pine64)<br />
GPU: Imagination Technology BXE-4-32<br />
Ram: 8G<br />
HDD: SD Card<br />
OS: star64-image-plasma<br />
PI CALC TIME: (time echo “scale=4000;a(1)*4” | bc -l) 40.290s <br />
<img src="/img/trs80riscv/Star64.jpg" alt="" title="Star64 board by Pine64. Single board computer" class="img/img-responsive" width="300" /></p>

<p>Fun project here.  Old hollowed out TRS80 case with new components sporting a RISC-V board.</p>

<p>Usability notes:  It works! Pretty modern, easy to type on, current apps, low power consumption.  What’s not to like?  Biggest usability issue is the 1024x768 12” monitor I used. Pretty low resolution for some apps. Keyboard is a Master Keys Pro by Cooler Master.</p>

<p><img src="/img/trs80riscv/TRS80_RISCV_Front_sm.jpg" alt="" title="Image showing the front of an old grey console style computer. A TRS80 Model III. Its showing a desktop with some angels wings in the middle. Typical taskbar at the bottom.  Keyboard is black full size with numeric keypad. The two bays on the right that normally held 5.25&quot; floppy disks have clear glass covering them. Mouse and Mousepad on the right side. USB hub on the top." class="img/img-responsive" width="600" /></p>

<p><img src="/img/trs80riscv/TRS80_RISCV_Back_sm.jpg" alt="" title="Back of the TRS80 console style computer mostly flat but a standard PC power cable input, a couple of DB connectors and an RJ45 Ethernet Connector" class="img/img-responsive" width="600" /></p>

<p><img src="/img/trs80riscv/TRS80_RISCV_InsideBack_sm.jpg" alt="" title="Showing the inside back of the console style computer. It has a mess of stuff including a coupe of din mount power supplies, the Star64 board mounted and a tangle of wires. Speakers in the top" class="img/img-responsive" width="600" /></p>

<p><img src="/img/trs80riscv/TRS80_RISCV_InsideFront_sm.jpg" alt="" title="Inside Front of the TRS80 console style computer showing the LCD panel and its controller board." class="img/img-responsive" width="600" /></p>]]></content><author><name></name></author><category term="computers" /><category term="special" /><summary type="html"><![CDATA[This models specs CPU: StarFive JH7110 (Star64 by Pine64) GPU: Imagination Technology BXE-4-32 Ram: 8G HDD: SD Card OS: star64-image-plasma PI CALC TIME: (time echo “scale=4000;a(1)*4” | bc -l) 40.290s Fun project here. Old hollowed out TRS80 case with new components sporting a RISC-V board. Usability notes: It works! Pretty modern, easy to type on, current apps, low power consumption. What’s not to like? Biggest usability issue is the 1024x768 12” monitor I used. Pretty low resolution for some apps. Keyboard is a Master Keys Pro by Cooler Master.]]></summary></entry><entry><title type="html">Radio, Power, and Ethernet Equipment</title><link href="/equip/misc/2023/05/12/BasementEquip.html" rel="alternate" type="text/html" title="Radio, Power, and Ethernet Equipment" /><published>2023-05-12T14:15:00-04:00</published><updated>2023-05-12T14:15:00-04:00</updated><id>/equip/misc/2023/05/12/BasementEquip</id><content type="html" xml:base="/equip/misc/2023/05/12/BasementEquip.html"><![CDATA[<p>Some interesting equipment.
<br />
<img src="/img/equip/TheWall.png" alt="" title="Picture in the corner of a daylight basement. There is a mess of technical stuff including 19&quot; equipment rack, duplexers, batteries, electrical panels, Ethernet gear, and more. Cluttered but clean. Better described in the article text." class="img/img-responsive" width="600" />
<br />
<br /></p>
<h2 id="radio-gear">Radio gear</h2>
<p>The top shelf contains three TNCs and radios that are part of a ax.25 packet system.
TNCs: MFJ TNC-X, Timewave PK-96, PacComm Tiny-2 MK-2. Radios: Alinco DR-135 MKII, DR-235 MKII, Tait TM8115.</p>

<p>Then we have some 440 duplexers, a Yeasu System Fusion DR-2X repeater, the WOPR (computer running all this stuff), another Yeasu DR-2X, switched receptacles, Pakedge P2 Ethernet controlled receptacles, shelf holding a Alinco DM-330MV power supply, more 440 duplexers, Icom ID-RP2C D-Star repeater Controller, Icom ID-RP4000V UHF digital voice repeater.</p>

<p>To the right of the rack sits two sets of VHF duplexers.</p>

<p>The WOPR computer, a 19” 2U computer in the radio rack that runs this stuff has an ASROCK ITX-3455 main board. This is a low power setup, using less then 25W. Moving around voice packets and being a local NAS just doesn’t need much power.  The WOPR runs OpenSuse Leap and hosts 4 virtual machines. Lubuntu for the packet node, CentOS for the D-Star gateway, pi-hole for local add blocking, and a Windows 7 VM for the Yeasu fusion stuff. WTH Yeasu?  No Linux support? Really? (Not a Yeasu fan)</p>

<h2 id="solar-electric">Solar Electric</h2>
<p>The heart of the solar electric system is the Outback Power Systems inverter on the right under the wall mount 19” equipment rack. Its a 3700W continuous, 7200W for 15s utility interactive inverter. To its left is a DC breaker box and one of the two Mate MX charge controllers. The other charge controller is just to the right of the window. Hard to miss are 8 blue Fullriver DC335-6 batteries in the battery rack. Not in the picture is the 2.2KW solar array.</p>

<p>The system chooses solar power first, utility power second, and batteries as a last resort. This is because the grid is a very efficient system for storing energy. A lot more efficient then batteries. On top of that if the batteries were cycled regularly they would need to be replaced more often.</p>

<p>This system was installed in 2005. I have had no issues of mention with the exception of having to replace the batteries twice so far.</p>

<p>Powered directly off the inverter are fridge, furnace, radio gear, garage doors, computer room receptacles, and general lighting circuits. When the power fails these circuits are automatically powered by the batteries with a transition time so fast that you won’t notice anything.  Other circuits loose power but can be manually switched over. Originally all circuits transitioned automatically but this is problematic because if the power fails when you are not home you may kill your batteries running things like electric heaters, window AC units, dehumidifiers, etc.</p>

<p>We can run, if conservative, for ? 24 hours off batteries. If we get a lot of sun we can run necessary equipment for long periods of time. Recharging from a generator can be done if needed.</p>

<h2 id="ethernet-equipment">Ethernet Equipment</h2>
<p>In the 19” equipment rack on the wall has a POE switch, cable modem, pfsense router with 2X LANs. One for the radio network, one for local stuff.  The WOPR (mentioned above) has an add on PCIE 4 port LAN card. This allows it to participate in the radio LAN, local LAN, dedicated port for the D-Star controller, and one port bridged into the radio LAN for the Ethernet switched receptacles.</p>]]></content><author><name></name></author><category term="equip" /><category term="misc" /><summary type="html"><![CDATA[Some interesting equipment. Radio gear The top shelf contains three TNCs and radios that are part of a ax.25 packet system. TNCs: MFJ TNC-X, Timewave PK-96, PacComm Tiny-2 MK-2. Radios: Alinco DR-135 MKII, DR-235 MKII, Tait TM8115. Then we have some 440 duplexers, a Yeasu System Fusion DR-2X repeater, the WOPR (computer running all this stuff), another Yeasu DR-2X, switched receptacles, Pakedge P2 Ethernet controlled receptacles, shelf holding a Alinco DM-330MV power supply, more 440 duplexers, Icom ID-RP2C D-Star repeater Controller, Icom ID-RP4000V UHF digital voice repeater.]]></summary></entry><entry><title type="html">Data from device using SCPI and the usbtmc kernel driver</title><link href="/it/usbtmc/2023/04/23/usbtmc.html" rel="alternate" type="text/html" title="Data from device using SCPI and the usbtmc kernel driver" /><published>2023-04-23T12:32:00-04:00</published><updated>2023-04-23T12:32:00-04:00</updated><id>/it/usbtmc/2023/04/23/usbtmc</id><content type="html" xml:base="/it/usbtmc/2023/04/23/usbtmc.html"><![CDATA[<p>Connected up my Tektronix TDS 2012C to my Linux based computer and learned a bit I thought may be useful to others.</p>

<h1 id="topics-include">Topics include</h1>
<p><a href="#head1">Permissions for the usbtmc device</a><br />
<a href="#head2">Hello world</a><br />
<a href="#head3">5 Second Delay Reading usbtmc Device</a><br />
<a href="#head4">Get a Screenshot</a><br />
<a href="#head5">Getting and Plotting Data with gnuplot</a><br />
<a href="#head6">Misc Commands I Sent to my Tektronix Scope</a><br />
<br />
<br />
<img src="/img/usbtmc/setup.png" alt="" title="Picture of my setup. There are two devices to the left of my computer. A Tektronix TDS 2012C scope showing a sqarewave signal and a Rigol DSA815 spectrum analyzer showing a noise floor. The computer is a System76 Oryx Pro with a 2K 27&quot; monitor above it." class="img/img-responsive" width="600" />
<br /></p>

<p>I have been experimenting with this scope on and off and have lost track of many references but here are a few:<br />
<a href="https://en.wikipedia.org/wiki/Standard_Commands_for_Programmable_Instruments">Wikipedia about SCPI</a><br />
<a href="https://github.com/dpenkler/linux-usbtmc/blob/master/ttmc.c">Awesome c program</a></p>

<h2 id="permissions-for-the-usbtmc0-device"><a name="head1"></a>Permissions for the usbtmc0 device</h2>
<p>The device when connected, in my case, created /dev/usbtmc1. Not sure why its 1 and not 0. One issue is a ‘normal user’ doesn’t have permissions to do anything with it.  Two options here. One is to just ‘sudo chmod 666 /dev/usbtmc1’. The next is more permanent and recommended.</p>

<p>Create a file ‘/dev/udev/rules.d/86-tmc.rules’ with the following in it.</p>

<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nv">KERNEL</span><span class="o">==</span><span class="s2">"usbtmc*"</span>, <span class="nv">MODE</span><span class="o">=</span><span class="s2">"0666"</span>  </code></pre></figure>

<p>Then run: ‘udevadm control –reload-rules &amp;&amp; udevadm trigger’</p>

<h2 id="hello-world"><a name="head2"></a>Hello World</h2>
<p>First a simple test. If you ask the device to ID does it?</p>

<figure class="highlight"><pre><code class="language-bash" data-lang="bash">adamd@pangolin:~/dev/TekTronix<span class="nv">$ </span><span class="nb">echo</span> <span class="s2">"*IDN?"</span> <span class="o">&gt;</span> /dev/usbtmc1
adamd@pangolin:~/dev/TekTronix<span class="nv">$ </span><span class="nb">cat</span> /dev/usbtmc1
TEKTRONIX,TDS 2012C,C015224,CF:91.1CT FV:v24.26
<span class="nb">cat</span>: /dev/usbtmc1: Connection timed out</code></pre></figure>

<p>One point of note here is the ‘Connection timed out’ after about 5 seconds.</p>

<h2 id="5-second-delay-reading-usbtmc-device"><a name="head3"></a>5 Second Delay Reading usbtmc Device</h2>
<p>I spent more time on this then I will admit. From some reading of others posts the kernel driver usbtmc doesn’t set the EOF bit so it just times out. This sucks! It means all my simple techniques can still work but will have a 5 second delay on read.</p>

<p>I tried many things and the only one that worked for me was this. The code came from https://github.com/dpenkler/linux-usbtmc/blob/master/ttmc.c and I just reduced and slightly modified to work for what I wanted to do. It works without the 5 second hang time. It does NOT work for commands that may return more then 1024 bytes. For those commands I still use echo and cat at the command line.</p>

<figure class="highlight"><pre><code class="language-c--" data-lang="c++"><span class="c1">//This was cut from here: https://github.com/dpenkler/linux-usbtmc/blob/master/ttmc.c</span>
<span class="c1">//Trying to make the min necessary to ask an instrument questions from the cli</span>
<span class="c1">//It will read up to 1024 bytes, no more. For pulling large data sets like when using</span>
<span class="c1">//CURVE? I continue to use echo and cat from the command line and deal with the delay.</span>

<span class="cp">#include</span> <span class="cpf">&lt;sys/ioctl.h&gt;</span><span class="cp">
#include</span> <span class="cpf">&lt;unistd.h&gt;</span><span class="cp">
#include</span> <span class="cpf">&lt;fcntl.h&gt;</span><span class="cp">
#include</span> <span class="cpf">&lt;stdlib.h&gt;</span><span class="cp">
#include</span> <span class="cpf">&lt;stdio.h&gt;</span><span class="cp">
#include</span> <span class="cpf">&lt;string.h&gt;</span><span class="cp">
#include</span> <span class="cpf">&lt;linux/usb/tmc.h&gt;</span><span class="cp">
</span>
<span class="kt">int</span> <span class="n">fd</span><span class="p">;</span>

<span class="cm">/* Send string to scope */</span>
<span class="kt">void</span> <span class="nf">sscope</span><span class="p">(</span><span class="kt">char</span> <span class="o">*</span><span class="n">msg</span><span class="p">)</span> <span class="p">{</span>
        <span class="n">write</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="n">msg</span><span class="p">,</span><span class="n">strlen</span><span class="p">(</span><span class="n">msg</span><span class="p">));</span>
<span class="p">}</span>

<span class="cm">/* Read string from scope */</span>
<span class="kt">int</span> <span class="nf">rscope</span><span class="p">(</span><span class="kt">char</span> <span class="o">*</span><span class="n">buf</span><span class="p">,</span> <span class="kt">int</span> <span class="n">max_len</span><span class="p">)</span> <span class="p">{</span>
        <span class="kt">int</span> <span class="n">len</span> <span class="o">=</span> <span class="n">read</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="n">buf</span><span class="p">,</span><span class="n">max_len</span><span class="p">);</span>
        <span class="k">if</span> <span class="p">(</span><span class="n">len</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
          <span class="n">perror</span><span class="p">(</span><span class="s">"failed to read from scope"</span><span class="p">);</span>
          <span class="n">ioctl</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="n">USBTMC_IOCTL_CLEAR</span><span class="p">);</span>
          <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
        <span class="p">}</span>
        <span class="n">buf</span><span class="p">[</span><span class="n">len</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="cm">/* zero terminate */</span>
        <span class="k">return</span> <span class="n">len</span><span class="p">;</span>
<span class="p">}</span>

<span class="kt">int</span> <span class="nf">main</span> <span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span> <span class="o">*</span><span class="n">argv</span><span class="p">[])</span> <span class="p">{</span>
	<span class="cp">#define MAX_BL 20480
</span>	<span class="kt">unsigned</span> <span class="kt">char</span> <span class="n">buf</span><span class="p">[</span><span class="n">MAX_BL</span><span class="p">];</span>
    	<span class="c1">// Check that we were provided with a single command line argument</span>
	<span class="k">if</span> <span class="p">(</span><span class="n">argc</span> <span class="o">!=</span> <span class="mi">2</span><span class="p">)</span>
    	<span class="p">{</span>
        	<span class="n">printf</span><span class="p">(</span><span class="s">"Need a singlecommand to send, perhaps start with '*IDN?'</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span>
        	<span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
    	<span class="p">}</span>

	<span class="cm">/* Open file */</span>
	<span class="k">if</span> <span class="p">(</span><span class="mi">0</span> <span class="o">&gt;</span> <span class="p">(</span><span class="n">fd</span> <span class="o">=</span> <span class="n">open</span><span class="p">(</span><span class="s">"/dev/usbtmc1"</span><span class="p">,</span><span class="n">O_RDWR</span><span class="p">)))</span> <span class="p">{</span>
		<span class="n">perror</span><span class="p">(</span><span class="s">"failed to open device"</span><span class="p">);</span>
		<span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
	<span class="p">}</span>

	<span class="cm">/* Send device clear */</span>
	<span class="n">ioctl</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="n">USBTMC_IOCTL_CLEAR</span><span class="p">);</span>
	<span class="cm">/* set timeout lower */</span>
	<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">timeout</span> <span class="o">=</span> <span class="mi">1000</span><span class="p">;</span>
	<span class="n">ioctl</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="n">USBTMC_IOCTL_SET_TIMEOUT</span><span class="p">,</span><span class="o">&amp;</span><span class="n">timeout</span><span class="p">);</span>

	<span class="cm">/* Send identity query */</span>
	<span class="n">sscope</span><span class="p">(</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">]);</span>

	<span class="cm">/* If the command ended with a =? we expect a response */</span>
    	<span class="k">if</span> <span class="p">(</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="n">strlen</span><span class="p">(</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="sc">'?'</span><span class="p">)</span> <span class="p">{</span>
		<span class="n">rscope</span><span class="p">(</span><span class="n">buf</span><span class="p">,</span><span class="n">MAX_BL</span><span class="p">);</span>
		<span class="n">printf</span><span class="p">(</span><span class="s">"%s"</span><span class="p">,</span><span class="n">buf</span><span class="p">);</span>
	<span class="p">}</span>
<span class="p">}</span></code></pre></figure>

<p>I compile it with ‘gcc -o send_this thecode.c’<br />
With it I can do things like this:</p>

<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#!/bin/bash</span>
./send_this <span class="s1">'MEASU:IMMED:TYPE CUR'</span>
<span class="k">while </span><span class="nb">true 
</span><span class="k">do</span> 
        ./send_this <span class="s1">'MEASU:IMMED:VALUE?'</span>
<span class="k">done</span></code></pre></figure>

<h2 id="get-a-screenshot"><a name="head4"></a>Get a Screenshot</h2>
<p>This has been around a while so I don’t have my reference(s).</p>

<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#!/bin/bash</span>

<span class="nv">dev</span><span class="o">=</span>/dev/usbtmc1
<span class="c">#script gets TDS2012C screen capture-</span>
<span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span> <span class="o">==</span> <span class="s2">""</span> <span class="o">]</span>
<span class="k">then
	</span><span class="nb">echo</span> <span class="s2">"Missing file name as command line parameter"</span>
	<span class="nb">exit
</span><span class="k">fi
</span><span class="nv">out_file</span><span class="o">=</span><span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span>  <span class="c">#output file comes from firs arg of command line</span>
<span class="nv">size</span><span class="o">=</span><span class="s2">"0"</span>
<span class="nv">totaltries</span><span class="o">=</span><span class="s2">"0"</span>
<span class="nb">printf</span> <span class="s2">":HARDCopy:PORT USB</span><span class="se">\n</span><span class="s2">"</span> <span class="o">&gt;</span> <span class="nv">$dev</span>
<span class="nb">printf</span> <span class="s2">":HARDCopy:FORMat JPEG</span><span class="se">\n</span><span class="s2">"</span> <span class="o">&gt;</span> <span class="nv">$dev</span>
<span class="nb">printf</span> <span class="s2">":HARDCopy STAR START</span><span class="se">\n</span><span class="s2">"</span> <span class="o">&gt;</span> <span class="nv">$dev</span>
<span class="nb">printf</span> <span class="s2">":HARDCOPY START</span><span class="se">\n</span><span class="s2">"</span> <span class="o">&gt;</span> <span class="nv">$dev</span>
<span class="c">#I keep trying until my picture is available</span>
<span class="c">#giving up after a bit.</span>
<span class="k">while</span> <span class="o">((</span> size &lt; 20 <span class="o">&amp;&amp;</span> totaltries &lt; 6 <span class="o">))</span>
	<span class="k">do
	</span><span class="nb">cat</span> <span class="nv">$dev</span>  <span class="o">&gt;</span> <span class="nv">$out_file</span> 2&gt; /dev/null
	<span class="nv">size</span><span class="o">=</span><span class="sb">`</span><span class="nb">stat</span> <span class="nt">--printf</span><span class="o">=</span><span class="s2">"%s"</span> <span class="nv">$out_file</span><span class="sb">`</span>
	<span class="nv">totaltries</span><span class="o">=</span><span class="k">$((</span>totaltries+1<span class="k">))</span>
	<span class="nb">echo</span> <span class="s2">"Have tried </span><span class="nv">$totaltries</span><span class="s2"> times, timeout at 6"</span>
<span class="k">done</span></code></pre></figure>

<p>Use like this: ‘./thescript.sh bla.jpg’</p>

<p><img src="/img/usbtmc/screenshot.jpg" alt="" title="This is a screenshot from my Tektronix TDS 2012C oscilliscope. It shows a 5V, 1KHz squarewave." class="img/img-responsive" width="300" /></p>

<h2 id="getting-and-plotting-data-with-gnuplot"><a name="head5"></a>Getting and Plotting Data with GNUPlot</h2>

<p>I use this to get the raw data points. There is a lot of informatin missing such as formating the data, what data we’re taling about, etc.  That information is in my TDS 2012C programmers manual. There are lots of options and you should be looking in your specific devices manuals.</p>

<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c"># DATA INIT defaults the parameters for what CURV you are talking about.</span>
<span class="nb">echo</span> <span class="s2">"DATA INIT"</span> <span class="o">&gt;</span> /dev/usbtmc1
<span class="c"># I want it ASCII encoded</span>
<span class="nb">echo</span> <span class="s2">"DAT:ENC ASCII"</span> <span class="o">&gt;</span> /dev/usbtmc1 
<span class="c"># Request the data points</span>
<span class="nb">echo</span> <span class="s2">"CURV?"</span> <span class="o">&gt;</span> /dev/usbtmc1 
<span class="c"># Read data points back dumping the timeout error mentioned above.</span>
<span class="nb">cat</span> /dev/usbtmc1 2&gt; /dev/null <span class="o">&gt;</span> thedata</code></pre></figure>

<p>Now I have a file with 2500 values all in one big line seperated by commas.
It looks like this: 32,32,32,-21,-30,-31,-31,…
For plotting it I use gnuplot. I use the following configuration file curv.gnuplot</p>

<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#curv.gnuplot</span>
<span class="nb">set </span>datafile separator comma
row <span class="o">=</span> 0
<span class="nb">set </span>yrange <span class="o">[</span><span class="nt">-100</span>:100]
<span class="nb">set </span>terminal x11 size 800,600
plot filename matrix using 1:0 every :::row::row with lines</code></pre></figure>

<p>I get the plot by running this: gnuplot -p -e “filename=’result’” curv.gnuplot<br />
It looks like this:</p>

<p><img src="/img/usbtmc/gnuplotted.png" alt="" title="Looks a lot like the scope screen above just without the units" class="img/img-responsive" width="300" /><br />
<br />
<br /></p>
<h2 id="misc-commands-i-sent-to-my-tektronix-scope"><a name="head6"></a>Misc Commands I Sent to my Tektronix Scope</h2>

<p>Just some random commands I experimented with. I didn’t notice any case sensitivity when sending them. These commands were found in the Tektronix Programmer manual (077-0444-03) for my TDS 2012C osilliscope<br />
*IDN?<br />
ch1:scale?<br />
DATA:SOURCE?<br />
DATA:SOURCE REFA<br />
MEASU:IMMED:TYPE CUR<br />
MEASU:IMMED:VALUE?<br />
HARDCopy:PORT USB<br />
HARDCopy:FORMat JPEG<br />
HARDCopy STAR START<br />
HARDCOPY START<br />
DATA INIT<br />
DAT:ENC ASCII<br />
CURV?</p>]]></content><author><name></name></author><category term="it" /><category term="usbtmc" /><summary type="html"><![CDATA[Connected up my Tektronix TDS 2012C to my Linux based computer and learned a bit I thought may be useful to others. Topics include Permissions for the usbtmc device Hello world 5 Second Delay Reading usbtmc Device Get a Screenshot Getting and Plotting Data with gnuplot Misc Commands I Sent to my Tektronix Scope I have been experimenting with this scope on and off and have lost track of many references but here are a few: Wikipedia about SCPI Awesome c program]]></summary></entry><entry><title type="html">Bash snmp port utilization monitoring</title><link href="/it/snmp/2023/03/30/snmp_play.html" rel="alternate" type="text/html" title="Bash snmp port utilization monitoring" /><published>2023-03-30T15:51:00-04:00</published><updated>2023-03-30T15:51:00-04:00</updated><id>/it/snmp/2023/03/30/snmp_play</id><content type="html" xml:base="/it/snmp/2023/03/30/snmp_play.html"><![CDATA[<p>I have played with snmp (Simple Network Management Protocol) in the past. Time to expand on that knowledge and put it to use. I started off with port utilization on our Ubiquiti Edge Switches.</p>

<p><img src="/img/snmp/ITCloset2.png" alt="" title="19&quot; wall mount rack. From boggom up. Rackmount switched outlets with all the glowing switches on the front. Ubiquiti EdgeSwtich with 24 ports, RJ45 punchdown panel, EdgeRouter, Cablemodems." class="img/img-responsive" width="300" />
<br /></p>

<p>The output from the script looks like this. I was doing an iperf3 test when I grabbed this screenshot.</p>

<p><img src="/img/snmp/script_result1.png" alt="" title="Output from the script showing from ports 21 to 26. It shows P21 at 90%up, 1% down and port 26 with the same values but reversed" class="img/img-responsive" width="200" /></p>

<p>I tend to over complicate things. Perhaps there is a simple and better way to do this. I see a port utilization value in the switches MIB file but it seems to be slow and keeps incrementing. After the time I have put into this script I’m thinking I should have looked more into what that value is and what I could have done with it. It mostly works and I learned a lot so I guess it turned out well.</p>

<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#!/bin/bash</span>
<span class="c"># Experimental script to monitor my Ubiquitu 24 + 2 port EdgeSwitch</span>
<span class="c"># If it seems like I may not know what I am doing its because I don't.</span>
<span class="c"># Seemed to also work on my home pfsense box that has 4 ports.</span>
<span class="c"># Known issues:</span>
<span class="c"># --Full port utilization seems to show as closer to 125%. Will update if I figure out why.</span>
<span class="c"># --Could improve by reading port link speeds via snmp</span>
<span class="c"># --I could not figure out how to make the {1..26} to be variables. HELP!</span>
<span class="c">#</span>
<span class="c"># Corrections / improvements appreciated adamd at sdf.org</span>
<span class="c">#</span>
<span class="c">#10,000,000 = 10**7 10Mb</span>
<span class="c">#100,000,000 = 10**8 100Mb</span>
<span class="c">#1,000,000,000 = 10**9 1G</span>
<span class="c">#10,000,000,000 = 10**10 10G</span>
<span class="nv">port_speed</span><span class="o">=</span><span class="k">$((</span><span class="m">10</span><span class="o">**</span><span class="m">9</span><span class="k">))</span>
<span class="nv">upd_rate</span><span class="o">=</span>5 <span class="c">#seconds</span>
<span class="nv">ip</span><span class="o">=</span><span class="s2">"192.168.0.2"</span>

main <span class="o">()</span> <span class="o">{</span>
        <span class="k">while </span><span class="nb">true</span><span class="p">;</span>
        <span class="k">do
                </span><span class="nv">InOct</span><span class="o">=(</span><span class="si">$(</span>snmpget <span class="nt">-v1</span> <span class="nt">-Oqv</span> <span class="nt">-c</span> public <span class="nv">$ip</span> IF-MIB::ifInOctets.<span class="o">{</span>1..26<span class="o">}</span><span class="si">)</span><span class="o">)</span>
                <span class="nv">OutOct</span><span class="o">=(</span><span class="si">$(</span>snmpget <span class="nt">-v1</span> <span class="nt">-Oqv</span> <span class="nt">-c</span> public <span class="nv">$ip</span> IF-MIB::ifOutOctets.<span class="o">{</span>1..26<span class="o">}</span><span class="si">)</span><span class="o">)</span>
                <span class="nv">InPkts</span><span class="o">=(</span><span class="si">$(</span>snmpget <span class="nt">-v1</span> <span class="nt">-Oqv</span> <span class="nt">-c</span> public <span class="nv">$ip</span> IF-MIB::ifInUcastPkts.<span class="o">{</span>1..26<span class="o">}</span><span class="si">)</span><span class="o">)</span>
                <span class="nv">OutPkts</span><span class="o">=(</span><span class="si">$(</span>snmpget <span class="nt">-v1</span> <span class="nt">-Oqv</span> <span class="nt">-c</span> public <span class="nv">$ip</span> IF-MIB::ifOutUcastPkts.<span class="o">{</span>1..26<span class="o">}</span><span class="si">)</span><span class="o">)</span>
                <span class="nv">x</span><span class="o">=</span><span class="s2">"0"</span>
                clear
                <span class="nb">echo</span> <span class="s2">"Port Utilization ***************************"</span>
                <span class="k">for </span>p <span class="k">in</span> <span class="k">${</span><span class="nv">OldInOct</span><span class="p">[@]</span><span class="k">}</span><span class="p">;</span> <span class="k">do</span>
                        <span class="c">#TotInOct=$((${InOct[$x]} - ${OldInOct[$x]}))</span>
                        <span class="c">#TotOutOct=$((${OutOct[$x]} - ${OldOutOct[$x]}))</span>
                        <span class="c">#TotInPkts=$((${InPkts[$x]} - ${OldInPkts[$x]}))</span>
                        <span class="c">#TotOutPkts=$((${OutPkts[$x]} - ${OldOutPkts[$x]}))</span>
                        get_difference <span class="s2">"</span><span class="k">${</span><span class="nv">InOct</span><span class="p">[</span><span class="nv">$x</span><span class="p">]</span><span class="k">}</span><span class="s2">"</span> <span class="s2">"</span><span class="k">${</span><span class="nv">OldInOct</span><span class="p">[</span><span class="nv">$x</span><span class="p">]</span><span class="k">}</span><span class="s2">"</span><span class="p">;</span> <span class="nv">TotInOct</span><span class="o">=</span><span class="nv">$itemp</span>
                        get_difference <span class="s2">"</span><span class="k">${</span><span class="nv">OutOct</span><span class="p">[</span><span class="nv">$x</span><span class="p">]</span><span class="k">}</span><span class="s2">"</span> <span class="s2">"</span><span class="k">${</span><span class="nv">OldOutOct</span><span class="p">[</span><span class="nv">$x</span><span class="p">]</span><span class="k">}</span><span class="s2">"</span><span class="p">;</span> <span class="nv">TotOutOct</span><span class="o">=</span><span class="nv">$itemp</span>
                        get_difference <span class="s2">"</span><span class="k">${</span><span class="nv">InPkts</span><span class="p">[</span><span class="nv">$x</span><span class="p">]</span><span class="k">}</span><span class="s2">"</span> <span class="s2">"</span><span class="k">${</span><span class="nv">OldInPkts</span><span class="p">[</span><span class="nv">$x</span><span class="p">]</span><span class="k">}</span><span class="s2">"</span><span class="p">;</span> <span class="nv">TotInPkts</span><span class="o">=</span><span class="nv">$itemp</span>
                        get_difference <span class="s2">"</span><span class="k">${</span><span class="nv">OutPkts</span><span class="p">[</span><span class="nv">$x</span><span class="p">]</span><span class="k">}</span><span class="s2">"</span> <span class="s2">"</span><span class="k">${</span><span class="nv">OldOutPkts</span><span class="p">[</span><span class="nv">$x</span><span class="p">]</span><span class="k">}</span><span class="s2">"</span><span class="p">;</span> <span class="nv">TotOutPkts</span><span class="o">=</span><span class="nv">$itemp</span>
                        <span class="o">((</span><span class="nv">y</span><span class="o">=</span>x+1<span class="o">))</span> <span class="c">#Arrays are zero based, ports start at 1</span>
                        <span class="c">#The Incoming utilization</span>
                        <span class="nv">i</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="s2">"(((</span><span class="nv">$TotInPkts</span><span class="s2"> * (96+64)) + (</span><span class="nv">$TotInOct</span><span class="s2"> * 8)) / (</span><span class="nv">$port_speed</span><span class="s2"> * </span><span class="nv">$upd_rate</span><span class="s2">)) * 100"</span> | bc <span class="nt">-l</span><span class="si">)</span>
                        <span class="c">#The outgoing utilization       </span>
                        <span class="nv">j</span><span class="o">=</span><span class="si">$(</span><span class="nb">echo</span> <span class="s2">"(((</span><span class="nv">$TotOutPkts</span><span class="s2"> * (96+64)) + (</span><span class="nv">$TotOutOct</span><span class="s2"> * 8)) / (</span><span class="nv">$port_speed</span><span class="s2"> * </span><span class="nv">$upd_rate</span><span class="s2">)) * 100"</span> | bc <span class="nt">-l</span><span class="si">)</span>
                        <span class="c">#Colors the upload and or download number if it sees above requested percent</span>
                        <span class="nb">echo</span> <span class="s2">"P:</span><span class="nv">$y</span><span class="s2">"</span>
                        <span class="k">if</span> <span class="o">((</span> <span class="si">$(</span><span class="nb">echo</span> <span class="s2">"</span><span class="nv">$i</span><span class="s2"> &gt; 1"</span> | bc <span class="nt">-l</span><span class="si">)</span> <span class="o">))</span><span class="p">;</span> <span class="k">then
                                </span><span class="nb">printf</span> <span class="s2">"</span><span class="se">\e</span><span class="s2">[31m%2.4f</span><span class="se">\e</span><span class="s2">[0m, "</span> <span class="nv">$i</span>
                        <span class="k">else
                                </span><span class="nb">printf</span> <span class="s2">"%2.4f, "</span> <span class="nv">$i</span>
                        <span class="k">fi
                        if</span> <span class="o">((</span> <span class="si">$(</span><span class="nb">echo</span> <span class="s2">"</span><span class="nv">$j</span><span class="s2"> &gt; 1"</span> | bc <span class="nt">-l</span><span class="si">)</span> <span class="o">))</span><span class="p">;</span> <span class="k">then
                                </span><span class="nb">printf</span> <span class="s2">"</span><span class="se">\e</span><span class="s2">[31m%2.4f</span><span class="se">\e</span><span class="s2">[0m</span><span class="se">\n</span><span class="s2">"</span> <span class="nv">$j</span>
                        <span class="k">else
                                </span><span class="nb">printf</span> <span class="s2">"%2.4f</span><span class="se">\n</span><span class="s2">"</span> <span class="nv">$j</span>
                        <span class="k">fi</span>
                        <span class="c">#printf "%2.4f, %2.4f\n" $i $j</span>
                        <span class="o">((</span><span class="nv">x</span><span class="o">=</span>x+1<span class="o">))</span>
                <span class="k">done
                </span><span class="nv">OldInOct</span><span class="o">=(</span><span class="k">${</span><span class="nv">InOct</span><span class="p">[*]</span><span class="k">}</span><span class="o">)</span>
                <span class="nv">OldOutOct</span><span class="o">=(</span><span class="k">${</span><span class="nv">OutOct</span><span class="p">[*]</span><span class="k">}</span><span class="o">)</span>
                <span class="nv">OldInPkts</span><span class="o">=(</span><span class="k">${</span><span class="nv">InPkts</span><span class="p">[*]</span><span class="k">}</span><span class="o">)</span>
                <span class="nv">OldOutPkts</span><span class="o">=(</span><span class="k">${</span><span class="nv">OutPkts</span><span class="p">[*]</span><span class="k">}</span><span class="o">)</span>
                <span class="nb">sleep</span> <span class="nv">$upd_rate</span>
        <span class="k">done</span>
<span class="o">}</span>
<span class="c">#Created to deal with packet and octet counter rollovers</span>
get_difference <span class="o">()</span> <span class="o">{</span>
        <span class="k">if</span> <span class="o">((</span> <span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span> <span class="o">&gt;=</span> <span class="s2">"</span><span class="nv">$2</span><span class="s2">"</span> <span class="o">))</span><span class="p">;</span> <span class="k">then
                </span><span class="nv">itemp</span><span class="o">=</span><span class="k">$((</span><span class="nv">$1</span> <span class="o">-</span> <span class="nv">$2</span><span class="k">))</span>
        <span class="k">else</span>
                <span class="c">#we must have rolled over the register</span>
                <span class="c">#How far was it from the old value to the rollover point?</span>
                <span class="c">#4294967296 = 2^32</span>
                <span class="nv">itemp</span><span class="o">=</span><span class="k">$((</span><span class="m">4294967295</span><span class="o">-</span><span class="nv">$2</span><span class="k">))</span>
                <span class="c">#add that to the new value</span>
                <span class="nv">itemp</span><span class="o">=</span><span class="k">$((</span><span class="nv">$itemp</span><span class="o">+</span><span class="nv">$1</span><span class="k">))</span>
        <span class="k">fi</span>
<span class="o">}</span>
main <span class="s2">"</span><span class="nv">$@</span><span class="s2">"</span><span class="p">;</span> <span class="nb">exit</span></code></pre></figure>]]></content><author><name></name></author><category term="it" /><category term="snmp" /><summary type="html"><![CDATA[I have played with snmp (Simple Network Management Protocol) in the past. Time to expand on that knowledge and put it to use. I started off with port utilization on our Ubiquiti Edge Switches. The output from the script looks like this. I was doing an iperf3 test when I grabbed this screenshot.]]></summary></entry><entry><title type="html">Librem5 Automatic Camera Controls</title><link href="/computers/mini/2023/01/02/L5CameraControlsUpdate.html" rel="alternate" type="text/html" title="Librem5 Automatic Camera Controls" /><published>2023-01-02T11:30:00-05:00</published><updated>2023-01-02T11:30:00-05:00</updated><id>/computers/mini/2023/01/02/L5CameraControlsUpdate</id><content type="html" xml:base="/computers/mini/2023/01/02/L5CameraControlsUpdate.html"><![CDATA[<p>Previous posts that may be of interest that talk more generally about my experience with the Librem 5.<br />
<a href="/computers/mini/2022/10/14/LinuxPhones.html">2022-10-14</a><br />
<a href="/computers/mini/2022/12/13/Librem5.html">2022-12-13</a></p>
<h1 id="librem-5-automatic-camera-controls">Librem 5 Automatic camera controls</h1>
<p>If you are willing to install / use bleeding edge software you can have automatic controls on the Librem 5. If you want to give it a shot I just followed the build instructions here:
<a href="https://source.puri.sm/Librem5/millipixels">Link</a><br />
<br />
I’m sure soon, it will be in the current millipixels ap and there will be no need to build manually. I would check before doing a manual build / install.<br />
<br />
I am very pleased with the performance and it beats the heck out of doing all the controls manually. As you can see there is still some work to be done. In the challenging light situations the images are too dark IMHO. Manual adjustments were an option, I just didn’t use them here.<br />
<br />
I should also note I was also able to take videos although it was rotated 90 degrees. I used ffmpeg to fix.<br />
<br /> 
The one video I took:
<br /></p>
<video width="320" height="240" controls="">
  <source src="/img/linphones/2023beachvideo.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
<p><br />
The pictures:<br />
<br />
<img src="/img/linphones/IMG20230101075912.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101080304.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101080947.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101081356.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101081759.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101082850.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101082928.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101085759.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101090223.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101090513.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101091117.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br />
<img src="/img/linphones/IMG20230101092616.jpg" alt="" title="Misc beach picture" class="img/img-responsive" width="600" /><br />
<br /></p>]]></content><author><name></name></author><category term="computers" /><category term="mini" /><summary type="html"><![CDATA[Previous posts that may be of interest that talk more generally about my experience with the Librem 5. 2022-10-14 2022-12-13 Librem 5 Automatic camera controls If you are willing to install / use bleeding edge software you can have automatic controls on the Librem 5. If you want to give it a shot I just followed the build instructions here: Link I’m sure soon, it will be in the current millipixels ap and there will be no need to build manually. I would check before doing a manual build / install. I am very pleased with the performance and it beats the heck out of doing all the controls manually. As you can see there is still some work to be done. In the challenging light situations the images are too dark IMHO. Manual adjustments were an option, I just didn’t use them here. I should also note I was also able to take videos although it was rotated 90 degrees. I used ffmpeg to fix. The one video I took: Your browser does not support the video tag. The pictures:]]></summary></entry><entry><title type="html">Librem5 Update</title><link href="/computers/mini/2022/12/13/Librem5.html" rel="alternate" type="text/html" title="Librem5 Update" /><published>2022-12-13T17:54:00-05:00</published><updated>2022-12-13T17:54:00-05:00</updated><id>/computers/mini/2022/12/13/Librem5</id><content type="html" xml:base="/computers/mini/2022/12/13/Librem5.html"><![CDATA[<p>I have been experimenting with my Librem5 for about a month now. Here are some findings.<br />
This is a follow up to my previous post here:
<a href="/computers/mini/2022/10/14/LinuxPhones.html">Link</a><br />
<strong>Topics I mention:</strong> 4G calling, Encrypted Messaging, Battery, Suspend, Animatch, Purism</p>
<h1 id="quick-summary">Quick summary:</h1>
<p>Not my every day phone yet but I’m making real progress. My previous issue with 4G calling is resolved. I managed to get encrypted messaging using the matrix protocol working using the Nheko client. Battery life remains an issue but is manageable. There is still work to be done with energy savings, camera, suspend, etc.<br />
Its important to remember that this is running a desktop computer operating system.  Software is being developed, or modified, to be usable on a Linux based phone. While it will run many desktop applications they often don’t fit on the screen, have poor touch interfaces, or just use to much power.<br />
<br /> 
<img src="/img/linphones/librem5_desktop.png" alt="" title="Screenshot of my Librem5 shows 4G, 3 out of 4 bars, bluetooth icon, 20:05, Location services icon, battery symbol at 95%. Then a Search apps text box.  The following Icons: Calls, Chatty, Web, Contacts, 2048, Advanced network, Animatch, Backups, BM818 check, BM818 VoLTE, Calculator, Calendar, Camera, Chess, Clocks, Contacts Import, dconf Editor, Disks, Document Viewer, Feeds, Files, Firefox ESR, Flash BM818, Geary." class="img/img-responsive" width="300" />
<br /></p>
<h1 id="4g-calling">4G calling</h1>
<p>When I received the phone, calling didn’t work. I thought calling was completely broken but after traveling a bit I found it did work using 2G in some locations.  After some reading I assumed VoLTE or 4G calling just didn’t work yet.  That assumption was incorrect. I finally, today, created a support ticket with Purism and received a quick reply with instructions to update the modem.  It worked. Now I can make 4G calls.<br />
<br />
If you have a similar issue I suggest you email support@puri.sm, as I did.<br />
Subject line should be something like: [Purism_12345678] VoLTE issues (replace the number with your order number)
The email should include what version your modem is currently running and a description of the issue. I found my firmware by installing bm818-tools and running ‘BM818 VoLTE’.  This tool is designed to enable VoLTE but also reported the firmware. Funny thing is now the firmware is updated this tool is no longer reporting it.  But it did originally work and here is my screen.</p>

<p><img src="/img/linphones/librem5_fw.png" alt="X-Session" title="Cut photo from another phone. It shows just the top portion of the phone and inculdes the sig strength, 4G, Wifi symbol, Bluetooth symbol, 14:08, batttery at 95%. The ap says VoLTE configuration in the title bar. Volte is enabled with a check mark in a box confirming this. It says Modem is running firmware M100E_YCSN0_1.0.0_21830 YCSN0_M100E_1ACD_B325_V1.0.0.1_20210907 M100E_1.0.4_200715" class="img/img-responsive" width="300" />
<br />
I wanted to share the instructions and firmware files but am afraid it could lead to me assisting people in bricking their devices. The instructions and firmware files are likely dependent on what modem and region you are in. So I’ll just stick with contact support.
<br /></p>
<h1 id="encrypted-messaging-with-matrix-protocol">Encrypted Messaging with Matrix protocol</h1>
<p><strong>Short version:</strong> Matrix.org account, Nheko client, custom notification script because I didn’t get audio notifications when on the lock screen, NO automatic suspend.  I may just be overcomplicating this. If you find that to be the case, please report what setting or option I overlooked.<br />
<br />
<strong>Long version:</strong>  I understand Chatty, the default texting ap, can handle the matrix protocol but I don’t think its ready for the masses yet. I had lots of trouble including crashes and not able to read encrypted messages.  I tried several other matrix clients and found Nheko works, fits the screen, and seems like a nice program.<br />
<br />
In Nheko notifications work fine as long as:<br />
–Your device isn’t suspended. Only texts and calls wake up the device, not messages through Nheko.<br />
–The incoming message isn’t coming in to a currently open chat window. This kinda makes sense. It sees the chat as active, having focus, it doesn’t need to notify you.  This is very easy to work around. Hit the arrow to return to the all chats view.<br />
–You are not on the lock screen.  If you are, for some reason, I get a visual indication but no audio notification. The LED turns blue but I hear no sound. I don’t know why. I found a work around but it wasn’t a simple thing. I really hope its just me over complicating something there was a setting for.<br />
The script I used:</p>

<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#!/bin/bash</span>
<span class="nv">linesInFile</span><span class="o">=</span><span class="s2">"0"</span>
<span class="c">#close dbus-monitor if its open. Close any running copies of this script if open.</span>
killall dbus-monitor
killall myscript.sh
<span class="c">#start a dbus monitor process and output to a file</span>
dbus-monitor <span class="nt">--profile</span> <span class="s2">"sender='im.nheko.Nheko',interface='org.freedesktop.Notifications'"</span> <span class="o">&gt;</span> /tmp/dbusmon.txt &amp;
<span class="k">while </span><span class="nb">true</span><span class="p">;</span> <span class="k">do
        </span><span class="nv">linesInFileNow</span><span class="o">=</span><span class="si">$(</span><span class="nb">wc</span> <span class="nt">-l</span> /tmp/dbusmon.txt | <span class="nb">cut</span> <span class="nt">-f1</span> <span class="nt">-d</span> <span class="s1">' '</span><span class="si">)</span>
        <span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$linesInFileNow</span><span class="s2">"</span> <span class="nt">-gt</span> <span class="s2">"</span><span class="nv">$linesInFile</span><span class="s2">"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then
                </span><span class="nv">linesInFile</span><span class="o">=</span><span class="nv">$linesInFileNow</span><span class="p">;</span>
                aplay <span class="nt">-q</span> /usr/share/sounds/purple/receive.wav
        <span class="k">fi
        </span><span class="nb">sleep </span>1
<span class="k">done</span></code></pre></figure>

<p>This script needs to be started after any reboot to work.
I start it with ‘./myscript.sh &amp;’ so it runs in the background. When I close the terminal window it gives a warning but I ignore it and my notifications still work. <br />
Not sure it was needed but I enabled an option in Nheko about exposing room information to dbus.</p>

<h1 id="battery">Battery</h1>
<p>I need to do more testing but I feel pretty safe saying you can manage about 6 hours when not allowing the phone to suspend. You can let it suspend and you will likely get a lot more but you will only received texts and phone calls. Other chat applications will only function when the phone isn’t suspended.  Plug in when  you can and have a portable supply as needed for longer outings without power available.<br />
I purchased one of these:
<a href="https://shop.puri.sm/shop/power-bank/">Link</a></p>

<p>Keep in mind if you have a resource hogging application, its using more power. Perhaps close it. I was keeping a browser tab to Microsoft online open for work and recently discovered it was using a lot of power. I used htop at the command line and did some testing to confirm this.</p>

<h1 id="suspend">Suspend</h1>
<p>Using suspend only allows you to receive phone calls and text messages. Other applications stop working while suspended.  Also when resuming from suspend I find my cell modem isn’t always working as apparent by there being no cell signal strength or 4G indicators. I fix this by cycling the modem hardware kill switch on and off. For now I am not letting the phone suspend.</p>

<h1 id="hardware-kill-switches">Hardware Kill Switches</h1>
<p>These, in my opinion, are awesome. I can save power, reset hardware devices, be more private all with the flick of a switch. I tend to turn off WiFi when traveling. Camera and mic when at home and not using them. One time removing the phone from a pouch, I turned off something by accident. I noticed right away and turned it back on. Other then the single accidental switch toggle, I have had no issues.</p>

<h1 id="animatch">Animatch</h1>
<p>Don’t start using this application.  It is addictive and bad for productivity. :)</p>

<h1 id="purism">Purism</h1>
<p>What is going on with Purism? My guess is they have good intentions and ambitious goals and are struggling to keep up. It was pretty frustrating to wait almost 4 years for my Librem 5 phone and easy to feel angry. Its also easy for me to want them to succeed in their goals. I am tired of being the product and want other options. Purism is trying to provide other options.</p>

<p>Now I have my device I am working with them. Here are thoughts on my experiences.</p>

<p>Email support has been great. Pretty sure every Email I have sent, both while waiting for my phone, and since, has received a reply within 24 hours. The replies have been direct and helpful. The only negative has been the replies to ‘when will I get my phone?’ were not accurate. Not sure how much of that was unforeseen circumstances.</p>

<p>I have interacted with them via their matrix channel, again very responsive, direct, helpful.</p>

<p>I have attempted to use the Librem.one services. So far I have used chat(Matrix), social(Mastodon), and email.</p>

<p>–Email works fine, no issues.<br />
–Social works but appears to have no local timeline. I suspect they were getting a lot of hate posts from people tired of waiting for their Librem 5 phones and had to do away with the local timeline. People can be mean, and really mean when waiting 4 years for their Librem 5.<br />
–Chat (Matrix) is outdated and won’t even work with many clients. I have seen this discussed very recently. Seems the DB migration hangs for days with no completion in site. They discuss hiring a professional DBA to fix this for them.  I hope they do as I would like to use this service. I am using matrix.org but think it too big. I would prefer to use Purism’s server or another small server.</p>

<h1 id="closing-thoughts">Closing thoughts</h1>
<p>I plan to continue to support them through their products and services and hope for the best. I think they have lofty goals, good contributions to open source, and I hope they succeed. I’ll just hold off on any pre-orders they offer. :)</p>]]></content><author><name></name></author><category term="computers" /><category term="mini" /><summary type="html"><![CDATA[I have been experimenting with my Librem5 for about a month now. Here are some findings. This is a follow up to my previous post here: Link Topics I mention: 4G calling, Encrypted Messaging, Battery, Suspend, Animatch, Purism Quick summary: Not my every day phone yet but I’m making real progress. My previous issue with 4G calling is resolved. I managed to get encrypted messaging using the matrix protocol working using the Nheko client. Battery life remains an issue but is manageable. There is still work to be done with energy savings, camera, suspend, etc. Its important to remember that this is running a desktop computer operating system. Software is being developed, or modified, to be usable on a Linux based phone. While it will run many desktop applications they often don’t fit on the screen, have poor touch interfaces, or just use to much power. 4G calling When I received the phone, calling didn’t work. I thought calling was completely broken but after traveling a bit I found it did work using 2G in some locations. After some reading I assumed VoLTE or 4G calling just didn’t work yet. That assumption was incorrect. I finally, today, created a support ticket with Purism and received a quick reply with instructions to update the modem. It worked. Now I can make 4G calls. If you have a similar issue I suggest you email support@puri.sm, as I did. Subject line should be something like: [Purism_12345678] VoLTE issues (replace the number with your order number) The email should include what version your modem is currently running and a description of the issue. I found my firmware by installing bm818-tools and running ‘BM818 VoLTE’. This tool is designed to enable VoLTE but also reported the firmware. Funny thing is now the firmware is updated this tool is no longer reporting it. But it did originally work and here is my screen.]]></summary></entry></feed>