Permanent Install of Relase Windows IoT App to Raspberry Pi - raspberry-pi

My question is how do I permanently install/deploy my release version of a Windows IoT Core application to my Raspberry Pi SD Card?
I have written a little application that I am fairly happy with for now, so I want to be able to install so my Pi boots it on startup and it can be left to run for weeks on end if need be. Right now when I deploy release to the "Remote Device" option it disconnects when it has the network cable removed/visual studio is closed etc. basically it just acts as if it was still in debug.
Thanks in advance for any advice.

Once you've deployed it remotely via Visual Studio at least once, you should be able to set it by going to the Pi's Windows Device Portal (by navigating to http://your-pi's-ip-address:8080 in your web browser). Once there, go to Apps -> Find your app in the list -> Select "Set as Default App".
Alternately, you can remote in with PowerShell:
Open an Administrative PowerShell prompt on your computer.
Start the WinRemoting service with net start WinRM.
Add the Pi to WinRemoting's list of TrustedHosts: Set-Item WSMan:\localhost\Client\TrustedHosts -Value <Pi's machine-name or IP Address>.
Now, start a remote session: Enter-PSSession -ComputerName <Pi's machine-name or IP Address> -Credential <Pi's machine-name or IP Address>\Administrator.
It'll ask you for your Pi's password. If you left it as the default, it's p#ssw0rd (but I hope you didn't!)
List your installed applications with iotstartup list.
Find your app's App ID and use iotstartup add headed <appid> to set it as your startup app. If it's a headless app, you'd instead use iotstartup add headless <appid>.
Hope that helps!
Source for all this is on Microsoft's developer docs for IoT: https://developer.microsoft.com/en-us/windows/iot/docs/setupdefaultapp

Related

Windows 10 connect to wifi AP without active user

I am running into an issue connecting to a wifi AP using Windows 10 PC.
The AP is located on an embedded device, amd uses WPA2-personal security. The AP can be enabled by our testsetup for certain testcases. The idea is to let Windows connect to the AP in these tests.
I am able to manually connect to the AP when it is active. However, when I try it when there is no active user (e.g. headless/CI setup), I get an error.
The command and reply I use when manually connecting (using a saved WiFi profile named "Test_AP.xml"):
PS C:\projects> netsh wlan add profile user=current filename=Test_AP.xml; netsh wlan connect name=Test_AP interface="Wi-Fi"
Profile Test_AP is added on interface Wi-Fi.
Connection request was completed successfully.
When I try with no activ user (e.g. headless/CI setup), the reply is:
Profile Test_AP is added on interface Wi-Fi.
The network specified by profile "Test_AP" is not available to connect.
I was able to reproduce it, by adding a sleep command before executing the powershell commands, and immediatelly disconnecting my remote session to the PC. When I reconnect after a while, I see this error.
I already tried adding to profile to all users, but to no avail.
Does anybody know why Windows is not able to connect to a wireless network in this case? Or any inspiration what I can improve?
Kind regards

Remote Connection to "Raspberry Pi" via "Windows IoT Remote Client" leads to a white blank screen

I have Windows 10 IoT installed on a Raspberry PI 3 B, and I am trying to connect to it via the Windows IoT Remote Client running on my laptop. (+)
As it mentioned here and here, there is a related known issue in Windows 10 IoT on build number 16299.
Consequently, when I try to connect my Raspberry PI via the Remote Client, it shows me only a white screen. However, it makes me able to use the mouse and keyboard connected to my laptop to control the Raspberry Pi.
In the description of the known issue, it says: "Drivers must be manually copied and registered on the device.".
Then my question is what do you know about the drivers that should be copied manually?
And is there any way except than waiting for next release of windows 10 IoT?

Turn off raspberry Pi with Kodi remotely

Let me explain my problem: I have a raspberry Pi with Kodi installed and I use it with a IPTV service. This service only allow me to use it in one device at a time and sometimes I want to use it on my phone.
I'd like to be able to turn off my raspberry remotely so I can watch it in my phone whenever I want. I tried to create a web server that would allow me to run a script that would turn off the device but I can't access it because the raspberry IP takes me to some kodi stuff.
So to sum up, I'd like to go to my raspberry IP with Kodi installed, press a button and turn off the device. The web stuff I can take care of.
Any thoughts?
The only safe way to do this is to have a VPN tunnel that lets you access your internal network. This is much safer than opening up a port to Kodi on your router. It would just attract every bot and hacker out there.
Once you have a working VPN tunnel between your home network and your smartphone, just use a Remote Control App to shut Kodi down cleanly.
You can use a Kodi remote app for your mobile device. E.g. Kore (official remote app for Android) does have a shutdown button.
I think the best and easy way is to install dataplicity in your Raspberry Pi and access via dataplicity web or the app (Android or iOS) to the Terminal and use the command: sudo shutdown -h now or sudo poweroff

How can I remote access into a WinCE client computer from a Windows 2000 system?

