Copilot is your AI companion
Always by your side, ready to support you whenever and wherever you need it.
This is the core OS image that powers Windows IoT platform on Raspberry Pi 2 & 3. Windows 10 IoT Core is the smallest version of the Windows 10 editions that leverages the Windows 10 common core architecture. This edition enables building low-cost devices with fewer resources.
Important! Selecting a language below will dynamically change the complete page content to that language.
-
File Name:
14393.0.160715-1616.rs1_release_amd64fre_IOTCORE_RPi.iso
This is the core OS image that powers Windows IoT platform on Raspberry Pi 2 / 3. Windows 10 IoT Core is the smallest version of the Windows 10 editions that leverages the Windows 10 common core architecture. This edition enables building low-cost devices with fewer resources. Development for Windows 10 IoT Core leverages the Universal Windows Platform.
Learn more about Windows 10 IoT Core here.
-
Supported Operating Systems
Windows 10
Operating system
• Windows 10 (Build 10240 or higher) -
- Click the Download button on this page to start the download.
- Click Save to save this program to disk.
- Follow the rest of the instructions on the Setup Raspberry Pi page.
Привет, Хабр.
Наверное каждый разработчик на определенном этапе задумывался о собственном IoT-проекте. Internet of Things сейчас поистине вездесущ и многим из нас хочется попробовать свои силы. Но не все знают, с чего начать и за что браться в первую очередь. Сегодня давайте посмотрим, как легко и непринужденно запустить свой собственный IoT-проект под Raspberry Pi 2, используя Windows 10 IoT Core и DeviceHive.
Деплоим Windows 10 приложения на Raspberry Pi 2
Для начала давайте установим Windows 10 IoT Core на Raspberry Pi. Для этого нам потребуется Windows 10 IoT Core Dashboard, который можно взять вот здесь. Там же можно при желании скачать отдельно ISO-образ, но особого смысла в этом нет — инструмент сделает это за вас.
Затем мы загружаем образ на misroSD-флешку.
Подключаем флешку к Raspberry и включаем. Первую загрузку ОС придется подождать, мгновенной она, конечно, не будет. Когда устройство «оживет» — подключаем Raspberry к локальной сети по Ethernet. Снова открываем Windows 10 IoT Core Dashboard и видим в списке «Мои устройства» заветную строчку. К слову, можно обойтись и без проводного подключения – список WiFi-донглов, поддерживаемых Windows 10 IoT Core, находится тут.
Далее нам понадобится Visual Studio 2015. Если она у вас все еще не установлена (хотя вы бы вряд ли читали эту статью в таком случае), можно скачать Community Edition.
Создаем новый или же открываем существующий Windows Universal проект. Кстати, если в проекте не нужен UI, можно создать Headless Application, выбрав тип проекта Windows IoT Core Background Application.
Выбираем деплой на Remote Machine.
Вводим адрес Raspberry. Посмотреть его можно на стартовом экране Win10 IoT Core или в Windows 10 IoT Core Dashboard.
Собственно, Internet of Things
Раз уж у нас статья о embedded — «моргать светодиодами» придется в любом случае. Хорошо, что мы имеем дело с DeviceHive, у которого заготовлены инструменты на все случаи жизни и все платформы. Поэтому светодиод будет виртуальный и тоже на .NET.
Клонируем master-ветку DeviceHive.NET репозитория с GitHub. На момент написания статьи рабочие примеры для Win10 IoT были именно там.
Открываем solution DeviceHive.Device и в файле Program.cs проекта VirtualLed настраиваем доступ к песочнице DeviceHive.
using (var service = new RestfulDeviceService("http://playground.devicehive.com/api/rest"))
{
// create a DeviceHive network where our device will reside
var network = new Network("Network WPNBEP", "Playground Network", "%NETWORK_KEY%");
//...
}
Если вы интересуетесь IoT, но по какой-то немыслимой причине еще не обзавелись DeviceHive Playground – это можно сделать здесь.
А управлять нашим «светодиодом» будет… Нет, пока не Raspberry, а клиент виртуального светодиода. Пример находится в проекте VirtualLedClient солюшена DeviceHive.Client. Его тоже нужно настроить в файле Program.cs:
var connectionInfo = new DeviceHiveConnectionInfo("http://playground.devicehive.com/api/rest", "%ACCESS_KEY%");
Самое интересное
Наше приложение на Raspberry Pi будет не просто кнопочкой включения/выключения светодиода, а практически полноценной админкой всех IoT-устройств нашей DeviceHive-сети. При желании, конечно, можно упростить его до той самой «кнопочки» или наоборот расширить, например, до клиента, управляющего роботом телеприсутствия.
Готовое приложение находится в том же репозитории, в solution DeviceHive.WindowsManager.Universal. Не будем останавливаться на нюансах гайдлайнов Win10 – корни приложения растут еще из Win8. Не будет тут и MVVM – все и так знают, как его применять. Давайте сосредоточимся на главном: нам нужна консоль мониторинга и управления устройствами, подключенными к DeviceHive, под Windows 10 на Raspberry Pi2.
Для DeviceHive реализовано три клиентских библиотеки:
- DeviceHive.Client – для «большого» .NET 4.5 и выше. Использует WebSocket4Net.
- DeviceHive.Client.Portable – для Windows 8.1 и Windows Phone 8.1. Использует нативные WebSockets.
- DeviceHive.Client.Universal – для всех редакций Windows 10, в том числе для Win10 IoT Core. Именно она используется в нашем приложении.
Наследуем ClientService от DeviceHiveClient и инициализируем его сеттингами:
DeviceHiveConnectionInfo connInfo;
if (!String.IsNullOrEmpty(Settings.Instance.CloudAccessKey))
{
connInfo = new DeviceHiveConnectionInfo(Settings.Instance.CloudServerUrl, Settings.Instance.CloudAccessKey);
}
else
{
connInfo = new DeviceHiveConnectionInfo(Settings.Instance.CloudServerUrl, Settings.Instance.CloudUsername, Settings.Instance.CloudPassword);
}
current = new ClientService(connInfo, new RestClient(connInfo));
А также указываем не использовать LongPolling, а только WebSocket, дабы не упираться в лимит одновременных HTTP-запросов:
SetAvailableChannels(new Channel[] {
new WebSocketChannel(connectionInfo, restClient)
});
Загружаем список девайсов и группируем их по сетям в MainPage:
var deviceList = await ClientService.Current.GetDevicesAsync();
var networkList = (await ClientService.Current.GetNetworksAsync()).FindAll(n => n.Id != null);
foreach (Network network in networkList)
{
var devices = deviceList.FindAll(d => d.Network?.Id == network.Id);
if (devices.Count > 0)
{
networkWithDevicesList.Add(new NetworkViewModel(network) { Devices = devices });
}
}
А вот и наш виртуальный светодиод:
Переходим на DevicePage, подгружаем информацию о нем:
Device = await ClientService.Current.GetDeviceAsync(deviceId);
Переключаемся на вкладку с уведомлениями. Уведомления отправляются от управляемого устройства к управляющему устройству. В нашем случае – от VirtualLedClient к VirtualLed.
Инициализируем автоподгружающийся список с «бесконечным» скроллом:
NotificationFilter filter = new NotificationFilter()
{
End = filterNotificationsEnd,
Start = filterNotificationsStart,
SortOrder = SortOrder.DESC
};
var list = new IncrementalLoadingCollection<Notification>(async (take, skip) =>
{
filter.Skip = (int)skip;
filter.Take = (int)take;
return await ClientService.Current.GetNotificationsAsync(deviceId, filter);
}, 20);
Если не определена конечная дата фильтрации списка нотификаций, подписываемся на новые уведомления, которые будут приходить через вебсокет:
notificationsSubscription = await ClientService.Current.AddNotificationSubscriptionAsync(new[] { deviceId }, null, async (notificationReceived) =>
{
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
lock (NotificationsObservable)
{
if (!NotificationsObservable.Any(c => c.Id == notificationReceived.Notification.Id))
{
NotificationsObservable.Insert(0, notificationReceived.Notification);
}
}
});
});
Если попробовать переключать наш виртуальный светодиод, то уведомления о его новом состоянии тут же отобразятся в списке.
Если поменять настройки фильтрации, то автоподгружающийся список заново инициализируется с новым фильтром.
Теперь пришла очередь вкладки команд. Команды похожи на нотификации, но направлены от управляющего устройства к управляемому, а также могут иметь статус и результат выполнения.
CommandFilter filter = new CommandFilter()
{
End = filterCommandsEnd,
Start = filterCommandsStart,
SortOrder = SortOrder.DESC
};
var list = new IncrementalLoadingCollection<Command>(async (take, skip) =>
{
filter.Skip = (int)skip;
filter.Take = (int)take;
return await ClientService.Current.GetCommandsAsync(deviceId, filter);
}, 20);
Аналогично подписываемся на новые команды:
commandsSubscription = await ClientService.Current.AddCommandSubscriptionAsync(new[] { deviceId }, null, async (commandReceived) =>
{
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
lock (CommandsObservable)
{
if (!CommandsObservable.Any(c => c.Id == commandReceived.Command.Id))
{
CommandsObservable.Insert(0, commandReceived.Command);
}
}
});
});
Поскольку мы делаем инструмент не только для мониторинга, но и для управления устройствами в DeviceHive сети, нужно реализовать возможность отправки команд:
var parameters = commandParams.Text != "" ? JObject.Parse(commandParams.Text) : null;
var command = new Command(commandName.Text, parameters);
await ClientService.Current.SendCommandAsync(deviceId, command, CommandResultCallback);
При отправке команды мы подписались на ее обновление методом CommandResultCallback. Обрабатываем результат выполнения команды:
foreach (Command cmd in CommandsObservable)
{
if (command.Id == cmd.Id)
{
// Command class doesn't implement INotifyPropertyChanded to update its result,
// so old command is replaced by command with result:
var index = commandsObservable.IndexOf(cmd);
commandsObservable.RemoveAt(index);
commandsObservable.Insert(index, command);
break;
}
}
Чтобы не копировать команды вручную, нужно предусмотреть клонирование команд. Выделяем, клонируем, если нужно – редактируем, отправляем.
Задача выполнена! Как видите, Raspberry Pi 2 c Windows 10 IoT Core и DeviceHive – отличное решение для практически любой задачи в контексте Internet of Things. Прикрутите пару кнопок, dashboard и подключите Raspberry Pi к телевизору в гостиной – мониторинг и управление умным домом готово. Купили лишних Raspberry? Не вопрос, библиотека DeviceHive.Client умеет работать не только в качестве управляющего клиента, но и в качестве управляемого девайса – реализуем Headless Application, подключаем датчики/реле и устанавливаем Raspberry Pi по дому. Ограничивает вас лишь ваша фантазия.
Заключение
Появление Windows 10 IoT Core – это именно то, чего ждали embedded-разработчики. Когда ресурсов даже самого мощного микроконтроллера на .NET Micro Framework (для которого, кстати, тоже есть реализация DeviceHive) не хватает, а ставить полноценный компьютер на Windows – все равно, что стрелять из пушки по воробьям, то Windows 10 IoT Core – настоящее спасение. И пусть пока есть нюансы с аппаратным ускорением графики и недостатком драйверов для некоторых USB-устройств – это всё простительно. Ведь еще недавно мы только мечтали, чтобы Windows-приложения, работающие на настольных ПК и планшетах запускались не только на телефонах, но и на микрокомпьютерах. А теперь – это реальность, добро пожаловать в «сегодня».
Об авторе
Антон Седышев — Senior .NET-разработчик «DataArt »
В IT работает с далекого 2003, к команде DataArt присоединился в 2012. Ранее занимался разработкой веб- и мобильных проектов, автоматизицией логистических процессов на складах крупной международной компании. Сейчас выступает в роли ведущего .NET-разработчика и идеолога Microsoft-сообщества DataArt. Занимается разработкой приложений на Windows Phone и Windows 10, сервисом DeviceHive и embedded-технологиями вообще. В свободное время работает над собственным OpenSource embedded-проектом по интеграции .NET Micro Framework устройства в автомобили BMW.
With the release of the Raspberry Pi 2, Microsoft had announced they will provide a version of Windows 10 for the Pi. This has happened now. According to Microsoft, this is only possible with the PC version of Win 10, but it also works on Windows 8.1, as I show in this tutorial.
Windows 10 IoT is not a classic Windows version, but an embedded developer version running on both display and non-display devices. “IoT” stands for “Internet of Things” and describes the increasingly common devices with Internet access (no computers) – in some coffee machines.
Required Hardware Parts
- Raspberry Pi
- microSD card (at least 8GB, optimal Class10)
- optimal: CardReader (often Windows 8.1 /10 does not recognize the microSD cards of the internal CardReader)
- Ethernet cable (allegedly also works with a wireless stick, I tried two, none of which was detected)
Download image and install software
First, you have to download the ISO file (around 500MB), which is here: http://go.microsoft.com/fwlink/?LinkId=616847
You have to mount this file (IOT Core RPi.ISO) (Win 8.1/10 does it automatically with a double-click). Inside is the installer Windows_10_IoT_Core_RPi2.msi, which you perform and follow the steps. After installation, you can unmount the ISO file.
Now you have to search for and open IoTCoreImageHelper.exe via the Windows Start Search. There you select the SD card and the path to flash.ffu (this is located under C:\Program Files (x86)\Microsoft IoT\FFU\RaspberryPi2)
After flashing, you can remove the SD card. It is strongly recommended to do this by using the “Safely Remove Hardware” tool (in the taskbar, at the bottom right).
Windows 10 IoT booting
After the microSD card is in the Pi and the monitor, network cable and mouse are connected, you can start it. After a short setup you will be shown the language options, after which you will be on the main screen:
Your PC should be on the same network as the Pi. At the top of Tutorials are a few short introductions to Windows IoT and a sample tool how to make an LED blink. Since this Windows version, as I said, has no other graphical interface, it is completely controlled by Visual Studio. The easiest way is to follow the indicated steps on the Pi.
According to Microsoft, every Windows 10 app that is compiled for ARM platforms will also be usable on Windows IoT and vice versa. Keep in mind that most devices do not have GPIOs, so the benefits are rather dubious. However, the speech recognition from Microsoft could be interesting in any case. Microsoft presented some sample projects here.
© Images: Microsoft
Windows 10 IOT Core is a version of Windows 10 that is optimized for small devices with or without a monitor and runs on Raspberry Pi 3 and 3, the Sword Dragon 410c and the Minnow Board MAX. The Windows 10 IOT core builds outstanding solutions with a rich, scalable Universal Windows Platform (UWP) API. If you are new to Windows 10 IOT, this article describes how to install Windows 10 IOT on the Raspberry Pi 3.
If you do not know, you can get a free upgrade if you are currently running Windows 8, Windows 8.1 or Windows 7. However, Microsoft also makes a completely free version of Windows 10 for the Raspberry Pi 3/3, This ultra-low-cost circuit board computer. It is also very easy to get. We installed the IOT version of the Windows operating system within two and a half hours.
All you need is a Raspberry Pi 3/3 mini SD memory card with an SD adapter (Microsoft recommends a minimum of 8GB) and a Windows computer with an internet connection and an SD card slot or USB card reader. Unfortunately, one of the steps requires an .EXE file and the process will not work with Apple Computer.
One thing to note before you’re so excited is that the Raspberry Pi 3 runs a special developer’s version of Windows 10 designed for IOT devices. This is a very easy way to run the application with a full version.
Step-by-Step process to install Windows 10 IoT on the Raspberry Pi 3
Step 1: Get the Board and Software tools Ready
Collect the requirements
- PC running Windows 10
- Raspberry pie 5v Micro USB power supply, the current is at least 1.0A. If you plan to use more power-consuming USB peripherals, use a higher-current power supply (> 2.0A).
- 8GB Micro SD Card – Class 10 or higher.
- HDMI cable and monitor Ethernet Cable
- Micro SD Card Reader – Due to the problem of most built-in mini SD card readers, we recommend using an external USB micro SD card reader
Step 2: Install the Windows 10 IOT Core Software’s
- Download the Windows 10 IOT Core image from here. Save the ISO to a local folder.
- Double-click ISO (IOT Core Raspberry Pi.iso). It will be automatically mounted as a virtual drive so you can access the content.
- Install Windows_10_IoT_Core_RPi3.msi. After the installation is complete, flash.ffu will be located at C: Program Files (x86) Microsoft IOT FFU RaspberryPi3.
- After the installation is complete, eject the virtual CD-ROM – This can be done by navigating to the top-level folder of File Explorer, right-clicking the virtual drive and selecting “Eject”.
Step 3: Put the Windows 10 IOT Core Image ISO files on Your micro SD Card
- Insert the Micro SD card into the SD card reader.
- Use IoTCoreImageHelper.exe to refresh the SD card. Search for “WindowsIOT” from the Start menu of your current window so then you select the shortcut “WindowsIoTImageHelper”.
- Select the SD card to flash, then provide the location of the FFU to blink the image.
- Safely remove the USB SD card reader by clicking “Safely Remove Hardware” in the taskbar or by finding the USB device in File Explorer, right-clicking and selecting “Eject”. Failure to do so may result in corruption of the image …….
Step 4: Hook Up Your Raspberry pi 3 board
Insert the prepared micro SD card into the Raspberry Pi 3 (the slot is shown with arrow # 1 in the figure below).
Connect the local network cable to the Ethernet port on the circuit board.
Make sure your development computer is on the same network.
Connect the HDMI monitor to the HDMI port on the board.
Connect the power supply to the micro USB port on the board.
Step 5: Boot Windows 10 IOT Core
Windows 10 IOT Core will be started automatically after power is connected. This process will take a few minutes. After seeing the Windows logo, the screen may turn black for about a minute – do not worry, it is up and running. You may also see a screen prompting you to choose a language for your Windows 10 IOT Core device – connect the mouse and select your options, or wait about 1-2 minutes for the screen to disappear.
Once the device is up, Default App will launch and display the IP address of RPi3.
Step 6: Connecting to Your Device
You can use Windows Device Portal to connect to your device through your favorite web browser. In addition to advanced diagnostic tools, this Device Portal provides will be configuration and device management help you to troubleshoot with real-time performance of Windows IOT devices such as raspberry pi 3.
Step 7: Finish Off
Now you should be ready with a windows 10 raspberry pi. If you have any doubt just ask in the comments.
Installing #Windows IOT core on #Raspberry Pi 3
You may also like to read these articles
How to Build your own Super Computer with Raspberry Pi 3 Cluster
How to Build Project using CO2 Sensor with Raspberry pi Introduction
Hope this article “How to install Windows 10 IoT on the Raspberry Pi 3” helps you to install Windows 10 IoT on the Raspberry Pi 3. If you have any query, feel free to comment.
With the recent release of the Raspberry Pi 4, people are once again flocking to the single-board computer. It’s still just as small as it has always been, but it’s more capable than it has ever been before.
Most people opt to install a Linux distribution on a Raspberry Pi, especially since this is what the Raspberry Pi Foundation itself recommends. That said, if you’re going to be using the Raspberry Pi for projects in a Windows environment, you may prefer to install Windows 10 IoT Core instead.
A Word of Warning
Windows 10 IoT Core doesn’t officially support the Raspberry Pi 4, or even the previous Raspberry Pi 3 Model B+ for that matter. Given the similarities of the hardware, you should be able to install the software on the newer hardware the same way, but you can’t guarantee that it will run perfectly.
For the following steps, you’ll need a standard Windows 10 installation running on a desktop or laptop. You’ll also need to be a Microsoft Insider.
First, you’ll need to download Windows IoT Core from the Microsoft website. We’re going to be using the Windows IoT Core Image Helper app.
Right-click the downloaded file to mount the image, then double-click on the .msi installer. Make sure the SD card you plan to use with your Raspberry Pi is inserted and ready to write.
Run the app and select the folder where the downloaded image with the .ffu extension is located. You’ll see a dialog showing the progress of writing to the SD card. Once this is successful, it’s time to boot the Raspberry Pi for the first time.
Boot the Image on Your Raspberry Pi
Insert the SD card into your Raspberry Pi and power it on. Make sure you have a wired Ethernet connection. This is a slow process, so be prepared to wait for ten minutes. Once it powers on, you’re technically running, but you may have boot problems, and you won’t have Wi-Fi or Bluetooth.
Fixing the Installation
Back on the standard Windows 10 installation you used to download the image, you’ll now want to download and run the Windows IoT Dashboard. When it boots, you should see a list of the Windows 10 IoT devices connected to the network, and this should include your Raspberry Pi.
Double-click the device once you see it to go to its Properties page, then click the link to the device portal at the bottom. This will launch the Windows Device Portal for the Pi.
From here, click on Apps, then Apps Manager, then Check for Updates. The device will download and apply updates. You’ll want to repeat this process until there are no updates remaining.
Once this is finished, you’ll want to change the default controller driver to improve performance. Click Devices on the left side of the Device Portal, select “Direct Memory Mapped Driver,” then click “Update Driver.” The device should reboot, and you’ll have a much better time using it.
Looking for Project Ideas?
Now it’s time to get started building a project. You can either consult Microsoft’s documentation or just get started building, depending on whether you know what you want to do.
The DIY community has built plenty of interesting projects on the Raspberry Pi. Many of them were built on top of Linux, but not all. If you’re looking for somewhere to start, take a look at out recent rundown of three interesting IoT projects, one of which is built using Windows 10 IoT Core.
Kris Wouk
Kris Wouk is a writer, musician, and whatever it’s called when someone makes videos for the web.