Subscribe via RSS
28May/180

Visual Studio 2017: Error Deploying to Raspberry Pi 3

Any chance you've just opened up sample code to deploy an ARM-based project to a Raspberry Pi and you get this error?

DEP6100 : The following unexpected error occurred during bootstrapping stage 'Connecting to the device 'IP ADDRESS OF PI'.': 
MissingMethodException - 'Microsoft.Tools.Connectivity.RemoteDevice.Ping()'

Did you just install the Windows 10 SDK? My first recommendation is to reboot your machine! ...but actually, you don't really have to do that. Just restart visual studio. And yes, I know you closed it when you were installing the SDK... for some reason even opening it up straight after didn't work. A second restart of just VS2017 worked fine.

Also.. the default screen resolution is wrong on the PI when with a 7" 800x480 LCD. It really screws with the touch-screen input. Thanks to this article, we only have to do the following:

$username = "administrator"
$password = "[YOUR PASSWORD]"
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $securePassword

$pstimeout = New-PSSessionoption -OperationTimeout (1000*60*5)
Enter-PSSession -computer [IP OF RASPBERRY PI 3] -Credential $cred -ErrorAction Stop -SessionOption $pstimeout

Save the above as a script and run it in the PowerShell ISE.

[IP IF MACHINE]: PS C:\> SetDisplayResolution.exe 800 480
Set Display Resolution and Orientation

replace line: gpu_mem=32                  # Set VC to 32MB, ARM DRAM to (1008-32)MB
append line: hdmi_mode=87
append line: hdmi_cvt=800 480 60 6 0 0 0
append line: lcd_rotate=0
Success! - You now need to reboot the device
use "shutdown -r -t 0"

Reboot!

25May/180

Germany, 2018 – Miniatur Wunderland

Miniatur Wunderland is nothing short of crazy. Two levels of HO scale model railroading at its finest. It's been around for over 10 years and has nearly seen the population of Australia in visitors! We were on a road-trip in a beautiful XF Jaguar (man, the Autobahns are fun) and I made sure we detoured via this monument.

DSC 0402 DSC 0403 DSC 0404

Miniatur Wunderland is located in Hamburg in a converted warehouse. Actually, they were still converting the warehouse (or the lower levels) when we were trying to enter and had to walk around a team angle-grinding the staircase... Regardless, we made it inside and even beat the queues. As we were leaving it turns out there was a wait to get inside!

DSC 0410

DSC 0411 DSC 0412 DSC 0414

The place is split up geographically, but all layouts are completely connected. It then turns where's-wally style with all sorts of trinkets to find. You also then get pushbuttons on the railings to activate random animations on the layout. In the last shot above, the conservatorium, which is a scale model of the actual building in Hamburg, splits open and the orchestra plays. It's pretty damn amazing!

DSC 0418 DSC 0420DSC 0426

Day and Night are modelled... snow as well! As you traverse the layout you end up going through America and all of the Europes... The model then gets two-level and you get a chance to watch trains tackle some serious terrain.

DSC 0437 DSC 0446 DSC 0449

There's even a train elevator working automatically behind the scenes!

DSC 0450 DSC 0451 DSC 0452

Of course, a lot of people come for the airport. The planes even take off and land! Also, keep your eyes open for whacky vehicles... which also take off and land... and even play appropriate theme songs when doing so!

DSC 0439 DSC 0440 DSC 0441

The control room is also crazy. There were at least 5 full-time staff watching cameras and reports. Some were even sending rescue locos in to bump trains.

DSC 0433

DSC 0455 DSC 0457 DSC 0458

DSC 0459

DSC 0461 DSC 0464 DSC 0465

DSC 0467 DSC 0468 DSC 0469

And finally... don't forget to shop and eat.

DSC 0470DSC 0471 DSC 0472

The cafe at the end is modelled as per the internals of a buffet carriage. All train nerds should visit this place!

Filed under: INTL No Comments
24May/180

Amsterdam, 2018 – Northern Metro Extension

With my brother living on the northern side of the Ij River, I was happy to see (via google maps) that there was a newly built station just near his house! Turns out that it's opening soon... and isn't actually ready for passengers. Regardless, they had constant EMUs in test, up and down the line seemingly running to the timetable.

