Wednesday, April 09, 2025

MicroPython OSError error numbers on RP-2040

I've seen an OSError stack trace when trying to talk to an I2C device on the wrong address and wondered what EIO means. It would be nice to have a list of all the error codes and what they mean.

From what I've read, error numbers are different for each hardware port of MicroPython. I'm using a Raspberry PI PICO and can get a list like this:

MicroPython v1.24.1 on 2024-11-29; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> import errno
>>> print(errno.errorcode)
{1: 'EPERM', 2: 'ENOENT', 5: 'EIO', 9: 'EBADF', 11: 'EAGAIN', 12: 'ENOMEM', 13: 'EACCES', 17: 'EEXIST', 19: 'ENODEV', 21: 'EISDIR', 22: 'EINVAL', 95: 'EOPNOTSUPP', 98: 'EADDRINUSE', 103: 'ECONNABORTED', 104: 'ECONNRESET', 105: 'ENOBUFS', 107: 'ENOTCONN', 110: 'ETIMEDOUT', 111: 'ECONNREFUSED', 113: 'EHOSTUNREACH', 114: 'EALREADY', 115: 'EINPROGRESS’}

But it doesn’t really tell much. They all start with ‘E' and so 'EIO' just means IO error, which makes sense.

In face they're all more readable if you know to drop the E.

{1: 'PERM', 
2: 'NOENT', 
5: 'IO', 
9: 'BADF', 
11: 'AGAIN', 
12: 'NOMEM', 
13: 'ACCES', 
17: 'EXIST', 
19: 'NODEV', 
21: 'ISDIR', 
22: 'INVAL', 
95: 'OPNOTSUPP', 
98: 'ADDRINUSE', 
103: 'CONNABORTED', 
104: 'CONNRESET', 
105: 'NOBUFS', 
107: 'NOTCONN', 
110: 'TIMEDOUT', 
111: 'CONNREFUSED', 
113: 'HOSTUNREACH', 
114: 'ALREADY', 
115: 'INPROGRESS’}


Technology talk on ABC Radio

Cyber criminals were able to breach a number of super funds, stealing hundreds of thousands of dollars from members.

The breach was unsophisticated, and likely came about because some super funds had not implemented basic security protocols on members' accounts

Peter Marks, a software developer and technology commentator from Access Informatics, joined Philip Clark on Nightlife to discuss the latest news in technology. https://www.abc.net.au/listen/programs/nightlife/nightlife-tech-talk-with-peter-marks/105152996


Sunday, April 06, 2025

How DRM is shaping the future of digital radio

An interesting discussion of Digital Radio Mondiale. Some comments about how the west has retreated from Shortwave broadcasting are particularly pertinent at the moment.


The good news, to me, is that there are modules coming that will make it easy to make consumer receivers with DRM reception.


Thanks to the good folks at World Radio TV Handbook.