C

Python: not enough values to unpack

While creating some code for the Arduino and C struct post, I ran into this issue “not enough values to unpack” and this has to do with Python’s struct format.

Arduino serial data transfer with C structs

While doing some tests with a 9-axis sensor I wnated to read all the values and send them all via an Arduino (or any other μ-controller) serial interface. You generate that data at point “A”, the sensor, and you want that data to arrive at point “B” with minimal delay, for example a computer software […]

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 — […]

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 […]

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 keyword __attribute__ allows you to specify special attributes of struct and union types when you define such types. This is mostly encountered when designing code with particular care on memory footprint optimisation. I have encountered this several times in some Apple headers while digging for documentation for my kext projects, and I thought it […]

Agilent DSOX 2002A

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 […]

Usage of void in C

Going into some USB programming for a project I am into (on my Mac), I ran into this and I thought would be nice and useful to elaborate a bit. This is about void* pointers and callbacks in C. USB device discovery and probing under IOKit makes heavy use of callbacks, I wanted to write […]