BM-Bloggers

The blogs of Black Marble staff

NDC London 2016 (Post 5 Raspberry PI, Fez Cream and Windows 10)

 

One of the things I showed at NDC was a Raspberry Pi 2 with a FEZ Cream Hat (I know that sounds just so wrong, but that is its name). The FEZ Cream offers Gadgeteer ports out of the Pi, which is just awesome. What this means in reality is you get objects to program against not ports and lines which is mush easier; for time, teaching children and me.

 

Not all gadgeteer modules are supported, mainly those that either are already on board the Pi or dont make sense (display,sd card,wifi etc), but all the ones you want are.

Development is done in Visual Studio inside a UWP application. I think this key point of the application is a C# / XAML application which is retargeted for the Pi by selecting ARM instead of x32/64. I will do a video as a follow up.

Picture1

 

Fez Cream – GHI Electronics

https://www.ghielectronics.com/catalog/product/541

Everything you need can be found in the FEZ Cream Developers' Guide.

I bought mine from Generation Robots http://www.generationrobots.com/en/

 

Here is a rough walkthrough of building and running an app on Windows 10 IOT core on a Pi, video to follow

 

You will need a Raspberry Pi 2b a SD Card ( 8Gb+ )

 

Windows 10 on PI Check List

  • Windows 10 IOT Core Dashboard is your friend download it from http://ms-iot.github.io/content/en-US/GetStarted.htm
  • Build a SD card using the core dashboard
  • Insert into Pi and Boot (wait, the first boot takes a while), remember to connect a display, for the first boot I suggest unplugging all external usb devices bar keyboard and mouse.
  • Update Visual Studio 2015 to Update 1 (if you dont have 2015, download the community edition and update that) here
  • Install the IOT core Templates from Tools-Extensions Updates into Visual Studio here
  • Build a UWP application
  • Reference Manager - Universal Windows - Extensions - Windows IOT extensions for the UWP

Select

  • Change build to ARM
  • Change Local Machine to Remote Machine, in the dialog select the IP address your PI is showing on its display
  • Deploy and Run (F5)

 

 

Tips

The management portal is Windows 10 Device Portal (IP:8080)

Set the package name in the packaging section of the package.appmanifest, so when you select it from the portal it is easy to find

Remember to shut the device down.

b.

 

 

 

 

NDC London 2016 (Post 4 Intel Edison )

 

The Intel Edison unit is great for building IOT, people have been asking where to get the bits and for more general information

intel.web.368.207

http://www.intel.com/content/www/us/en/do-it-yourself/edison.html

I would suggest getting the Arduino kit to get started with. I enjoy the Xadow(below) much more but I struggled to get the Edison updated first time on the Xadow but not the Arduino (but that could have been me).

Intel IOT https://software.intel.com/iot

Intel Examples http://www.instructables.com/id/Intel/

Intel Edison Suppliers ( for reference )

 

I also showed in my talk the Seed Studio Xadow kit, it comes with a mini screen and sensors

The Xadow kit allows you to build rather nifty devices by plugging modules together which is just superb.

300px-Xadow_Wearable_Kit_For_Edison02

http://www.seeedstudio.com/wiki/Xadow_Wearable_Kit_For_Edison

 

in the UK (for reference)

Active Robitics Stock the Xadow kit http://www.active-robots.com/xadow-wearable-kit-for-intelr-edison

b.

 

I do not recomend or warranty any suppliers, they are for reference only

NDC London 2016 (Post 1 thanks)

 

I had a great time at NDC 2016. It was a very well organised event, everybody enjoyed the event, content and the food.

Huge thanks to the great and efficient organisation by the NDC team.

Also thanks to the great people with clearly great taste who attended my talk.

I am separating the post into a few areas so I can keep updating them without people having to read long lists and work out what has changed.

 

b.

 

 

Fixing cannot load dashboard issues on BlogEngine.NET using sub blog aggregation

As I discovered during my BlogEngine upgrade, there is an effort within the project team to focus the codebase on three possible usage models on any given BlogEngine server instance:

  • Single blog with a user – a personal blog (default)
  • Single blog with many users – a team/company blog
  • Many blogs each with a single user – a set of related blogs that can be agregated togther

I needed the third option, problem was in its history our blog has been both of the other two types, so I have multiple user accounts for each blogs, and login usernames are repeated between individual blogs on the server.

This is not fundamentally an issue for a server running in the third mode, except on the primary blog that is setup to provide agregation of all the other blogs.  Even here, on a day to day basis, it is not an issue either, basic post RSS aggregation is fine. However, when you login as an administration user and try to access the dashboard you get the error

Item has already been added. Key in dictionary: 'displayname' Key being added: 'displayname'

The workaround I have used in the past was to temporarily switch off blog aggregation whenever I needed to access the primary blog dashboard – not the best solution.

After a bit of investigation of the codebase I found that this issue is due to the fact we had users  called ‘admin’ on the primary and all the child blogs. The fix I used was a bit of SQL to do some user renaming from ‘admin’ to ‘adminblogname’ . I needed to rename the username in a few tables.

AS USUAL BEWARE THIS SQL, MAKE SURE YOU HAVE A BACKUP BEFORE YOU USE IT, IT WORKS FOR ME BUT I MIGHT HAVE MISSED SOMETHING YOU NEED


update p
set p.SettingValue = concat (p.SettingValue , ' ', b.BlogName)
from be_Profiles p
    inner join be_Blogs b on
        b.BlogID = p.BlogId
where
SettingName ='displayname' and
SettingValue = 'admin';

update p
set p.UserName = concat (p.UserName , b.BlogName)
from be_Profiles p
    inner join be_Blogs b on
        b.BlogID = p.BlogId
where
username= 'admin';

update u
set u.UserName = concat (u.UserName , b.BlogName)
from be_Users u
    inner join be_Blogs b on
        b.BlogID = u.BlogId
where
username = 'admin';

update r
set r.UserName = concat (r.UserName , b.BlogName)
from be_UserRoles r
    inner join be_Blogs b on
        b.BlogID = r.BlogId
where
username = 'admin';

 

This is not a problem specific to admin users, any username duplication will cause the same error. This basic SQL script can be modified to fix any other user accounts you might have username clashes on.

Once this SQL was run I was able to login to the dashboard on the primary blog as expected.