Update September, 2024. Activities and notes while developing the I2S interface for my radio node.
I2S interface for Raspberry Pi (1)
Today I managed to connect the Digilent Pmod I2S2 to a Raspberry Pi 4 and have all frequencies generated. This is part of an older project that I left abandoned for a while: a radio node built on Raspberry Pi and using Svxlink. As known, Raspberry boards do not have a proper audio interface and […]
How to embed script in wordpress footer
Another “tip of the day”. I ran into this while testing some carousels and swiping banners. All needed the associated js scripts to be loaded lastly after the main page/ post content was already available. It seems that using wp_enqueue_script last argument as true will do the trick: Hope you will find this useful. Cheers […]
Why CSS margins collapse
While working on my new theme for this site I ran into a problem: CSS collapsing margins. Well, from the beginning let me be very clear: this will not be a comprehensive article on this subject. There is already one written by Josh Comeau and is excellent: “The Rules of Margin Collapse“. I urge you […]
Genetic algorithm mutation coded in Python
This example is adapted from Clinton Sheppard’s excellent book “Genetic Algorithms with Python“, a book that I encourage you to buy and read. The very simple example shows how easy is to design in Python a simple mutation algorithm that merges to the optimal solution in 24 iterations. The example below uses romanian language accents […]
KiCAD, Python and PyCharm
I am not a huge fan of KiCad. However, given the limited and abysmal options that we have for free EDA packages, KiCad is quite ok, although terribly flawed in some areas. Maybe the development team should focus on some simple functionalities like support for rounded traces, net group routing, zones, a simple way to […]
Quartus files
One of the biggest issues that I have, in general, while learning different stuff is lack of properly-explained abbreviations. I am starting today a compilation of Altera/ Intel Quartus list of filenames and abbreviations. Source: Intel/ Altera Glossary .qws – Quartus Workspace File. The Quartus® Workspace File (.qws) is a non-editable file that stores user […]
How to install Python 3.7 on Raspberry Pi
This short guide explains how to install Python version 3.7.0 on a Raspberry Pi running Raspbian. First, get rid of old versions: Ensure system is up to date: Install the dependencies needed for building the distribution: build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev Get the python src distribution: […]
Error opening serial port
Encouraged by the latest developments, today I started building a new application that will allow remote connection to Kenwood TH-D74, remote control and APRS data transfer. However, while building and running the app I got the following error: If you encounter this, be aware that it is generated by application sandboxing. You can think of using […]
TH-D74 BLE or “Bluetooth Low Energy”
Struggling to understand how Universal Unique IDs work (see here) I was wrongly assuming that Core Bluetooth is a framework from Apple that covers all aspects of communication with devices via BT. I was WRONG ! scanForPeripheralsWithServices method and, in general, what I tried to do, for almost a week, is NOT good for my intended […]
Using UUIDs and Bluetooth
I did some more steps towards accessing Kenwood TH-D74’s services via bluetooth. I struggled for some time understanding how discovery based on UUIDs work. I was not aware that, for each service profile, there is a standard Universally Unique Identifier (UUID) documented in Bluetooth SIG specs. Specifically for Serial Port Profile (SPP) service, the UUID […]
Why unsupported central manager state ?
Several days ago I received a Kenwood TH D74 portable transceiver. Although I have a Yaesu FT60 and some other smaller and unimportant transceivers, I don’t have any transceiver that is APRS capable. What’s more important, this transceiver is BT and USB capable, providing serial communication, which opens some interesting opportunities. Today I opened XCode […]
Abandoned Posts
Over the past seven years (the age of this blog) I started writing several articles that I never finished. It’s time to trash them completely or just add them to a list for future afterthoughts. Who knows ? So, from older to newer: “Weller WD 1000 M Review – Part III – Software”, January 18, 2013 — […]
Things to do, drafts and timeline
Today, while I went over all my posts, I noticed that I have a large list of 43 draft posts. These are articles that I started writing, thought to be interesting, but I had limited bandwidth to finish. I need some planning with these, thus I put them down, maybe getting some input from you […]
More about zombies and XCode
Some time ago I did a very short introduction about enabling zombies when debugging in XCode. As a refresher, zombies is a Cocoa feature that turns any object going to be deallocated into a NSZombie instance. This will not prevent your application from crashing, but instead of getting a stack dump from Xcode that is a […]
Some thoughts on the Responder Chain
I had a lot to do these days and did not manage to keep up with the blog. Very busy time at the office before Christmas. Luckily, I’ll get my vacation soon by I swear I will not spend it on much anything else than reading paper books. And books which are not about programming, […]
XCode 5 LLDB Debug Assertions
One situation when a debugger might not be the first option is when you are not sure where does a program has a bug. One way you can check whether your assumptions are truly what is happening in your code is by using assertions. What assertions let you do is express one particular assumption and […]
SCPI on Mac
Some more days passed and some more finishing touches added to my MacSCPI app. It is entirely dependent on hooking the device via the USBTMC driver, but it works fine and is stable: I had some problems with buffer padding and the output it is still not 100% gibberish–free , but I assume I have to play with […]
USBTMC driver for Mac
After some head banging, I finally managed to send SCPI commands from my Mac to my Agilent (Keysight) DSOX2002A. I’ve worked on this since december last year. Almost a year, but I did not spent a sustained amount of effort. I did it just during my free time. I still have a day job that […]
XCode 6 — new debugging features
As one of the goodies launched during current WWDC 2013, Apple has released a developer preview of Xcode 5 and detailed some of the new features it offers such as Automatic Configuration, Test Navigator, Bots, Auto Layout, Asset Management, Debug Gauges, Source Control, and more. Looking over some of the videos of the WWDC Sessions Videos, […]
Writing serial drivers for OS X (1)
At least one thing can be improved on Mac Dev Center: the code sample repository. I am not talking about documentation. In this particular case, there’s not much new to write about. The I/O Kit documentation (grab the pdf while it is stil there) is sufficient. On the shelves are tons on books about C and […]
C#, SCPI and Keysight (Agilent) DSO-X 2002A
This post is a relic. The initial draft dates back in January 19, 2013. And was left as draft ever since. Past couple of days I was busy — among other things — learning a new programming language, C#. 🙂 Ok, here’s the deal: my scope (KeysightAgilent DSO-X 2002A) is SCPI–compliant device. If you remember, the reason behind […]
__attribute__((packed))
The __attribute__ keyword in GCC allows you to specify special attributes on variables, functions, and types — including struct and union definitions. It is a non-standard compiler extension that gives you fine-grained control over how the compiler handles memory layout, alignment, calling conventions, and more. This article focuses on one of its most commonly encountered […]
Simple stuff: viewDidLoad vs. viewWillAppear
I was coding today for a small project I have. A very simple iOS application that has a very simple storyboard, two different paradigms for iPhone and iPad, but very, very simple. While coding I was struck by the fact — frequently forgotten — that we tend to ignore the obvious. Ok, here’s the deal: take one […]
“Auto Layout on iOS Versions prior to 6.0”
A short reminder, because I ran into this today and Xcode’s very poor at providing you useful verbosity when debugging Auto-Layout stuff done in Interface Builder. Sometimes (Xcode 4.x and 5.x) you might get the following errors when building an iOS project: Going to each error does not help much. Debugging IB auto-layout errors is […]
IOUserClient and IOExternalMethod
While developing the OS X driver for my Agilent DSO-X 2002A oscilloscope, I ran into a topic that I found to be poorly documented. It is about interaction with a device driver. There are several ways to communicate with a device driver from client space (the application). One is by modifying driver properties. This method requires […]
Agilent DSO-X 2002A driver for Mac OS X
December again, another year passed. Traditionally, this is a month when I am taking a long break. But I was up to something in the past days and I wanted to share. I have created a driver for my KeysightAgilent DSO-X 2002A oscilloscope. Maybe not a big deal, but huge for me because this is […]
Writing a (working) USB driver for OS X
For some time I was struggling with an ambitious project, to write a Mac driver for my Agilent DSO-X 2002A oscilloscope (see here). The reason behind this is SCPI and the opportunity to reach fresh perspectives in computer–measurement instruments’ integration. However, it was not an easy way. More of a reverse–engineering project, was very time–consuming […]
Missing WordPress Link Manager
WordPress users that updated the blog platform to version 3.5 might have observed that the link manager is missing from the admin pages: It seems that WordPress announced this as one of the major core changes when they released version 3.5: One other major change is the Link Manager. If you’re using it, you’ll want […]
Changing FTDI descriptors
I was struggling for some time to make my Mac communicate by USB with Arduino. It is part of a larger project of an USB-controlled Lab PSU that I am currently in prototype stage. Part of these problems solved when I finally realized that you cannot use an Arduino as an USB controller simply because […]