Categories
Hardware Mobile

It’s the 14th anniversary of the original iPhone Stevenote!

On January 9, 2007, Steve Jobs said this near the beginning of the Stevenote where he introduced the original iPhone:

Three things: A widescreen iPod with touch controls, a revolutionary mobile phone, and a breakthrough internet communications device.

An iPod. A phone. And an internet communicator.

An iPod! A phone! Are you getting it?!

These are not three separate devices. This is one device…

Today is the 14th anniversary of that keynote. It caused Google to go back to the drawing board with Android. It led to the redefinition of the mobile phone and the downgrading or demise of the big hardware players of the day (BlackBerry, Motorola, Nokia, and Palm). It changed Microsoft’s trajectory, and brought about the end of Flash. It redefined the boundaries of personal computing and the web. For better and worse, it changed the way we communicate, navigate, “vegetate”, and relate.

Happy anniversary, iPhone!

Recommended reading

Categories
Hardware How To

What to do when the USB-C ethernet adapter for your Mac doesn’t work out of the box [UPDATED]

I recently got a Mokin 10-in-1 USB-C dongle for use with my work computer, a 2019 16″ MacBook Pro, whose only connectors are 4 Thunderbolt/USB-C ports and a 3.5 mm audio jack.

The dongle worked like a charm out of the box with the notable exception of one part: The Ethernet port. I had a pretty good guess why this was happening and how to fix it.

TL;DR: You need a driver — here it is!

Here’s the installer for version 1.0.22 of the macOS driver, which works for macOS 10.9 through 10.15. Unzip it, run it, and then go to the section titled Step 4 below.

The longer explanation

The problem and the plan

Most dongle vendors are integrators. They may manufacture the cases and simpler electronics, but they purchase lot (or all of) the fancier tech from manufacturers, such as networking chips.

Here’s a pic showing a Mokin dongle and its internals:

From Mokin’s site. Tap to view at full size.

My plan was to find the manufacturer of the networking chip inside my dongle, then find their webpage, then hopefully find a driver.

Here’s what I did.

Step 1: Identify the vendor

With the dongle plugged into my MacBook, I opened the Apple menu and selected About This Mac. This window appeared:

I clicked the System Report… button, which opened the System Report window:

This window provides a run-down of the hardware, software, and networking on your Mac. Its Hardware list provides information about the hardware in and attached to the computer. A lot of peripherals have information such as vendor IDs encoded to them, and you can use System Report to find it.

I expanded the Hardware menu and selected the USB item. The USB Device Tree list appeared in the window’s right pane.

I then went through the USB 3.1 Bus entries in the USB Device Tree list in search of an entry containing the word LAN. Once I found that entry, I clicked on it, which then caused its details to appear in the lower part of the right pane.

I found the information that I needed: the Vendor ID, and better still, an actual vendor name: Realtek.

This shouldn’t have been a surprise: Realtek, a chip manufacturer in Taiwan, has had the majority share of the ethernet controller market since the early 2000s. They also have a good chunk of the sound chip market, so I’m no stranger to their drivers or their distinctive “crab” logo.

Step 2: Search for the vendor’s site, and in particular, the page containing the driver you need

Now that I had a vendor name, I did a search with using the search term realtek lan 10/100/1000 driver mac. This was my first result:

What if you don’t have a vendor name, but just a vendor ID number?

In the case where you just have a vendor ID number and no name, you should consult a USB ID database, such as the one at The SZ Development:

I decided to see if I could find the driver using this route.

I entered the vendor ID reported by my Mac, 0x0BDA, in the Vendor ID field and the reported product ID, 0x8153, in the Product ID field. I clicked Search and got these results:

  • USB 10/100/1000 LAN
  • RTL8153 Gigabit Ethernet Adapter

The links that the site provides aren’t all that useful. You’ll get much farther if you simply include the result text with the words driver and mac as your search term.

Doing that took me to the same page as the previous method:

Step 3: Install the driver

From the Realtek page I found, I downloaded the installer that applied to me and ran it. It worked without a problem.

