No Drilling, Please

Illustration

As I managed to do create a holly grail of electronics - double sided PCB without any vias, only remaining step was to get it made.

Usually this would consists of uploading board gerbers to OSH Park and getting payment sorted out. However, this time I was greeted with error: “I can’t find a drills file”. Mind you, this was expected since I really didn’t have a drill file, but unfortunately this wasn’t a warning I could skip. So I contacted support.

I really didn’t expect any quick answer since I raised ticket on December 31st after 16h PST. Surprisingly I got the solution almost immediately. It wasn’t possible to upload design without drills but Dan (yep, Laen doesn’t handle support any more) suggested a file with drill locations all falling outside of board. Their filtering process would then remove those as invalid and my drill-less board would be ready for manufacturing.

While this solution was acceptable for one-off job, it got me thinking whether there was something a bit more elegant and less error-prone if I create some bigger board in the future. To solve it properly I had to have a drill file without any drills. To the Excellon specification!

With a bit of testing, I got to the minimum of content that OSH Park parser would still consider a valid drill file. It is essentially just defining one drill tool, selecting it for work and then finishing script without ever drilling a hole:

M48
INCH
T01C0.0394
%
T01
T00
M30

Empty drill file is available for download.

In the Year 2014

Illustration

As always, first post of a year is reserved for a bit of statistics.

This year I published only 49 posts. I would like to tell it’s because they are of a higher quality but truth is that I got busy with other stuff and this blog got ignored in the progress. I highly doubt I’ll return to a new post every three days as it was when I started writing but once a week should be doable.

Since programming posts take most effort to do properly, their percentage has dropped to only 20%. About the same number of posts was related to Windows. Next up with 10% was Linux and another 10% was dealing with electronics. Rest is mishmash that I won’t even bother to categorize.

There was a slight decrease in amount of traffic site has been getting but that was to be expected due to a drop in posting frequency. As it became usual, about 65% of traffic is coming from unknown place so I’ll just ignore them. Out of known locations, United States were again most common source with about 35% of all visits and Germany came far second with 15%. India was third with 10%.

Same as last year, Chrome was the first browser of choice for viewing with 40% of traffic coming via it. Internet Explorer and Firefox basically share second place with about 25% each. Fourth honorable mention goes to Safari with 5%. Similar to last year, 95% of those visits were done via desktop and not mobile phone.

This year I also did a major site improvement - it became https-only. While average visitor probably doesn’t care and hopefully saw no difference, those more security conscious will appreciate this change. It is more of a philosophical move than anything else.

This year will also be remembered for me as the first year a page of my site was intentionally blocked by a search engine. Post in question was Installing Windows 8.1 (or 8) without a product key and it was DMCA’d due to comments as far as I can deduce. It is really difficult to know what exactly happened because every questions seems to get a black hole treatment.

That’s it - regular program will continue with the next post.

Chilling

Illustration

As I was doing a search on my own site, I noticed that one result was missing and at it place all I had was “In response to a complaint we received under the US Digital Millennium Copyright Act, we have removed 1 result(s) from this page. If you wish, you may read the DMCA complaint that caused the removal(s) at ChillingEffects.org.”

Going to the ChillingEffects link I found out that page in question was Installing Windows 8.1 (or 8) without a product key. Despite the name that might indicate some shenanigans, post only covers functionality that has been officially documented by Microsoft themselves (here and here). Heck, I even said so at the bottom of the post.

Only keys that ever appeared in that post were done by other people in the comments section. Some of them stayed there for a bit longer (e.g. Microsoft’s own default key), some comment were removed instantly (obvious pirate ones), and all surviving keys were changed to XXXXX anyhow (as soon as I noticed them).

My firm belief is that page doesn’t infringe so I went about finding a way to clear its name.

First issue was to find how to file counter notice. Among all links in regards to DMCA on both Google and ChillingEffects.org, there is not a single contact you can pursue for this. I did know that Marketly was one that complained on behalf of Microsoft, but there was no actual e-mail (no, microsoft-[redacted]marketly.com is not a valid e-mail) or postal address behind those. All that searching around gave me was a link to YouTube DMCA process but nothing applicable to Google Search.

