HoloLens–Device Portal (Part 2)

In addition to the HoloLens Device Portal (see part 1), another option is using the UAP HoloLens companion app which you can install from the store. I think this is a little more end-user friendly, and perhaps a little less developer focused. It exposes a subset of the same functionality.

Once you install it, you connect more or less in the same manner; I think most people will like the live streaming option. There is a bit of latency between the device and what is shown, but that could be somewhat because of our (possibly crappy) wireless which was overloaded with many folks at work.

imageStore Option

imageOnce you connect and set it up then you see the above screen. Of course you can manage multiple devices from here.

imageOnce you login, you see a lot of the same information as you saw in Part 1.

imageYou can see the Live stream as shown here; and what might not be obvious that it is both sound and video which is streamed. In this screenshot you can see my (work) login screen, with the password login being a Hologram. Here it is ‘floating’ over the window, and you can see a flavor of the mixed reality.

imageAs you can expect, you can capture either a photo or a video on what is being seen via the Device.

imageThe photos or videos that you do take, show up here. I suppose they are saved on the device and you would want to take it off there.

imageThe virtual keyboard again I think is one of the best features – saving so much time air-tapping and the arms. Smile

imageApp manager can do some elements of management, but not as much as the web version.

imageAnd finally, you can see some details on the device. I think the Shutdown and Reboot options are probably the one which are more useful.

All in all, this is a little more polished and end-user friendly. Useful when demo’ing the mixed reality solutions you are building.

HoloLens–Device Portal (Part 1)

One of the advantages of running Windows 10 on the HoloLens is that it has all the regular features that you would expect. From a developers perspective, one of those being the Device Portal which is awesome. It is essentially a web server that is being hosted on the machine, and allows you to manage your device over Wifi and USB.

It is a must have if you want to stream your apps (including Holograms) so that others can see it, or alternatively you can record and then share. And of course there are details for various debug situations and the Virtual input saves your fingers from getting tired! Smile You also use this to side load the apps you built. There are REST APIs you could use if you want to program, and there is also a UAP app on the store (more on that in part 2).

To get to this, you browse to the IP address. Below are a few screenshots from my playing around which shows you the various aspects of the portal and what all you can do. And the beauty of this is, as a Windows developer, this all should be very familiar and nothing new. Smile

imageHome Screen – once you login

image3D View Settings

imageMixed reality capture – one of the key elements that lets you share the magic with others

imagePerf Tracing and the various levels you can set as part of Windows Performance Toolkit. This is WPR/WPA support in Systems.Diagnostics.Tracing – see this post for more details.

imageProcess details and you can sort by the relevant column.

imageProcess details #1 – showing various details from Power to Framerate to IO, Memory, etc..

imageProcess details #2

imageProcess details #3

imageApp Manager which is where you side-load apps and manage them

imageCrash Data – the name says it all

imageKiosk Mode – this is really interesting; you can ‘lock’ into one app and use that. I wonder how one breaks out of it when done being in this mode and wanting to get back to ‘regular’.

image

imageAll the ETW (Event tracing for Windows) details and the providers you can want. Again pretty standard stuff.

imageSimulation – not sure if this is used for regression or playback in another setting – where the room capture would help. Does open up interesting possibilities. I think it might allow one to capture the spatial mapping of a room, which then you might be able to use in the emulator (such as someone has done here).

imageNetworking Configuration where you go and manage this.

imageVirtual Input – a great time saver.

imageAnd finally some of the security settings to ensure no one on the same subnet is mucking with you; or when there is more than one device then you talking to the right one.

Creative Coding

As we start to play and explore with new AR/VR mediums like Oculus and HoloLens there is a stronger shift from the traditional medium of working from a more transaction with-known-outcome based model to a more expressive and exploratory model. In the context of many enterprises this is a bigger shift – albeit some of it they have started seeing with mobility but still not the same.

I really like how Rick explains and expresses this both in terms of definition and thinking. The clay analogy I think really helps.

bash on Windows is real–not a VM

I have talked to a few folks recently, and they still don’t believe bash on Windows (RS1) is ‘real’ and think it some kind of a VM. No it is not. It is the ‘real’ user mode running on Windows. It is not Cygwin, and it is not a VM. It is essentially all of the user mode (I.e. Linux without the kernel).

The kernel in this case is a wrapper around the NT kernel that translates the Linux commands to Windows and then things run. As far as Linux is concerned, its the same code and doesn’t have any changes). Technically this is called Windows Subsystem for Linux (WSL).

On windows, this is installed in the user space; so each user get their own instance effectively which is isolated from the other users. Once you install it (and if you are still reading this, then you probably know how to install it), then this shows up under C:\Users\your-user-ID\AppData\Local\lxss. If you can’t find that folder, you can still type it and navigate to it. Below is  a screen shot on what this looks like:

image