This line will really help my family! I'm looking forward to riding it next time I'm in town... will also really help getting to the thrift stores in the south!

Filed under: INTL No Comments
23May/180

Amsterdam, 2018 – Amsterdam Centraal

This station looks nicer every time I visit it. Having my brother's bike available meant that I could go for leisurely cycles at-will, and most of those involved crossing the IJ on the free ferry and then hanging around Centraal watching traffic. One afternoon, towards the end of the trip, saw an hour spent on the platforms watching the comings and goings.

DSC03356

DSC03357 DSC03358 DSC03359 DSC03360DSC03362

DSC03364

DSC03365

DSC03366

I'm still a total fan of the Koplopers and was happy to see them still in service. It's been 7 years since I rode one and I've also passed on the HO Lima Model that I previously owned.

DSC03369

DSC03370 DSC03374 DSC03379 DSC03389 DSC03397

DSC03393 DSC03394 DSC03395

DSC03399

DSC03381 DSC03384 DSC03388

...That's enough photos... enjoy.

Filed under: INTL No Comments
22May/180

Amsterdam, 2018 – Thrift Shopping

Although the trip resembled a Chevy Chase movie, I still had Steven-time to jump on a bicycle and browse the used stores of Amsterdam. Timing for this trip was pretty good; Not only did I have "Europe's biggest flea market" on the weekend I landed, the weather was fantastic and the trip ended with King's Day.

IJ Hallen Market

Known as Europe's largest flea market, this event is held on the northern edge of the Ij River, just north of Amsterdam Centraal. A quick ferry will get you from the station to the market, but I rode there as my brother lives on the northern side of the river. This market was huuuuuuge and there was lots to be found. I must admit that there were very little electronics; but there were enough trains and vintage electronics to keep me entertained.

DSC 0259

DSC 0261 DSC 0262 DSC 0263

DSC 0266 DSC 0267 DSC 0268

Note that there're two trams and other random vehicles on site. There's also an airbnb in a crane, if you feel like staying really close. Actually, I think you can also stay in the trams!

DSC 0269 DSC 0272 DSC 0271

DSC 0324

DSC 0265 DSC 0318 DSC 0320

Van Dijk and Ko

On the way back from the market above, I stumbled across Van Dijk and Ko. It's an old warehouse full of trinkets! Aaaaand there's a cafe to have beer and bitterballen when (or before) you've done your shopping.

DSC 0280

DSC 0276 DSC 0284 DSC 0287

DSC 0290 DSC 0292 DSC 0293

Some pretty random electronics around! If I lived in Amsterdam then I'd be in these places way too often... the limitations of my suitcase really did prevent a lot of splurging!

The Second-Hand Shop Bicycle Tour

The thrift shopping was always going to be a priority in Amsterdam. It officially started in Buikslotermeerplein, a day before the trip below, as this was close to my accommodation. Point A on the map is north of Centraal and contains a store from the appropriately-named chain known as Used Products. They're pretty much the Cash Converters of Amsterdam; same products, same customers, same fights.

DSC 0301 DSC 0304 DSC 0305

The op-shop is called Kringloopbedrijf De Lokatie. I have no idea what this means? But it was very op-shop-esque with little IT. Lots of books and clothes. Still fun to look through.

DSC 0306 DSC 0307 DSC 0309

The next day, it was time to jump on the bicycle and target the city. This started with a ferry ride across the IJ, arriving under the bus interchange of Amsterdam Centraal Station. From there, it was a clockwise tour of the outer canal cycling from store to store.

Points B and C on the map were both Used Products stores. Both had interesting electronics and retro games, but nothing that really caught my eye.

DSC 0338

DSC 0339 DSC 0342 DSC 0340

DSC 0344

DSC 0345 DSC 0346 DSC 0347

I even ended up riding a fair way past the zoo and checked out a neat railway bridge in the process.

Waterlooplein Markets (Point D) (Note that it's Waterloo Plane, not Water-Loop-Line) is a daily flea market in the middle of town. I'd been numerous time before and didn't end up there on this trip. For those interested, it's an open market with lots of souvenirs. Also good if you need a phone charger or a bicycle repair!

DSC 0333

DSC 0328 DSC 0330 DSC 0332

Mevius (Point E) (that link is a little weird, might be the parent company) was the next stop. It's a huge shed right next to the old Tram Museum (which wasn't operational!) and is full of all sorts of stuff. I nearly picked up a Gravis Gamepad and ATI AGP Card... but for some reason chose not too. Maybe they were just too grotty.

