Well Grounded

Playing with electronics as a hobby has its advantages. Most notably, I don’t need to deal with high-speed signals or EMC most of the time. However, in the days of faster and faster I/O, high-frequency content “sneaks in” whether you want it or not. Just because your microcontroller works at 48 MHz, that doesn’t mean your I/O edge is not (much) faster. And sorting out those issues is hard.

Fortunately, there are many “rule-of-the-thumb” guides out there, but I found none better than Rick Hartley’s. Well worth the watch.

Attending Conference in the Time of Covid

Working from home is saving a lot of time. No commute, no lunch break, no interruptions. So it seemed like a good idea to attend an online conference - especially since I got one ticket for free. While signing up it asked for my work email and phone. As often before I gave my real information. I always did so for many conferences without any issues. Topic didn’t interest me much but I saw no downside in “attending” it. Worse case scenario, I’ll just have it on in background while doing some work.

But it’s like universe wanted to teach me a lesson…

As soon as conference has finished, I started getting emails from vendors. And phone calls. Many phone calls. During “physical” conference times I occasionally did get into touch with interesting people. However, it was only when I found their product interesting and of my own volition. Never before I had conference share my phone number with sponsors. I guess this is a new normal.

I pretty much had every company present at the conference give me a call by now. I must say that most of them were pleasant and understanding when I told them I was not interested / had no use for their product, but surprising number of them were as close as you can get to a spam call.

Companies we never worked with claimed to be calling from “our” account team. There was a lot of persuasion to connect them to somebody higher up. And a lot of trouble hanging up. You see, I am used to “no” meaning no. And I expect the other person to accept it so we can end the conversation on a pleasant note. I’m old fashioned that way.

Pretty much each unpleasant caller had the same tactic. Ignore “no” and pepper me with questions about company I work for. As I refuse to answer a question, ask why and immediately pop another. Damn it, I had spammers that were more pleasant callers than these.

Well, lesson learned…

DKRed

Illustration

While I use OSH Park most of the time, I always like to look at different services, especially if they’re US-based. So, of course I took a note of DigiKey’s DKRed. Unfortunately, review will be really short as I didn’t end up using it.

On surface it looks good. Board requirements are reasonable. If you want to use DKRed service you need to have your design fit 5/5 mil minimum - more than sufficient for all I do. While more detailed specifications are available for other PCB vendors on their platform (albeit Royal Circuits has a bad link), there’s nothing about DKRed itself. Yes, I know DKRed might use any of manufacturer’s behind the scene but I would think collating minimum requirements acros all of them should be done by DigiKey and not left to a customer.

And not all limitations are even listed on that page - for example, fact that internal cutouts are not supported is visible only in FAQ and whether slots are supported is left as a complete secret. Compare this to OSH Park’s specification and you’ll see what I mean.

But ok, I went to upload one small board just to test it. And I was greeted by error that length is shorter than 1 inch. As I love making mini boards smaller than 1", I guess I’m out of luck. But specification page did correctly state that fact so I cannot be (too) angry. Never mind - I’ll try a slightly bigger board. Nope - it has to be more than 4 square inches in area. Something that I didn’t find listed anywhere.

Well, I had need for one board 65x72 mm in size - that one would work. And yes, DKRed finds that board OK. But cost is $43.52. OSH Park charges $36.25 for the same board. And yes, DKRed gives 4 boards ($10.88 per board) while OSH Park only provides 3 ($12.08 per board) so it’s slightly cheaper if you really need all 4 boards. If you’re hobbyist requiring only 1 board like me, you’re gonna pay more.

And this is where I stopped my attempts. Breaking deal for me was the minimum size as this makes it a no-go for most of my boards. And cost for just a prototyping is just too high. Mind you, it might be a good deal for people regularly working with bigger boards at a small quantity. But it’s not for me.

Web Server Certificate From a File

If you’re dealing with HTTPS on .NET 5, you might have seen the following message: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date. Recommendation to solve this is also clear To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust' And you’re pointed toward Microsoft docs for more information.

What’s not clear is that you can also load certificate from file and skip the whole system configuration - really useful if you don’t have the full system access. For that just configure your builder appropriately:

Builder = Host.CreateDefaultBuilder()
    .ConfigureWebHostDefaults(webBuilder => {
        webBuilder.ConfigureKestrel(options => {
        var cert = GetCertificate();
        options.Listen(IPAddress.Any, 443, listenOptions => {
            listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
            listenOptions.UseHttps(cert);
        });
    });
})
.Build();

In example code above, loading the certificate is done from GetCertificate function; something like this:

private static X509Certificate2 GetCertificate() {
    return new X509Certificate2("mycertificate.pfx", "");
}

Case of the Incorrect USB VID

While manually executing script to reflash Sierra EM7455 (since automated steps didn’t work), I accidentally skipped a command - one to change USB VID. For those not familiar with USB, there are two numbers - VID and PID - combination of which allows for system to recognize your device. If you change one and not the other, your system will not recognize device anymore.

In my case, I have created a device 413c:9070. It was a monster with VID belonging to Dell and PID of a generic Sierra device. Combination that’s definitely not recognized. And I couldn’t correct it because that would require serial connection to the device. Serial connection I didn’t have due to the device not being recognized. In Windows you’re officially screwed. But Ubuntu comes to rescue.

In Linux it’s trivial to convince system your “hybrid” device is a valid one. Just load option module and tell your serial driver there’s a new kid in town. In my case, this looked something like this:

sudo modprobe option
echo 413c 9071 | sudo tee /sys/bus/usb-serial/drivers/option1/new_id

With this I got my device’s connection back at ttyUSB2 and could use minicom to manually change VID:

sudo minicom -b 115200 -D /dev/ttyUSB2
 AT!USBVID=1199