It is a little interesting and been mucking around this. Here is you can see the installation of gcc:

image

And here is the output of the CPU details:

image

root@localhost:/proc# cat cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 78
model name      : Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
stepping        : 3
microcode       : 0xffffffff
cpu MHz         : 2808.000
cache size      : 256 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 6
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm pni pclmulqdq est tm2 ssse3 fma cx16 xtpr sse4_1 sse4_2 movbe popcnt aes xsave osxsave avx f16c rdrand hypervisor
bogomips        : 5616.00
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 78
model name      : Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
stepping        : 3
microcode       : 0xffffffff
cpu MHz         : 2808.000
cache size      : 256 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 6
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm pni pclmulqdq est tm2 ssse3 fma cx16 xtpr sse4_1 sse4_2 movbe popcnt aes xsave osxsave avx f16c rdrand hypervisor
bogomips        : 5616.00
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 78
model name      : Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
stepping        : 3
microcode       : 0xffffffff
cpu MHz         : 2808.000
cache size      : 256 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 6
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm pni pclmulqdq est tm2 ssse3 fma cx16 xtpr sse4_1 sse4_2 movbe popcnt aes xsave osxsave avx f16c rdrand hypervisor
bogomips        : 5616.00
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 78
model name      : Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
stepping        : 3
microcode       : 0xffffffff
cpu MHz         : 2808.000
cache size      : 256 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 6
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm pni pclmulqdq est tm2 ssse3 fma cx16 xtpr sse4_1 sse4_2 movbe popcnt aes xsave osxsave avx f16c rdrand hypervisor
bogomips        : 5616.00
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

root@localhost:/proc#

All, in all a very interesting world. A few things to note:

  • This is still in beta, so there will be issues.
  • It is user mode and not server mode. Live with it.
  • There would be path issues if you stray into the 256 character limit of Windows and then try and manipulate it in bash.

Happy hacking!

Download Build (2016) decks and videos

Update – Was a typo in the script, which I fixed. If someone had an issue, copy it again and give it a go.

I prefer to download and see the decks and videos ‘offline’ instead of streaming, as I can easily pause them and then pick off where I left – especially handy when I need to go to a meeting, or take care of some work, or just on a crappy network.

To that end, I downloaded all the sessions and the videos from Build (2016); I think one of the sessions might have gotten corrupted, but ignoring that I have about 140GB of data downloaded and 219 Sessions.

To do this, I used a Power Shell script that helped me download. The script (below) is simple enough – it loops through and for each session does the following:

  • Creates the relevant folder – this includes the Session code, Title, and the Presenters.
  • For each session, extracts the abstract / description of that session and saves it in a text file in that folder.
  • Downloads the presentation for that session.
  • Downloads a jpg which shows the image session – sometimes it is easier just to see the title slide. I thought better to have it and not use it, than the other way.
  • And finally downloads the high-quality video of that session. In the script, you can choose a lower quality video if you prefer that. And if you want only the decks, then you can comment out parts of the script where it doesn’t download the video.

Here is an example on what the output for one of the sessions (P517 – Debugging Events in Edge) looks like:

Build-2016-download-example

A few points to note:

  • In the script, the root folder it tries to create and use is “d:\build”; you might want to change this to something else you prefer or what works for you. I would recommend to not making the root too long as you would get into long file name issues.
  • The script first loops through and downloads everything else except the videos first. And then 2nd time goes and grabs the videos.
  • If there is an exception with the images, then it just ‘eats’ it and moves on. It is not a breaking condition to stop the script.
# First setup the folder where to download using the parameters outlined below.
# Second, loop through and get the decks first
# Third. loop through and get the videos last
# Note: IF you don't want to download the videos, and want only the pptx then comment the section later in the script

# parameters
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath 
$rss = (new-object net.webclient)

#Filenames might get long, so keep this short!
$downloadlocation = "D:\build"

	if (-not (Test-Path $downloadlocation)) { 
		Write-Host "Folder $fpath dosen't exist. Creating it..."  
		New-Item $downloadlocation -type directory 
	}
set-location $downloadlocation

# Grab the RSS feed - Build 2016
$a = ([xml]$rss.downloadstring("http://s.ch9.ms/events/build/2016/rss/mp4high")) 
$b = ([xml]$rss.downloadstring("http://s.ch9.ms/events/build/2016/rss/slides")) 

# Video quality default is high; you can select regular (mp4) or lower quality (mp3)
#$a = ([xml]$rss.downloadstring("http://s.ch9.ms/events/build/2015/rss/mp4")) 
#$a = ([xml]$rss.downloadstring("http://s.ch9.ms/events/build/2015/rss/mp3")) 


