Wednesday, November 29, 2017

Braswell/Cherry Trail BSP for Windows 10 IoT Core

I finally found the BSP for Braswell and Cherry Trail based devices today.  It was released in October and builds against 1709 if you follow the instructions here:

https://docs.microsoft.com/en-us/windows/iot-core/build-your-image/createbsps

Listed under  "Board Support Package for Intel Atom® Processor Windows* 10 IoT Core 32-bit and 64-bit Platforms" -  https://www.intel.com/content/www/us/en/embedded/products/braswell/software-and-drivers.html

Friday, November 3, 2017

Simple Webserver for Windows 10 IoT Core

Recently, I needed a small web server for a project I was working on.  I needed to run it in a UWP background task on Windows 10 IoT Core, so my options were a bit limited.

The ms-iot/samples repository has quite a few gems.  In particular, the IoTBlocky Sample has a very basic web server called SimpleWebServer.  I ended up adding some support for parameters, but otherwise was very happy about how fast I got a web server hosted in my code.

The one deficiency is the lack of SSL support:

StreamSocket object can be configured to use SSL/TLS for communications between the client and the server. This support for SSL/TLS is limited to using the StreamSocket object as the client in the SSL/TLS negotiation. You cannot use SSL/TLS with the StreamSocket created by a StreamSocketListener when incoming communications are received, because SSL/TLS negotiation as a server is not implemented by the StreamSocket class.

I was hoping I was incorrect about this, but I haven't found any evidence to the contrary.  With .NET Standard 2.0, I hope to find something else I can include instead.




Wednesday, October 25, 2017

Things In My Lab - Raspberry Pi 3 and Windows 10 IoT Core For Digital Signage

Recently, I wrote an short post on using Windows 10 IoT Core on Raspberry Pi devices for Digital signage.  I wanted to detail a little bit more about what hardware I use for testing in the lab.

I have a SmartiPi Touch and Raspberry Pi setup in the home lab, which is really neat for giving demos and quickly testing stuff- as long as I don't need smooth video playback.  It is small and also shows what the UI looks like at a lower resolution

Otherwise, I use our Now Micro IoT Player 4k, since I can quickly PXE boot it and reimage for greenfield testing.  Prior to that product release, I used a variety of Intel BayTrail based devices, depending on what I was trying to accomplish at the time.

Overall, the IoT Player 4k is a lot faster and easier to work with when debugging UWP apps, but having a second monitor with me isn't always convenient.

Saturday, October 21, 2017

Adding Non-BSP Drivers to Windows 10 IoT Core

Windows 10 IoT Core has a significantly different way of handling drivers over a traditional Windows OS.  In particular, BSP drivers are compiled into the image during FFU creation.

If you are looking to install Windows 10 IoT Core on a different device than the FFU was built for, you can install drivers at run time on the device. Early on, while trying to find a commercial Windows 10 IoT Core platform, I did extensive testing with Intel Compute Sticks and can verify that the Wi-Fi module (Intel AC 7265) in the STK1AW32SC can is fully functional after installing a driver.

Basically, follow these steps, but copy the driver for the device from Intel.  You will need a Windows 10 driver (not Windows 7/8.1) and may need to search through the INFs to find the correct device ID.

The command itself is simple-  Use PowerShell to connect to the device, CD to the directory you copied the files to and run:
devcon.exe dp_add DRIVERINF.inf 
After rebooting, the device will be functional.  So far, I've only used this method for Wi-Fi drivers.  I would not expect all drivers to work, especially if they call APIs not available on Windows 10 IoT Core or install additional components.

Monday, May 1, 2017

Running IoT Background Task On Your Development Machine


At some point, running an IBackground Task based project just stopped working on my development machines.  You can use these on an IoT Core device to provide background service like functionality.  In my case, the Now Micro Agent provides Azure IoT Hub, device management and other services on the Now Micro IoT Player.

Turns out, you can enabled debugging these by following some instructions.  It does involve needing ICD, but otherwise is a simple fix.

Saturday, February 18, 2017

Stopping the Windows Device Portal at runtime

In another of my series of "questions I asked in a forum and didn't really find a good answer to", I was looking for a way to stop the Windows Device Portal.

In Windows 10 IoT Core, the Windows Device Portal is a build time feature.  I wanted the option to possible enable it in a production, locked down, device without having the user reimage the device.

The Windows Device Portal is hosted in a Windows Service called WebManagement.  To stop it, run this command:
sc.exe stop WebManagement
 Knowing it can be managed via SC, I can set the startup to Manual and only start it when I need it.  I also need to enable a user account to login, since I don't actually have an enabled account on my retail build.

Friday, February 17, 2017

Submitting a Headless App to the Windows Store

I recently ran across an issue when submitting a headless app for Windows 10 IoT Core to the Windows Store.

Basically, you have to include a dummy UWP app in the solution so you can pass the automated Store checks.  In my case, I was greeted with a nice message:

"An executable image named '<APPNAME>.winmd could not be found in <C:\Projects\<APPNAME>\obj\x86\Release\ilc\in".

Posting in forums didn't come up with anything, so I ended up opening a support incident, which yielded a simple workaround:

Add the EXE to a folder in the solution and it will build (instead of at the root like the instructions state).
In the Package.appxmanifest, ensure you specify the folder in the Application node:
    <Application Id="App" Executable="EXE\DummyApp.exe" EntryPoint="DummyApp.App">

In my case, the blank UWP app is in a folder named "EXE".  I also specified "Copy to Output Directory" as "Copy Always"

Update:  I figured I should post a little bit more context.  This is the guidance for publishing IoT Core apps to the Windows Store to have it update your apps automatically.  To submit the app, it must be compiled in Release mode.  Release compiles with a checkbox enabled called "Compile with .NET Native tool chain", which appears to have a bug when you include an EXE at the root of a project.

The best part is that the only reason to do all of this is to pass the automated submission checks.  

Wednesday, February 15, 2017

Windows 10 IoT Enterprise Lockdown Settings

Alternate Title: Learn This Neat Trick to Block Edge Gestures

If you happened to use Windows Embedded 8.1 Industry on a POS/Digital Signage Player/kiosk, you are probably looking for the same features in Windows 10 IoT Enterprise.

Most made it over.  The biggest change, which I get asked about most, is the Gesture Filter.  With the initial release of Windows 10 IoT Enterprise, there was no way of suppressing the side swipe gestures without terminating explorer.exe.  With 1607, there is a new policy that actually works.  It appears that this policy does not work with Windows 10 Home/Pro, which I typically don't mind because they are just not good for embedded devices.

Since it seems to be hard to find, this is the registry key that corresponds to the policy:

     REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\EdgeUI” /V  AllowEdgeSwipe /T REG_DWORD /D 0 /F

Monday, February 6, 2017

Deploy a FFU Image using DISM

Run the following command to get a list of disks on the system:
     wmic diskdrive list brief'

To apply the image to the disk run:
     DISM /Apply-Image /ImageFile:.\flash.ffu /ApplyDrive:\\.\PhysicalDrive0 /SkipPlatformCheck

Where .\flash.ffu is the FFU in the current directory and PhysicalDrive0 is the drive you identified in via wmic.  Be careful, you can reimage your USB boot media using this method without warning.