2

I'm running Windows IoT on a Raspberry Pi.

After I turn on my Raspberry Pi and Windows IoT starts up, I want to automatically begin reading sensor data from a serial port continuously, and also send the data to a SignalR server/hub continuously. I don't need any UI.

I'm new at UWP apps. I want to use a SignalR client to send the data near real-time.

Questions:

  1. Is it possible to use SignalR on Windows IoT? And if yes, how would I do that?

  2. Is there any best practice to read send sensor data and send them to a SignalR Hub in near real time? How can I read and send data continuously?

I just want to run these steps:

  1. Start Raspberry Pi
  2. Start automatically app
  3. Start automatically infinite loop
    • read sensor data
    • send sensor data to a SignalR Hub

I don't know if there is any better way instead of using an infinite loop to read an send data continously.

8
  • So what's the question? How to reduce lag or how to run singnalr?
    – Piotr Kula
    Commented Feb 3, 2016 at 9:56
  • Thank you and welcome to Raspberry Pi Exchange. It seems like the dominant question is if you can actually run SignalR on IoT on the Raspberry Pi.
    – Piotr Kula
    Commented Feb 3, 2016 at 12:26
  • asp.net/signalr/overview/deployment/tutorial-signalr-self-host - You can try and deploy it this way. But not 100% sure if it will work...
    – Piotr Kula
    Commented Feb 3, 2016 at 12:45
  • @ppumkin Yes and also how can I read and send data continuously. I edited my question again. :)
    – CPA
    Commented Feb 3, 2016 at 12:45
  • @ppumkin I also thought about trying signalr.selfhost.
    – CPA
    Commented Feb 3, 2016 at 12:46

1 Answer 1

1

SignalR client is basically installed into your Universal App by running the following package install commands (or using the NuGet GUI)

Install-Package Microsoft.AspNet.SignalR.Client
Install-Package PropertyChanged.Fody

There is an excellent post here with step by step.

http://blog.chrisbriggsy.com/SignalR-Win10-IoT/

I do not think it is easy to get the server side of SignalR to run on Windows IoT yet. It is possible to get the server going with Xamarin Mono on Debian with NoWin HTTP Server. The issue is that SignalR requires to run a dedicated HTTP server and that is not possible on the Core version because of sandboxing... (but maybe that will change or there seem to be some hacks floating about)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.