# ********** download the decks **********
try { 
    $b.rss.channel.item | foreach {   
	    $code = $_.comments.split("/") | select -last 1	   
	
	    # Get the url for the pptx file
	    $urlpptx = New-Object System.Uri($_.enclosure.url)  
        $urljpg = New-Object System.Uri($_.thumbnail.url)

        # make the filename readable
        $filepptx = $code + "-" + $_.creator + " - " + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-").Replace("<", "").Replace("|", "").Replace('"',"").Replace("*","")
	    $filepptx = $filepptx.substring(0, [System.Math]::Min(120, $filepptx.Length))
	    $filepptx = $filepptx.trim()
        $filejpg = $filepptx

	    $filepptx = $filepptx + ".pptx" 
        $filejpg = $filejpg + "_960.jpg"

	    if ($code -ne "") {
		     $folder = $code + " - " + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-").Replace("<", "").Replace("|", "").Replace('"',"").Replace("*","")
		     $folder = $folder.substring(0, [System.Math]::Min(100, $folder.Length))
		     $folder = $folder.trim()
	    }
	    else {
		    $folder = "NoCodeSessions"
	    }
	
	    if (-not (Test-Path $folder)) { 
		    Write-Host "Folder $folder dosen't exist. Creating it..."  
		    New-Item $folder -type directory 
	    }
	
	
	    # Make sure the PowerPoint file doesn't already exist
	    if (!(test-path "$downloadlocation\$folder\$filepptx")) { 	
		    # Echo out the file that's being downloaded
		    $filepptx
		    $wc = (New-Object System.Net.WebClient)  

		    # Download the pptx file
		    $wc.DownloadFile($urlpptx, "$downloadlocation\$filepptx")

            # download the jpg but don't want to break if this doesn't exist; hence the nested try blocks
            try {
                $wc.DownloadFile($urljpg, "$downloadlocation\$filejpg")
            }
            catch {
                Write-Host "Jpeg $filejpg doesn't exist ... eating the exception and moving on ..."
            }
        
		    mv $filepptx $folder 
            mv $filejpg $folder 
	    } #endif
	} #end-loop foreach

    Write-host "*************** Downloading all the decks complete ***************"
}
catch
{
    Write-host "Oops, could not find any slides."
}

# ********** download the videos **********
$a.rss.channel.item | foreach {   
	$code = $_.comments.split("/") | select -last 1	   
	
	# Grab the URL for the MP4 file
	$url = New-Object System.Uri($_.enclosure.url)  
	
	# Create the local file name for the MP4 download
	$file = $code + "-" + $_.creator + "-" + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-").Replace("<", "").Replace("|", "").Replace('"',"").Replace("*","")
	$file = $file.substring(0, [System.Math]::Min(120, $file.Length))
	$file = $file.trim()
	$file = $file + ".mp4"  
	
	if ($code -ne "") {
		 $folder = $code + " - " + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-").Replace("<", "").Replace("|", "").Replace('"',"").Replace("*","")
		 $folder = $folder.substring(0, [System.Math]::Min(100, $folder.Length))
		 $folder = $folder.trim()
	}
	else {
		$folder = "NoCodeSessions"
	}
	
	if (-not (Test-Path $folder)) { 
		Write-Host "Folder $folder) dosen't exist. Creating it..."  
		New-Item $folder -type directory 
	}
	
	# Make sure the MP4 file doesn't already exist
	if (!(test-path "$folder\$file")) { 	
		# Echo out the  file that's being downloaded
		$file
		$wc = (New-Object System.Net.WebClient)  

		# Download the MP4 file
		$wc.DownloadFile($url, "$downloadlocation\$file")
		mv $file $folder
	}

    #Try and get the Sessions text description
	$OutFile = New-Item -type file "$($downloadlocation)\$($Folder)\$($Code.trim()).txt" -Force  
    $Category = "" ; $Content = ""
    $_.category | foreach {$Category += $_ + ","}
    $Content = $_.title.trim() + "`r`n" + $_.creator + "`r`n" + $_.summary.trim() + "`r`n" + "`r`n" + $Category.Substring(0,$Category.Length -1)
    add-content $OutFile $Content		
} #end-loop foreach

Write-host "*************** All Done! ***************"

bash and Windows 10 on Fire!

OK, now this is cool – not only is bash on fire, but I can miracast directly from Windows to another device.

The first video shows a few basic shell commands and then catches fire!

And this second video – essentially miracasts the same video you just saw on my TV without any special adapters. The TV is connected to the network and is showing a channel. Windows RS1 (“Anniversary Edition”) can find that on the network (from a Surface Book) and directly stream to that. The TV automatically switches over the input from cable and shows the video; and when I stop, it switches back to the cable input. Sweet. 🙂

Unity and Visual Studio

Have been playing, a little with the new Visual Studio “preview” version (the installation of which is super smooth and takes waaaaay less time!). And as part of that saw the Unity Debugger option. Was this always there or is that new? Or did the Unity Tools beta add it? Interesting times to start playing with this, primarily for AR/VR and #HoloLens.

image