(They would be well-served by a team that could do a half-decent job localizing the language on their installer.)

Step 4: Enable wired networking

With the driver installed, it’s time to make wired networking happen!

Open System Preferences. To add wired networking, you’ll need to add a new networking service, which you do by clicking the + button at the bottom of the menu on the left side of the window:
You’ll be asked to select the interface and provide a name for the new networking service. Select USB 10/100/1000 LAN from the Interface menu, and enter whatever you like for in the Service Name field. I entered “Wired” for mine:

I clicked the Create button, which created the service and dismissed the dialog box. The new service, named Wired, appeared in the menu on the left side, with Not Connected as its subtitle.

I clicked the Apply button…

…and the Wired service went from Not Connected to Connected:

Success!

Now it was time to test the connection. I shut off wifi and ran Speedtest.net on my wired connection. The results shown below are for my work computer, which uses a VPN that I need to always keep on (or there will be. consequences):

That’s a good deal faster than I get on wireless, and I’m sure I’ll get better speeds on my personal computer when it’s not on a VPN.

Categories
Hardware Programming

Yes, you can run Visual Studio Code on Raspberry Pi

This is the first in “Cobra Pi”, a series of articles on getting the most out of your Raspberry Pi!

Yes, you can run Visual Studio Code on Raspberry Pi!

You’ve got many options for editing code or other plain text files on your Raspberry Pi. It is, after all, a Linux machine, and you’ve got all the classic command-line editors — vim, emacs, and…

And the windows-and-mouse-based Geany (text editor) and Thonny (beginner-friendly Python IDE) come along with even the bare-bones version of the Raspberry Pi OS setup.

But if you’re like about half the developers who answered the 2019 Stack Overflow survey, your “home” editor is Visual Studio Code. And yes, you can run Visual Studio Code on Raspberry Pi.

How to install Visual Studio Code on Raspberry Pi

If you go to Visual Studio Code’s “downloads” page, you’ll see this:

Tap to view at full size.

For the Raspberry Pi, you want to download the Debian package for systems with ARM processors (click on the ARM button in the .deb row).

Once downloaded, go to your Downloads directory and double-click on the the .deb file you just downloaded. You’ll see greeted with this dialog box:

Click the Install button. You’ll be presented with another dialog box, this time asking for your user password, since it’s required when installing new applications:

Enter the password you use to log into the Raspberry Pi into the Password field and click OK.

Visual Studio Code will be installed on your Pi. Once the process is done, you can launch it by clicking on the Start Menu (the raspberry icon in the upper left-hand corner)…

…and in the menu that appears, select the Programming menu. A sub-menu will appear, and one of the items will be Visual Studio Code. Click that and…

Screenshot: Visual Studio Code on Raspberry Pi
Tap to view at full size.

You’ll be in the Visual Studio Code that you know and love from Windows, macOS, and Linux! And yes, all the plugins that you’ve come to depend on will be available.

Go forth and code!

Categories
Current Events Hardware Programming

Raspberry Pi 400: A lot of computer for as little as $70!

Photo: Raspberry Pi 400, front/top view showing keyboard as seen by the user.
Tap to view at full size.

The Raspberry Pi 400 — a Raspberry Pi 4 board with 4GB RAM built into a compact keyboard — was announced just today, and the base unit (just the computer built into the compact keyboard) retails for $70!

The computer

Photo: Raspberry Pi 400, back/top view showing keyboard and ports.
Tap to view at full size.

The Raspberry Pi 400 is a slightly updated model from last year’s Raspberry Pi 4, and has these specs:

Feature Notes
Processor 1.8 GHz ARM Cortex-A72 CPU
(A little faster than the Raspberry Pi 4’s 1.5 GHz CPU)
RAM 4 GB
Networking
  • 802.11ac wifi
  • Gigabit Ethernet
  • Bluetooth 5.0
Video 2 micro HDMI ports that can each drive 4K/60 Hz video
USB
  • 2 USB 3.0 ports
  • 1 USB 2.0 port (preferably for the mouse)
Power Provided via adapter and USB-C
Additional ports 40-pin GPIO interface

