"Can't find Model 01 serial port name" on macOS

If you don’t mind, I’m interested to see what the output of this command is on a machine with this problem:

ioreg -p IOUSB -l -b | grep -E "@|PortNum|USB Serial Number"

In particular, the USB Serial Number string for the Model01, and if it’s different from what system_profiler shows.

Here’s what it looks like on mine; thanks for looking into fixing this:

  +-o AppleUSBXHCI Root Hub Simulation@14000000  <class AppleUSBRootHubDevice, id 0x1000003f3, registered, matched, active, busy 0 (0 ms), retain 13>
  +-o Model 01@14100000  <class AppleUSBDevice, id 0x1000014ea, registered, matched, active, busy 0 (7 ms), retain 20>
  |     "PortNum" = 1
  |     "USB Serial Number" = "Ckbio01"
  +-o iBridge@14200000  <class AppleUSBDevice, id 0x100001625, registered, matched, active, busy 0 (8 ms), retain 32>
        "PortNum" = 2

And system_profiler SPUSBDataType shows it as Ckbio01E?

It has Ckbio01, no E:

    Model 01:

      Product ID: 0x2301
      Vendor ID: 0x1209
      Version: 1.00
      Serial Number: Ckbio01
      Speed: Up to 12 Mb/sec
      Manufacturer: Keyboardio
      Location ID: 0x14100000 / 16
      Current Available (mA): 500
      Current Required (mA): 500
      Extra Operating Current (mA): 0

A strange thing is that that changed sometime in the last few hours. In addition, the /dev node has changed name to something the script would pick up:

crw-rw-rw-  1 root  wheel   33,   9 Feb 21 12:19 /dev/cu.usbmodemCkbio011

to

crw-rw-rw-  1 root  wheel   33,  13 Feb 21 12:30 /dev/cu.usbmodemCkbio01

It might have occurred when I flashed my firmware to my fork at https://github.com/treed/Model01-Firmware ; which is a few months out of date with the main repo, although there’s nothing operative. Perhaps there was a bug in the firmware as shipped from the factory? This model just arrived today, unsure if that’s true of the others having this problem.

It’s also worth noting that the port name when the device is in the bootloader may be different than the device name when you’re booted into keyboard mode.

The data the keyboard-mode firmware supplies to macOS (including the serial number) could change between flashings, but the bootloader version won’t be altered by a simple flash-over-USB.

The prior serial and port name held at least through the point where I held down prog and hit enter on the keyboard, which I think would be past the point of the bootloader?

The trouble is that system_profiler is now reporting a name that doesn’t match the device filename. I can update the prober script easily enough to compensate, but it feels like we’ll be going back to guessing.

Does ioreg tell more of the truth?

That’s what I’m trying to find out. Unfortunately, the only Mac I’ve got doesn’t seem to have this problem. Maybe I should try to trigger it by making it forget about the Model01 repeatedly?

So far, I don’t have any examples showing a difference between the two, and system_profiler's output is easier to parse.

I think I’ll submit a change to the prober that makes it check both, and report to the user if there’s a difference. And maybe ask them to report it here?

i have this same issue

 Model 01:

          Product ID: 0x2301
          Vendor ID: 0x1209
          Version: 1.00
          Serial Number: Ckbio01E
          Speed: Up to 12 Mb/sec
          Manufacturer: Keyboardio
          Location ID: 0x14100000 / 17
          Current Available (mA): 500
          Current Required (mA): 500
          Extra Operating Current (mA): 0
 Model 01@14100000  <class AppleUSBDevice, id 0x1000059ae, registered, matched, active, busy 0 (86 ms), retain 22>
  |       "PortNum" = 1
  |       "USB Serial Number" = "Ckbio01E"

If it’s still happening, would you mind running this, and sharing the output?

ioreg -p IOUSB -l -b | grep -E "@|PortNum|USB Serial Number"

i added it above ^^^

1 Like

Thanks!

Well, it looks like ioreg won’t get us different results, so I’ll add a couple of fallback steps, first s/E$/1/, then using a more generic glob.

1 Like

It just occurred to me that people are seeing two common names:

CDkbio01

and

Ckbio01E

I’ve seen the first one, myself, but not the second; that was in early January, and resulted in the current prober script. I only just realized that these are likely the same pattern: C D E, with one of the letters replaced by the device ID kbio01. When it’s not the trailing one, for whatever reason, the device filename uses a number instead of a letter.

@jesse, what do you think would happen if I change the kbio01 in the HID library with a 7 or 8 character string? I’m thinking of giving it a try when I get home this evening — are there any obvious dangers that come to mind?

…or maybe it unconditionally replaces the last character with a 1, and we’re just lucky that it doesn’t change CDkbio01

I’ve submitted a PR that should fix this problem: Kaleidoscope#300

1 Like

Based purely on what you’ve suggested CDE with either D or E replaced by kbio01 gives the two strings being seen without changing the final character C+kbio01+E or CD+kbio01.

Exactly. That seems to be more a point of interest than anything helpful for solving the problem, though.