Posts

Installing a WWAN card on an old Thinkpad, will it enumerate?

Image
I realised an old Thinkpad T490s had a SIM card slot. As I opened the laptop, I saw there was an empty m.2 -like slot close to the SIM card holder. It appears to be an unpopulated slot for a WWAN card, i.e. an LTE mobile broadband modem. As I looked in to this, the key learnings were First make sure the laptop has the antennas installed. You can find tiny coaxial cables with connectors in protective covers and taped to the slot. Be sure to get a WWAN card that has Lenovo FRU -number on it. Remember to activate the card in setup menu Setup, Security, I/O Port access, Wireless WAN - needs to be ON Without this, the device will not enumerate in the OS Antennas are color coded. To figure out what goes where, see the markings on the modem. I chose Fibocom L830-EB  and paid 5€ for a tested working one.

Streaming video from Raspberry PI

  Just a note to future self on how to stream video from Raspi running  Debian GNU/Linux 13 stdbuf -o0 rpicam-vid -t 0   --inline   --width 1296 --height 972   --framerate 3   --codec h264 --bitrate 500000 --profile main   --nopreview -g 3   -o - | gst-launch-1.0 -v   fdsrc do-timestamp=true blocksize=$(( 1024 * 256 )) ! video/x-h264,stream-format=byte-stream,alignment=au !   h264parse config-interval=-1 ! rtph264pay pt=96 ! udpsink host=192.168.1.1 port=5000 sync=false And receive it on a Mac % cat rtp.sdp c=IN IP4 192.168.1.1 m=video 5000 RTP/AVP 96 a=rtpmap:96 H264/90000 ffplay -protocol_whitelist file,udp,rtp -i rtp.sdp

warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

When accessing a brand new Debian host over ssh from a MacOS desktop, I kept on getting warnings during login: last login: Thu Nov 27 20:55:03 2025 from 192.168.1.1 -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory Googling around for solution did not yield any working solution, so I'm making a note to myself for future:   sudo localedef -i en_US -f UTF-8 $LC_CTYPE

Troubleshooting MinIO policies

The python script I was working with was trying to store an object in a MinIO bucket.   minio_client.put_object(...) It all worked fine when using the minio root account. However, it started failing as soon as I began using a MinIO account only allowed to PUT objects into the bucket. S3 operation failed; code: AccessDenied, message: Access Denied. It worked fine from mc, the MinIO Client.  It worked fine if I manually modified the policy to allow all S3 actions.                 "Action": [                   "s3:*",                 ], It worked fine even after reverting back to the original policy of only PutObject. If I just had had the wildcard at some point after starting the script.                 "Action": [                   "s3:PutObject"       ...

Create a public/anonymous Windows network drive on TrueNAS-13.0-U3.1Core 2022

Image
Capturing my step-by-step notes here on how to set up a public SMB share on a network using TrueNAS. So that next time I don't need to fumble around. If this helps someone else, that's a bonus. Starting from a completely fresh installation on a system with three hard drives. In this virtualised trial run, I have 10GB drive for TrueNAS installation, 2 x 32GB drives for storage. Login as root Storage / Pools / Add Create Pool Name: my pool Suggest Layout Create Confirm, Create Pool Options / Add Dataset Name: pub Submit Sharing / Windows Shares (SMB) / Add Path: /mnt/mypool/pub Advanced Options Allow Guest Access Submit Enable Service Configure ACL / Configure Now Default ACL Options OPEN Continue User: nobody Group: nobody Apply User + Apply Group Save Open your network drive in Finder Check that you can create a folder. Enjoy.

Preparing a release configuration Yocto image (for Raspberry Pi)

In an attempt to build a small image for an application running on Yocto and Raspberry Pi I found the following things helpful:      IMAGE_LINGUAS = " " I don't need support for any additional languages.      IMAGE_FEATURES += "read-only-rootfs" For my application fixed content and therefore read-only rootfs are fine. I'd imagine this could help reduce the notorious sd-card failures as well. IMAGE_INSTALL += "\     packagegroup-core-boot \     kernel-module- xxx \     busybox-udhcpc \     ntpdate \     ncurses \     " For a networked application, I just need to be able to boot, get an IP address and time. Then use a specific kernel driver, no need to install them all. Surprisingly, mDNS avahi seems to be missing dependency declaration to ncurses.  IMAGE_ROOTFS_SIZE="0" IMAGE_OVERHEAD_FACTOR="1.15" IMAGE_ROOTFS_EXTRA_SPACE="1" Since the rootfs is read-only, it's there's little need for ...

OpenCV static library in Yocto

OpenCV is built either as a shared object or a static library, not both. Yocto recipe in the meta-oe builds the library as shared objects, which is a sensible default for sure. As a note to future self, one way to build a subset of OpenCV as a static library instead is to add the following in e.g. conf/local.conf PACKAGECONFIG:pn-opencv = " gstreamer" EXTRA_OECMAKE:append:pn-opencv = " \                                -DBUILD_SHARED_LIBS=OFF \                                -DENABLE_PIC=ON \                                -DWITH_PROTOBUF=OFF \                                -DBUILD_PROTOBUF=OFF \                      ...