I am currently running a server with Windows 2000 and running client computers off the same switch/network which are running Windows CE. I was wondering if there was a way for me to remote access into my Windows CE clients from my Windows 2000 server? Please let me know your thoughts, I greatly appreciate any constructive input.
-Manny
Edit
It doesn't necessarily need to be remote access. If there is a way for me to detect the client, maybe a DHCP change, and then allowing me to run script from the server into the client computer, that would work too! Thank you in advance once again.
Window CE does not have RDP host for other systems to connect but you can use application like CERDisp which connect to your Windows CE / Windows Mobile terminal over active sync and display its screens in a window. You can also use the mouse and keyboard on the desktop to remote control the device the same as if you were using the popup PDA keyboard and the stylus.
We have used it long time back. For some information you can look at http://nicolasbesson.blogspot.in/2007/12/enable-remote-display-application.html
You can download this application from http://www.naurtech.com/wiki/wiki.php?n=Main.ToolsCERDisp
There are additional application like Remote Display that allows to operate the target device's Win CE desktop from a Windows PC. It requires a USB ActiveSync or Ethernet connection. For information you can review at http://developer.toradex.com/knowledge-base/remote-display

Captive Portal - Chillispot | OpenWrt vs DD-wrt

I've been trying to configure a captive portal using DD-wrt and Open-wrt, with my own radius server and I've also tried to configure them using a CSP page (http://worldspot.net).
DD-wrt
My first try was with a TP-LINK WR841N (v7.) and DD-wrt using the web interface. In dd-wrt web interface there is an option in Services -> HotsPot -> ChilliSpot. Here I tried both configurations, using my own server data, and also tried with WorldSpot data, and my issue was the same in both cases:
When I enable Chillispot on the router, I don't get IP assigned, meaning I can't connect to the wifi/lan. It seems the problem is obviusly with the router and It's something like the Chillispot configuration is not working, or the changes are not"applied"
Open-wrt
After some hours trying to make work dd-wrt I think that maybe with open-wrt it was easier to configure, and here I found another problem. After updating my TP-LINK to Open-wrt I realized that I cannot access to the router via WEB, so I have to connect via telnet and ssh to install some packages and make some configurations.
I tried to install "luci" the package for the web gui and I found with some errors:
- First It didn't find the package, and I have to change the /etc/opkg.conf file
- Once I downloaded the package and try to access web I get error uci_load: not found
- Once I fixed the uci package issue, I enable the uhttpd and start it, but when I try to connect via web I get another error "CGI didn't receive any response"
Questions
Someone with more experience than me could point me wich of these softwares is better to have a spot system/captive portal ?
It's possible that in dd-wrt case the configuration of chillispot wasn't applied to the router configuration ?
For open-wrt anyone has same errors with the web interface ?
I've been reading and it seems that it's possible to configurate ChilliSpot via SSH , but the tutorials I found were not very helpfull, anyone can point me to a good tutorial for this ?
I also have a D-Link dir-615 H2 but it seems to be less compatible with open-wrt and dd-wrt than the TP-LINK.
I would be thankfull for any information that can put me in a good direction, thanks!
Some months ago I found a very easy answer for this question about making a captive portal.
The best of this solution is that the router flashing part is very automatized and the Captive Portal configuration is made through a WEB UI very easy to understand and manage
You may also connect through ssh to the router if some software customization is needed, like VLANS
To use this solution your modem should be in this list(At the time the answer is wrote):
Linksys: WRT54G | WRT54GL | WRT54GS
MiniRouter: MR3201A
FonSpot / Fonera (Atheros)
Ubiquiti: Bullet-M | Nano-M | Rocket-M | Airrouter | UniFi | Bullet/Nano/etc/{2/5}
I used this method in several Ubiquiti AirRouters and now it just take me 5 minutes to configure a router for a HotSpot system using FreeRadius.
I tried with FreeRadius installed in a RaspBerry in LAN and also into an VPS through WAN
The steps to flash any of the above routers are:
Download coova-ap.jnlp from here
Open the file with Java Web Start
For Linux systems: sudo javaws coova-ap.jnlp
You have to click Flash CoovaAP and you will see a window like this where you should select your router model:
After the file is downloaded you will see the next window:
Here you should select your network device, usually eth0 (wired) is the best choice, anyways I strongly recommend to click Save firmware to File button to store a backup of the original firmware.
If youre using an Ubiquiti router, before clicking the Start Flashing
you need to:
. If you re using a Ubiquiti device you should put it in TFTP mode by unplugging the POE ethernet cable, and reconnecting it while holding the reset button for 8 seconds. If this doesnt work, you may have to press it for 16 seconds. The LED lights now should flash alternately indicating TFTP mode.
Once you hit Start Flashing and the flash is done, the router will restart and we will be able to access the router using the same Coova software.
Now the Configure CoovaAP button should be clickable and we will see a very fancy interface to configure the router Captive Portal, we will be able to use different HotSpot configurations.
If the button is not clickable make sure the CoovaAP IP is 192.168.1.1
One of the guides that help me most to configure the router using CoovaAP software was HotSpotSystem: Installation CoovaAP guide
On that tutorial you will have more information about some steps and the mainly configuration of the Captive Portal interface. I didn't add the HotSpot part because the question was about which was the best router configuration.
There are some ways to build a captive portal server:
1.
Regarding router compatibility I can only recommend DD-WRT build 22118 or later (coovachilli based dd-wrt).
Following versions are supported: mini_hotspot (broadcom_K26 non-nv60k , non-nv64k!), nokaid, standard, big or mega. Other versions (like mini or micro) don’t contain the hotspot module so they cannot be used for hotspot purposes.
Once you have a such build, you can start a simple Captive Portal with Chillispot.
All what you need is a FreeRadius server & Web Server.
2.
Using OptWARE
Here I used a router Asus RT N16, I've patched it with dd-wrt.v24-18024_NEWD-2_K2.6_mega.bin
The entire tutorial is here.