DSC 0354

DSC 0348 DSC 0349 DSC 0350

DSC 0351 DSC 0352 DSC 0353

I then ended up at HobbyLand (Point F). I'd actually picked up an old Marklin steamer at the IJ Hallen markets and needed traction tyres. The sellers didn't speak English and asked if I knew Deutsch. Either way I managed to fake my way to describing a rubber tyre and purchased a size that worked!

DSC 0355 DSC 0356 DSC 0357

Just around the corner was Ari at Point G. And, it's nuts! You only need to read the articles here and here. This place is a thin corridor of a house with crap packed up all walls and ... well ... wherever else it will fit.

DSC 0358

DSC 0359 DSC 0361 DSC 0364

Point H was another Used Products store.

DSC 0366

DSC 0368 DSC 0369 DSC 0370

One must not forget a healthy lunch...

DSC 0371

Point I was also another Used Products store.

DSC 0375

DSC 0377 DSC 0378 DSC 0379

Rataplan is at point J on the map and seemed to be a large op-shop style store. It allowed people to drop stuff off as well. There weren't many electronics and mainly just dealt with homewares and old clothes.

DSC 0380 DSC 0381 DSC 0383

Across the road was Antiekbeurs "Amsterdam 700". This is denoted by K on the map, which is partially covered by I. This was a cool place dealing mainly with furniture; no electronics but still very cool to look through.

DSC 0388

DSC 0384 DSC 0385 DSC 0386

After being slightly disappointed by the first Rataplan, I wasn't expecting this second one at point L. It's freakin' huge and full of cool stuff! Lots of IT actually... interesting LCDs and other bits, but nothing that would fit in my suitcase!

DSC 0389

DSC 0390 DSC 0391 DSC 0392

How cute is that colour-coordination!?

DSC 0396 DSC 0394 DSC 0395

They even have an alterations service! Meanwhile... it's just huge... but I think I mentioned that already.

DSC 0397

Next up was an afternoon in Amsterdam Centraal watching Koplopers. My favourite way to spend an hour.

Filed under: INTL No Comments
10May/180

How to convert XML into a class the easy way!

An on-the-side project, that's been going for quite a while now, extracts data from a remote service. For a very long time, this was done via reverse-engineered Java code, of which I then wrapped my own console app around. All worked very well until they changed the login service request format and stopped using the Java altogether.

The new version was just HTML and json and, but the actual payload of the data I cared about was XML. Yes, that's right, XML in a string via JSON. Who would'da thunk? Regardless of the insanity, I was still itching to parse it.

So, the usual Json to C# class generator was used to build the de-serialisable class for the initial packet. I then needed a quick and smart way to convert the XML into a class.

Turns out that there is also an XML to C# converter! Paste in your XML blob and, if correctly formatted, it'll return a class that the XML can be de-serialised into!

And, it worked perfectly. Well, nearly. There was one gotcha! The XML class I was decoding had one field called Text. This is not a valid name inside a deserialised class in C#. So call it a different name in the class but override it via an attribute, as per below.

[XmlRoot(ElementName = "g", Namespace = "http://www.w3.org/2000/svg")]
public class G
{
        [XmlElement(ElementName = "rect", Namespace = "http://www.w3.org/2000/svg")]
        public List<rect> Rect { get; set; }
        [XmlElement(ElementName = "text", Namespace = "http://www.w3.org/2000/svg")]
        public List<textitem> Texts { get; set; }
        [XmlAttribute(AttributeName = "fill")]
        public string Fill { get; set; }
        [XmlAttribute(AttributeName = "stroke")]
        public string Stroke { get; set; }
        [XmlAttribute(AttributeName = "transform")]
        public string Transform { get; set; }
        [XmlAttribute(AttributeName = "text-anchor")]
        public string Textanchor { get; set; }
        [XmlElement(ElementName = "g", Namespace = "http://www.w3.org/2000/svg")]
        public G[] subG { get; set; }
}

Those watching trains on maps in Australia have the above site to thank for the speedy recovery of the service :)