After a while my inquiry finally stopped at the Google Webmaster forum where I finally got two links. It was either DMCA Counter Notification form or Restore URLs form. I went with a good faith belief that infringing content was indeed in comments and that Restore URLs form was an appropriate venue.

This happened on December 13th. Link is still blocked and there is no response from Google whatsoever. Company that usually takes content down less than 24 hours after notice is received sure does take its time doing the opposite thing. Or even just responding to my request with “you’re wrong”.

Whole process left me a bit baffled by a few things. First of all is the recipient of DMCA notice itself - Google, Inc. [Blogger]. I haven’t had my page hosted by blogger for three years now. If my assumption was correct about them finding issue with comments on my post, proper venue would be to send DMCA to either Google Inc. or to myself and not to an uninvolved third party.

Slightly more troubling issue is why I haven’t received information about issue from Google. I searched all my e-mails and I could not find a single warning about any issue. I have Google’s webmaster tools and nothing is there either.

And lastly I find it absolutely unacceptable to have DMCA notice filled without a proper e-mail address for a response. Notice on ChillingEffects.org did have a name of a person but only a generic Microsoft address as a contact and a redacted e-mail. That makes it impossible to respond directly. I believe that minimal courtesy would be to leave a valid e-mail.

All in all, between figuring all the information and writing this post, I have wasted a complete day on this topic. It is a matter of principle to me because I take this DMCA take down very personally. However, looking back at this I don’t think I will ever deal with this again. It just requires too much effort to go through motions for something that is essentially just a hobby.

PS: I find two things curious:

PPS: Yes, I am aware that DMCA is over a year old. I don’t google looking for my own posts that often…

Determining IPv4 Broadcast Address in C#

When dealing with IPv4 network, one thing that everybody needs sooner or later is a broadcast address based on IP address and its netmask.

Let’s take well known address/netmask combo as an example - 192.168.1.1/255.255.255.0. In binary this would be:

Address .: **^^11000000 10101000 00000001^^ 00000001**
Mask ....: **11111111 11111111 11111111 00000000**
Broadcast: **^^11000000 10101000 00000001^^ !!11111111!!**

To get its broadcast address, we simply copy all address bits where netmask is set. All remaining bits are set and our broadcast address 192.168.1.255 is found.

A bit more complicated example would be address 10.33.44.22 with a netmask 255.255.255.252:

Address .: **^^00001010 00100001 00101100 000101^^10**
Mask ....: **11111111 11111111 11111111 11111100**
Broadcast: **^^00001010 00100001 00101100 000101^^!!11!!**

But principle is the same, for broadcast address we copy all address bits where mask is 1. Whatever remains gets a value of 1. In this case this results in 10.33.44.23.

As you can see above, everything we need is simply taking an original address and performing OR operation between it and a negative netmask: broadcast = address | ~mask. In C# these steps are easiest to achieve if we convert everything to integers first:

var addressInt = BitConverter.ToInt32(address.GetAddressBytes(), 0);
var maskInt = BitConverter.ToInt32(mask.GetAddressBytes(), 0);
var broadcastInt = addressInt | ~maskInt;
var broadcast = new IPAddress(BitConverter.GetBytes(broadcastInt));

Full example is available for download.

Windows Store App Doesn't Start on Virtual Drive

Illustration

As I went to update my Resistance Windows Store application, I stumbled upon unexpected error while trying to run it. Message was quite generic “This application could not be started. Do you want to view information about this issue?” and application would stay stuck on the startup screen.

Details were not much better. It was essentially the same error message: “Unable to activate Windows Store app ‘47887JosipMedved.Resistance_805v042353108!App’. The Resistance.exe process started, but the activation request failed with error ‘The app didn’t start’.” As error messages go, pretty much useless.

I was thinking that I broke something with changes so I reverted to my last known good configuration - one that is actually currently deployed in the Store. Still the same error.

It took me a while to notice that, once project is copied to the other drive, everything would work properly. A bit of back and forth and I believe I found the issue.

I keep all my projects stored on a virtual disk. While everything else treats that disk as a real physical thing, Visual Studio sees the difference but only when dealing with Windows Store applications. It just wouldn’t work.

As you can guess it, solution was to copy project on a physical drive and work from there. Easy as solutions go but definitely leaves the bitter taste. Lot of wasted time simply because of a lousily written error message. A bit more clarity next time?