<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Python on Marcello Barnaba</title>
    <link>https://sindro.me/tags/python/</link>
    <description>Recent content in Python on Marcello Barnaba</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 28 Apr 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://sindro.me/tags/python/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Eisenberg: Arlo cameras on Home Assistant, the easy way</title>
      <link>https://sindro.me/posts/2026-04-28-eisenberg-arlo-on-home-assistant/</link>
      <pubDate>Tue, 28 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://sindro.me/posts/2026-04-28-eisenberg-arlo-on-home-assistant/</guid>
      <description>&lt;p&gt;Setting up an Arlo camera on Home Assistant should look like this:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You install the integration from HACS.&lt;/li&gt;&#xA;&lt;li&gt;You type your Arlo email and password.&lt;/li&gt;&#xA;&lt;li&gt;Your phone buzzes. You tap &lt;strong&gt;Approve&lt;/strong&gt; in the Arlo app.&lt;/li&gt;&#xA;&lt;li&gt;You click &lt;strong&gt;Submit&lt;/strong&gt; in Home Assistant.&lt;/li&gt;&#xA;&lt;li&gt;You&amp;rsquo;re in.&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
    <item>
      <title>decaf: Italian Modello Redditi PF on foreign investments (without a commercialista)</title>
      <link>https://sindro.me/posts/2026-04-18-decaf-dichiarazione-redditi-investimenti-esteri/</link>
      <pubDate>Sat, 18 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://sindro.me/posts/2026-04-18-decaf-dichiarazione-redditi-investimenti-esteri/</guid>
      <description>&lt;p&gt;If you hold foreign investments as an Italian tax resident, you know the drill. Every spring you bundle a stack of PDFs and broker exports, send them to your &lt;a href=&#34;https://it.wikipedia.org/wiki/Commercialista&#34; target=&#34;_blank&#34;&gt;commercialista&lt;/a&gt;, and a few weeks later you get back a PDF that costs between three hundred and eight hundred euros and which you have no way of verifying because you don&amp;rsquo;t speak &lt;a href=&#34;https://www.normattiva.it/uri-res/N2Ls?urn:nir:presidente.repubblica:decreto:1986-12-22;917&#34; target=&#34;_blank&#34;&gt;TUIR&lt;/a&gt; fluently.&lt;/p&gt;&#xA;&lt;p&gt;A project like decaf, until recently, wouldn&amp;rsquo;t have been an evenings-and-weekends project: reading the TUIR, Agenzia delle Entrate circolari, and interpello responses isn&amp;rsquo;t my job, and doing it with enough precision to bet a tax filing on it takes months. With an &lt;a href=&#34;https://www.anthropic.com/claude/opus&#34; target=&#34;_blank&#34;&gt;Artificial Intelligence&lt;/a&gt; that chews through the legislation alongside me and keeps me honest, it became feasible. The result is &lt;a href=&#34;https://pypi.org/project/decaf-tax/&#34; target=&#34;_blank&#34;&gt;&lt;code&gt;decaf-tax&lt;/code&gt;&lt;/a&gt; on PyPI and &lt;a href=&#34;https://github.com/vjt/decaf&#34; target=&#34;_blank&#34;&gt;github.com/vjt/decaf&lt;/a&gt; on GitHub, MIT-licensed. With a test suite built specifically to keep me from fudging numbers: synthetic cases with their expected outputs stored next to them, plus three years of my own real filing — the one validated by the commercialista — used as an ongoing reference. I&amp;rsquo;ll unroll the technical details below.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How I replaced the Verisure app with Home Assistant</title>
      <link>https://sindro.me/posts/2026-04-04-verisure-italy-home-assistant/</link>
      <pubDate>Sat, 04 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://sindro.me/posts/2026-04-04-verisure-italy-home-assistant/</guid>
      <description>&lt;p&gt;The Verisure app is garbage. There, I said it.&lt;/p&gt;&#xA;&lt;p&gt;The alarm itself is fine — the SDVECU panel is solid, the sensors are reliable, the installation is professional. The app is the problem.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-problem&#34; id=&#34;the-problem&#34;&gt;The problem&lt;a class=&#34;heading-anchor&#34; href=&#34;#the-problem&#34; aria-label=&#34;Link to this section&#34;&gt;¶&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;You open the app to check your alarm status and you&amp;rsquo;re greeted by &lt;strong&gt;an ad for Verisure itself&lt;/strong&gt;. I pay through the nose for the service and they shove ads &lt;em&gt;inside&lt;/em&gt; the app. It&amp;rsquo;s 2026 and a security company is showing me banner ads when I&amp;rsquo;m trying to verify that my house is protected.&lt;/p&gt;&#xA;&lt;p&gt;The ads are the least of it:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Blind routines.&lt;/strong&gt; Arm at midnight, disarm at 7. The app has no idea where you are. Still in the garden at midnight? The alarm arms and the sensors trip. Window open? The panel announces it can&amp;rsquo;t arm — if you don&amp;rsquo;t hear it, the alarm stays disarmed. Forget to disable the morning disarm before going on vacation? Alarm off, empty house. And routine changes take &lt;em&gt;20 minutes to propagate&lt;/em&gt; — &amp;ldquo;or the next day&amp;rdquo;. In 2026.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Zero presence awareness.&lt;/strong&gt; No location, no who&amp;rsquo;s home, no cleaning-lady-just-left. No location-based automation at all.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;One camera at a time.&lt;/strong&gt; Tap, wait, back, tap the next one, wait. No overview, no &amp;ldquo;capture all&amp;rdquo;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Slow.&lt;/strong&gt; Request an image, wait, wait, maybe it arrives. Sometimes you reload and try again.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;No permanent storage.&lt;/strong&gt; Captured images vanish. No history.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;No timestamps on images.&lt;/strong&gt; You capture a photo and you don&amp;rsquo;t know &lt;em&gt;when&lt;/em&gt; or &lt;em&gt;which camera&lt;/em&gt;. You have to remember. For a security system, embarrassing.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Generic notifications.&lt;/strong&gt; One notification, same for everyone. No actionable buttons, no critical alerts that bypass Do Not Disturb.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What I wanted: my alarm in my smart home, real automations, notifications for all residents, and a dashboard that shows &lt;em&gt;everything&lt;/em&gt; at a glance. No ads.&lt;/p&gt;</description>
    </item>
    <item>
      <title>wifi-dethrash: Finding and Fixing WiFi Mesh Thrashing on OpenWrt</title>
      <link>https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/</link>
      <pubDate>Fri, 03 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/cover.jpg&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34; class=&#34;img-zoom&#34;&gt;&#xA;&lt;picture&gt;&#xA;  &lt;source type=&#34;image/webp&#34;&#xA;    srcset=&#34;https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/cover_hu_71e977e535d45740.webp 768w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/cover_hu_3ea190b612b82560.webp 1024w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/cover_hu_b19accd1e569a755.webp 1536w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/cover_hu_d5c073ee329dab9e.webp 1920w&#34;&#xA;    sizes=&#34;(max-width: 599px) calc(100vw - 2rem), (max-width: 1199px) calc(100vw - 3rem), 47rem&#34;&gt;&#xA;  &lt;img src=&#34;https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/cover_hu_46539597fa321407.jpg&#34;&#xA;    srcset=&#34;https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/cover_hu_46539597fa321407.jpg 768w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/cover_hu_15613a470be424b6.jpg 1024w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/cover_hu_fe56e60b16add33c.jpg 1536w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/cover.jpg 1920w&#34;&#xA;    sizes=&#34;(max-width: 599px) calc(100vw - 2rem), (max-width: 1199px) calc(100vw - 3rem), 47rem&#34;&#xA;    width=&#34;768&#34; height=&#34;429&#34;&#xA;    alt=&#34;A house cross-section with WiFi access points on each floor, signal waves overlapping, and a phone bouncing chaotically between them&#34; fetchpriority=&#34;high&#34;&gt;&#xA;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It started with &lt;a href=&#34;https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/&#34;&gt;WiFi presence detection&lt;/a&gt;. I had built a system that tracks which room everyone is in by scraping RSSI from my OpenWrt APs. It worked — but the room assignments kept flickering. Kitchen. Office. Kitchen. Office. Three times in ten seconds. The state machine was fine. The WiFi wasn&amp;rsquo;t.&lt;/p&gt;&#xA;&lt;p&gt;My home network runs six OpenWrt APs across three floors, two SSIDs — Mercury on 5 GHz, Saturn on 2.4 GHz — all backed by 802.11r for fast roaming. From the outside, it looks like a proper mesh. From the inside, one phone was bouncing between access points &lt;strong&gt;129 times in 24 hours&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I didn&amp;rsquo;t know this until I built the tool to see it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/roaming-timeline-24h.png&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34; class=&#34;img-zoom&#34;&gt;&#xA;&lt;picture&gt;&#xA;  &lt;source type=&#34;image/webp&#34;&#xA;    srcset=&#34;https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/roaming-timeline-24h_hu_8a7616837623eb87.webp 768w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/roaming-timeline-24h_hu_3162d8aed8332944.webp 1024w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/roaming-timeline-24h_hu_d36cc6e3ee2c557a.webp 1536w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/roaming-timeline-24h_hu_495c572b189a0b88.webp 2968w&#34;&#xA;    sizes=&#34;(max-width: 599px) calc(100vw - 2rem), (max-width: 1199px) calc(100vw - 3rem), 47rem&#34;&gt;&#xA;  &lt;img src=&#34;https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/roaming-timeline-24h_hu_3134a72444ceeb91.png&#34;&#xA;    srcset=&#34;https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/roaming-timeline-24h_hu_3134a72444ceeb91.png 768w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/roaming-timeline-24h_hu_9435ab2e0b0ab712.png 1024w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/roaming-timeline-24h_hu_7c31c7e1922c594a.png 1536w, https://sindro.me/posts/2026-04-03-wifi-dethrash-openwrt-mesh-analyzer/roaming-timeline-24h.png 2968w&#34;&#xA;    sizes=&#34;(max-width: 599px) calc(100vw - 2rem), (max-width: 1199px) calc(100vw - 3rem), 47rem&#34;&#xA;    width=&#34;768&#34; height=&#34;203&#34;&#xA;    alt=&#34;Roaming Timeline — 24 hours&#34; fetchpriority=&#34;high&#34;&gt;&#xA;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Each row is a WiFi client, the color shows which AP it&amp;rsquo;s connected to. Healthy clients show long solid bars. Sick ones look like barber poles. See &lt;code&gt;sara-iphone&lt;/code&gt;? That rainbow stripe is 129 connects in 24 hours — the phone is walking through an overlap zone between two APs where both have roughly equal (and terrible) signal.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Building OpenWrt packages with throwaway cloud VMs and a Telegram bot</title>
      <link>https://sindro.me/posts/2026-03-28-openwrt-builder/</link>
      <pubDate>Sat, 28 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://sindro.me/posts/2026-03-28-openwrt-builder/</guid>
      <description>&lt;p&gt;I maintain a bunch of custom OpenWrt packages across four architectures: MediaTek Filogic (aarch64) — including &lt;a href=&#34;https://sindro.me/posts/2026-04-30-glinet-gl-x3000-vanilla-openwrt-25-12/&#34;&gt;the GL-X3000 running my own vanilla OpenWrt 25.12 build&lt;/a&gt;, Raspberry Pi 2 (ARM), Ramips MT7621 (MIPS), and Atheros ath79 (MIPS). The OpenWrt SDK only runs on x86_64. I don&amp;rsquo;t have a dedicated build server. I don&amp;rsquo;t want one either — a box sitting idle 99.9% of the time just to compile &lt;code&gt;.ipk&lt;/code&gt; files every few days is offensive to my sense of resource allocation.&lt;/p&gt;&#xA;&lt;p&gt;So I built &lt;a href=&#34;https://github.com/vjt/openwrt-builder&#34; target=&#34;_blank&#34;&gt;openwrt-builder&lt;/a&gt;: a system that polls my repos for changes, spins up a throwaway Hetzner cloud VM when it needs to compile, builds the packages, ships them back, and destroys the server. All controlled via Telegram.&lt;/p&gt;</description>
    </item>
    <item>
      <title>WiFi Presence Detection for Home Assistant Using OpenWrt</title>
      <link>https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/</link>
      <pubDate>Sun, 15 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/cover.jpg&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34; class=&#34;img-zoom&#34;&gt;&#xA;&lt;picture&gt;&#xA;  &lt;source type=&#34;image/webp&#34;&#xA;    srcset=&#34;https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/cover_hu_58496ed09bdf5c2b.webp 768w, https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/cover_hu_b6529b4705f30a03.webp 1024w, https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/cover_hu_f6473f22713c5f7b.webp 1536w, https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/cover_hu_84f61faaf05610fb.webp 1920w&#34;&#xA;    sizes=&#34;(max-width: 599px) calc(100vw - 2rem), (max-width: 1199px) calc(100vw - 3rem), 47rem&#34;&gt;&#xA;  &lt;img src=&#34;https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/cover_hu_a8a55fb2d22ac01f.jpg&#34;&#xA;    srcset=&#34;https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/cover_hu_a8a55fb2d22ac01f.jpg 768w, https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/cover_hu_32f76d5e8a700548.jpg 1024w, https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/cover_hu_d09c55904b4fcd44.jpg 1536w, https://sindro.me/posts/2026-02-15-wifi-presence-detection-home-assistant/cover.jpg 1920w&#34;&#xA;    sizes=&#34;(max-width: 599px) calc(100vw - 2rem), (max-width: 1199px) calc(100vw - 3rem), 47rem&#34;&#xA;    width=&#34;768&#34; height=&#34;429&#34;&#xA;    alt=&#34;Cozy cutaway view of a multi-story home with WiFi access points in each room, phones tethered to the nearest AP by signal strength&#34; fetchpriority=&#34;high&#34;&gt;&#xA;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I had two problems with Home Assistant&amp;rsquo;s presence detection.&lt;/p&gt;&#xA;&lt;p&gt;The first: GPS tells you &lt;em&gt;if&lt;/em&gt; someone is home, but not &lt;em&gt;where&lt;/em&gt; in the house they are. My home has six OpenWrt access points spread across three floors. They already know exactly which phone is connected to which AP at every moment — that&amp;rsquo;s room-level presence data, sitting right there in the WiFi stack, screaming to be used. Knowing who&amp;rsquo;s in which room opens up a whole class of automations that GPS can&amp;rsquo;t touch: lights that follow you, climate control per occupied room, a dashboard that shows the household at a glance.&lt;/p&gt;&#xA;&lt;p&gt;The second: our housekeeper stays at our place a couple days a week. I don&amp;rsquo;t want to set up a full HA account for her, install the companion app on her phone, or deal with GPS permissions. But I &lt;em&gt;do&lt;/em&gt; need to know if she&amp;rsquo;s home — because my alarm automation needs to know whether the house is actually empty before arming. Her phone connects to WiFi. That&amp;rsquo;s all I need.&lt;/p&gt;&#xA;&lt;p&gt;So I wrote &lt;a href=&#34;https://github.com/vjt/openwrt-ha-presence&#34; target=&#34;_blank&#34;&gt;openwrt-ha-presence&lt;/a&gt;: a state machine that scrapes RSSI metrics directly from your OpenWrt APs, figures out which room each person is in by signal strength, and publishes per-person home/away state to Home Assistant via MQTT Discovery. No cloud, no beacons, no log parsing, no time-series database. Python, async, ~600 lines of actual logic.&lt;/p&gt;</description>
    </item>
    <item>
      <title>5G as Fiber Backup: Never Miss a Meeting Again</title>
      <link>https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/</link>
      <pubDate>Sat, 31 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/cover.jpg&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34; class=&#34;img-zoom&#34;&gt;&#xA;&lt;picture&gt;&#xA;  &lt;source type=&#34;image/webp&#34;&#xA;    srcset=&#34;https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/cover_hu_fa7ec25cf79390f5.webp 768w, https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/cover_hu_1fb5fd2ef271fada.webp 1024w, https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/cover_hu_b3ae3fafe8849cfc.webp 1536w, https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/cover_hu_6eccac981baf7946.webp 1920w&#34;&#xA;    sizes=&#34;(max-width: 599px) calc(100vw - 2rem), (max-width: 1199px) calc(100vw - 3rem), 47rem&#34;&gt;&#xA;  &lt;img src=&#34;https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/cover_hu_8769051cc56e0c6b.jpg&#34;&#xA;    srcset=&#34;https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/cover_hu_8769051cc56e0c6b.jpg 768w, https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/cover_hu_ae78d720790b882e.jpg 1024w, https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/cover_hu_c68ee268ea1f0966.jpg 1536w, https://sindro.me/posts/2026-01-31-quectel-5g-modem-tools-for-openwrt/cover.jpg 1920w&#34;&#xA;    sizes=&#34;(max-width: 599px) calc(100vw - 2rem), (max-width: 1199px) calc(100vw - 3rem), 47rem&#34;&#xA;    width=&#34;768&#34; height=&#34;429&#34;&#xA;    alt=&#34;Directional antenna on a wall aimed at a cell tower, fiber cable snapping on one side while 5G waves bridge the gap&#34; fetchpriority=&#34;high&#34;&gt;&#xA;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;A couple of months ago, my fiber went down. As per Murphy’s first corollary, it happened at the absolute worst moment: right before a crucial meeting with a partner company. I found myself frantically jamming between a distant neighbor’s AP and my phone’s hotspot, but both sucked hard. We’re talking 200ms RTT and 15% packet loss. I was apologizing profusely while my video feed turned into a 1998 slideshow; no one could parse a word I was saying. I ended up cutting the video and staying silent. Missed opportunity. &lt;strong&gt;Never. Again.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;So I went full paranoid and built a proper 5G backup setup.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-hardware&#34; id=&#34;the-hardware&#34;&gt;The Hardware&lt;a class=&#34;heading-anchor&#34; href=&#34;#the-hardware&#34; aria-label=&#34;Link to this section&#34;&gt;¶&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.gl-inet.com/products/gl-x3000/&#34; target=&#34;_blank&#34;&gt;GL.iNet X-3000&lt;/a&gt; with a Quectel RM520N-GL modem&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://poynting.tech/antennas/xpol-24/&#34; target=&#34;_blank&#34;&gt;Poynting XPOL-24&lt;/a&gt; directional antenna mounted on the wall outside my home office&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;5G signal here is non-existent, so I had to use heavy artillery. The Poynting is a beast. 11 dBi gain, real 4x4 MIMO, cross-polarized, weather-sealed. Point it at the nearest tower and suddenly your SINR jumps from &amp;ldquo;meh&amp;rdquo; to &amp;ldquo;holy shit.&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;But pointing a directional antenna without visual feedback is painful. You&amp;rsquo;re basically spinning in circles, refreshing a web UI, cursing at the sky.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Python2.4&#39;s urllib2 broken by default on Solaris Express 5.11</title>
      <link>https://sindro.me/posts/2008-01-25-python2-4-s-urllib2-broken-by-default-on-solaris-express-5-11/</link>
      <pubDate>Fri, 25 Jan 2008 00:00:00 +0000</pubDate>
      <guid>https://sindro.me/posts/2008-01-25-python2-4-s-urllib2-broken-by-default-on-solaris-express-5-11/</guid>
      <description>&lt;div class=&#34;retrospective&#34;&gt;&#xA;  &lt;span class=&#34;retrospective-icon&#34;&gt;&amp;#x1f50d;&lt;/span&gt;&#xA;  &lt;div class=&#34;retrospective-body&#34;&gt;&#xA;    &lt;em&gt;2026 retrospective&lt;/em&gt;&lt;br&gt;&#xA;    Sun was acquired by Oracle in 2010 and Solaris is effectively abandoned since Oracle gutted the team in 2017. Python 2.4 and &lt;code&gt;urllib2&lt;/code&gt; are long gone — &lt;code&gt;urllib2&lt;/code&gt; was merged into &lt;code&gt;urllib.request&lt;/code&gt; in Python 3.&#xA;  &lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;While happily installing prerequisites to build an app on &lt;a href=&#34;http://sun.com/software/solaris&#34; target=&#34;_blank&#34;&gt;Solaris&#xA;11&lt;/a&gt;, i enjoyed having&#xA;&lt;a href=&#34;http://selenic.com/mercurial&#34; target=&#34;_blank&#34;&gt;Mercurial&lt;/a&gt; already installed in the base&#xA;system.. except for a BIG issue: digest authentication was broken. I&#xA;&lt;code&gt;tcpdump&lt;/code&gt;’ed the traffic exchanged between the mercurial client and the CGI&#xA;server and I saw that no Authorization header was sent, and obviously the&#xA;server refused to serve the hg repository.&lt;/p&gt;&#xA;&lt;p&gt;Before reinstalling python, maybe from source and replacing the default&#xA;installation or having side by side two different versions, with consequent&#xA;nuisances and dirt around the system, I tried a very very small patch to&#xA;urllib2.py that… amusingly enough, fixed my problem:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;--- urllib2.py~ Fri Jan 25 02:35:59 2008&#xA;+++ urllib2.py  Fri Jan 25 03:27:52 2008&#xA;@@ -815,7 +815,7 @@&#xA;             auth_val = &amp;#39;Digest %s&amp;#39; % auth&#xA;             if req.headers.get(self.auth_header, None) == auth_val:&#xA;                 return None&#xA;-            req.add_unredirected_header(self.auth_header, auth_val)&#xA;+            req.add_header(self.auth_header, auth_val)&#xA;             resp = self.parent.open(req)&#xA;             return resp&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I’m no fscking python expert (but the language is interesting), so don’t ask me&#xA;WHY it works, i simply followed the &lt;code&gt;add_header&lt;/code&gt; comment that said “this method&#xA;is useful for adding authentication headers” and replaced the&#xA;&lt;code&gt;unredirected_header&lt;/code&gt; method with the former. I really don’t know why with&#xA;Python2.5’s urllib2 “everything works” even with that method, something must be&#xA;broken somewhere else. A diff between the two urllibs gave me nothing, I really&#xA;should learn Python one day or another.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to compile python2.5 on SCO_SV</title>
      <link>https://sindro.me/posts/2008-01-16-how-to-compile-python2-5-on-sco_sv/</link>
      <pubDate>Wed, 16 Jan 2008 00:00:00 +0000</pubDate>
      <guid>https://sindro.me/posts/2008-01-16-how-to-compile-python2-5-on-sco_sv/</guid>
      <description>&lt;div class=&#34;retrospective&#34;&gt;&#xA;  &lt;span class=&#34;retrospective-icon&#34;&gt;&amp;#x1f50d;&lt;/span&gt;&#xA;  &lt;div class=&#34;retrospective-body&#34;&gt;&#xA;    &lt;em&gt;2026 retrospective&lt;/em&gt;&lt;br&gt;&#xA;    Both Python 2.5 (EOL 2011) and SCO OpenServer are extinct. SCO/Xinuos went bankrupt, and Python 2 itself reached end-of-life in January 2020. This is a digital fossil.&#xA;  &lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You must have PTH installed, and maybe other libs.&lt;/li&gt;&#xA;&lt;li&gt;This was tested on &lt;code&gt;SCO_SV os507 3.2 5.0.7 i386&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If you have UDK, run:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ &lt;span class=&#34;nv&#34;&gt;CFLAGS&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;-I/usr/local/include -belf&amp;#39;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;LDFLAGS&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;-L/usr/local/lib&amp;#39;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  ./configure --with-threads --with-pth --disable-shared --disable-ipv6&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&#xA;&lt;li&gt;Add &lt;code&gt;/usr/local/include&lt;/code&gt; to &lt;code&gt;BASECFLAGS&lt;/code&gt; in &lt;code&gt;Makefile&lt;/code&gt; (autocrap sucks).&lt;/li&gt;&#xA;&lt;li&gt;Patch &lt;code&gt;Modules/ctypes/_ctypes_test.c&lt;/code&gt; by putting an &lt;code&gt;#ifdef HAVE_LONG_LONG&lt;/code&gt; around functions that use &lt;code&gt;PY_LONG_LONG&lt;/code&gt; (hints: lines &lt;code&gt;384&lt;/code&gt; and &lt;code&gt;318&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;Patch &lt;code&gt;Objects/longobject.c&lt;/code&gt; and on line &lt;code&gt;817&lt;/code&gt; put the &lt;code&gt;IS_LITTLE_ENDIAN&lt;/code&gt; macro before the &lt;code&gt;#ifdef HAVE_LONG_LONG&lt;/code&gt; block, and put &lt;code&gt;_PyLong_FromSsize_t&lt;/code&gt; and &lt;code&gt;_PyLong_FromSize_t&lt;/code&gt; after the &lt;code&gt;HAVE_LONG_LONG&lt;/code&gt; block.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If you have GCC, run:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$ &lt;span class=&#34;nv&#34;&gt;CFLAGS&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;-I/usr/local/include&amp;#39;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;LDFLAGS&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;-L/usr/local/lib&amp;#39;&lt;/span&gt;            &lt;span class=&#34;se&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  ./configure --with-threads --with-pth --disable-shared --disable-ipv6&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Either with UDK or GCC:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Edit &lt;code&gt;pyconfig.h&lt;/code&gt; and comment out the &lt;code&gt;socklen_t&lt;/code&gt; define&lt;/li&gt;&#xA;&lt;li&gt;Edit &lt;code&gt;Modules/socketmodule.c&lt;/code&gt; and on line 226 add &lt;code&gt;|| defined(SCO5)&lt;/code&gt; in order to define &lt;code&gt;INET_ADDRSTRLEN&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Run &lt;code&gt;make&lt;/code&gt; (or &lt;code&gt;gmake&lt;/code&gt; if you wish)&lt;/li&gt;&#xA;&lt;li&gt;You will be left without &lt;code&gt;_curses.so&lt;/code&gt;, &lt;code&gt;_curses_panel.so&lt;/code&gt;, &lt;code&gt;_locale.so&lt;/code&gt; and &lt;code&gt;readline.so&lt;/code&gt; if using GCC and also &lt;code&gt;pyexpat&lt;/code&gt;, &lt;code&gt;elementtree&lt;/code&gt; and &lt;code&gt;sha512&lt;/code&gt; if using UDK.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;      __   ____  __ __  ____     __&#xA;      \ \ / /  \/  |  \/  \ \   / /&#xA;       \ V /| |\/| | |\/| |\ \ / / &#xA;        | | | |  | | |  | | \ V /_ &#xA;        |_| |_|  |_|_|  |_|  \_/(_)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;vjt@os507 ~/Python-2.5.1-vjt&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; $ python&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Python 2.5.1 &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;r251:31337, Sep &lt;span class=&#34;m&#34;&gt;13&lt;/span&gt; 2007, 22:40:33&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;GCC 4.2.1&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; on sco_sv3&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Type &lt;span class=&#34;s2&#34;&gt;&amp;#34;help&amp;#34;&lt;/span&gt;, &lt;span class=&#34;s2&#34;&gt;&amp;#34;copyright&amp;#34;&lt;/span&gt;, &lt;span class=&#34;s2&#34;&gt;&amp;#34;credits&amp;#34;&lt;/span&gt; or &lt;span class=&#34;s2&#34;&gt;&amp;#34;license&amp;#34;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; more information.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&amp;gt;&amp;gt;&amp;gt; import socket&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&amp;gt;&amp;gt;&amp;gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;vjt@os507 ~&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; $ hg clone http://code.wuhrer.thc/hg/Antani&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;destination directory: Antani&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;http authorization required&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;!! YAY! :D&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