The complete kit

Photo: Raspberry Pi 400 kit, showing the computer, micro HDMI to HDMI cable, The Official Raspberry Pi Beginner’s Guide, mouse, and power supply, as well as the box they came in.
Tap to view at full size.

For an extra $30, you can get the kit, which is the complete “ready to go out of the box” package. It starts with the Raspberry Pi 400 computer-in-a-keyboard unit described above, and it adds:

The kind of computer that hasn’t been seen since the 1980s

Let’s quickly take stock of what you get with just the Raspberry Pi 400, never mind the kit:

  • A fully-equipped computer with a decent processor, decent RAM, wifi/wired/Bluetooth networking with 2 fast USB ports to spare once you’ve plugged a mouse into the slower one.
  • A computer that you can do hardware experiments with, thanks to its GPIO pins, and an abundance of hobbyist-focused expansion kits.
  • A computer that you can plug into your TV.
  • A computer that costs $100.

There hasn’t been a computer like this since the machines pictured below came out…

Photo: ZX Spectrum computer

Photo: Commodore VIC-20.

…and those machines couldn’t hold a candle to the proper desktops of that era.

On the other hand, you’ll find that the Raspberry Pi 400 can easily keep up with the sort of computer that gets issued for standard office work. You could easily use it to do schoolwork or office work, and it’s actually a decent Linux software development machine and retro-style gaming console, too! And with its expansion capabilities, it’s an excellent machine for IoT and sensor projects.

This is the sort of machine that children of the 1980s and early 1990s learned on, many of whom are today’s techies…

…and this machine will probably be the machine that a lot of children of the 2020s will cut their programming teeth on, and who’ll be the techies of the 2040s and 2050s.

Given a choice between a Chromebook and a Raspberry Pi 400, I’d take the Pi, because I can do a lot more with it. In fact, I might be able to do a lot of my new job with it (which is something I might try soon, just to see what happens).

Graphic: “Cobra Pi” logo

By the bye, keep an eye on this blog for a new feature: Cobra Pi, which covers programming on the Raspberry Pi, and whose motto is: “Code hard! Fail fast! No latency!”

It’ll cover all sorts of cool programming tips, tricks, and techniques on the Raspberry Pi, including JavaScript, Python, and even C and ARM assembly language!

Categories
Hardware

Before you freak out because iPhones no longer come with chargers…

…go check your drawers. I just opened the drawer on my right-side desk and this is what I saw:

Photo: An open drawer packed with USB chargers.
Tap to view at full size.

And these are the ones that aren’t being used to charge phones, iPads, Apple watches, or drive other USB-powered things including my videochat lighting rig.

You probably have lots of them around your place as well.

Categories
Hardware What I’m Up To

This just arrived…

…and it’s not something I ordered. I don’t even own a USB-C MacBook!

Of course, this means that the matching computer — which the new employer is sending my way — should be arriving soon.

Categories
Hardware What I’m Up To

My new remote tech interview / teaching setup is unstoppable!

Tap to view the lighting setup at full size. For the really curious, the screen’s showing IntelliJ IDEA displaying a tech interview exercise in which I built an API of hot sauces using Spring Boot, Kotlin, and one other thing that I’ll name later.

Between the gig I’ve got teaching JavaScript and then Python a couple of evenings a week until the end of the year and a whole lot of technical interviews, I decided it was time to up my webcam lighting game. The result is pictured above and below.

Actual screen shot from last week’s technical interview. I’ll write more about how it went soon.

I had an Amazon credit and a coupon code, so I got this thing for “cheaper than free”: A set of two 5600K USB-powered LED lights with tripods and filters…

It works quite well — and better than I expected. While it’s light and takes up little space once collapsed, it’s a little too flimsy for someone who needs on-the-go lighting.

However, if you plan on keeping the rig in just one place and not travel with it, it’s a good setup for your video chats, meetings, interviews, classes, and so on. Check it out on Amazon.

The lights worked well for last night’s class and the previous week’s tech interview. I’ll write more about how the interview went soon.