Windows iot device raspberry 2 usb composite device - win-universal-app

We have raspi 2 windows iot device. I m trying to communicate from raspi 2 to usb composite device.(could be serial, or usb).
From windows universal application can succesffull communicate with Windows.Devices.SerialCommunication lib.
But I don't want to use universal solution. Best way for my case to use Windows IoT Core Console application. I could't find any way to use(Windows.Devices.SerialCommunication) communicate from core console application. Can I add this reference or do you have any other lib to use at
console application.
Thank you for your time.

Related

node.js BLE API for windows requires external dongle

I'm developping a node.js electron app and I need to decide if our Hardware will feature BLE or standard Bluetooth.
I found a couple of APIs (bleno & noble) for this purpose. However for Windows OS both of these require me to use an additional bluetooth usb adapter (used WinUSB & Zadig).
To put it bluntly, is there any way to communicate with a BLE device on a Windows OS using node.js without using an external dongle?
It seems like standard bluetooth is just way less of a hassle. Thanks!
Found a package which solves this issue using a UWP-to-noble bridge:
https://www.npmjs.com/package/noble-winrt
It works just like noble but supports BLE connectivity on Windows without the need for a dongle and complicated driver set-ups!
I was able to easily integrate it on Electron as well, problem solved! :)
The official Bluetooth API on Windows is built for Windows Runtime, https://learn.microsoft.com/en-us/microsoft-edge/windows-runtime. It supports Javascript but I'm not sure if you need a specific js environment. If you don't get that working, you should write or use a native binding for node.js.

Accept inbound Bluetooth pairing request programmatically on an RPi3 running windows IoT

I am using an RPi3 to control a machine which will be able to communicate with android and other bluetooth devices. I used the Rfcomm Bluetooth chat example to establish bluetooth communication. The issue that I am facing right now is that my android app cannot connect to windows app until the two devices pair and I need to go on the windows device portal to accept the pairing request for the RPi. Is there a way to automate this programmatically so that the windows app can accept all inbound pairing requests?
You could programmatically pair/unpair request on RPi3 running with windows IoT. Please refer to scenarios 8 and 9 in this uwp sample: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing.
It seems that windows 10/ Windows 10 IoT Core does not support DevicePairingKinds.None.I have tested to pair with parameter as DevicePairingKinds.None,it is failed. You can set as DevicePairingKinds.ConfirmOnly to work around.
deviceInfoDisp.DeviceInformation.Pairing.Custom.PairAsync(DevicePairingKinds.ConfirmOnly);

Device to device communication in Windows 10 IoT Core

What technologies are recommended when we want to do Device-to-device communication in an IoT Scenario? Does Windows 10 IoT Core have support for this type of communication? Could I use AMQP connections for this?
Device to device communication can happen on multiple levels. Setting up an AMQP server might be feasible using implementations like Apache QPid but this doesn't seem like a responsibility device should be bothered with. You could run an API server on a W10 IoT Core device for other devices to communicate with.
There are specific standards like AllJoyn that lets us communicate device with eachother and Windows IoT Core has native support for this. Take at look at the samples to find out if this fits your scenario: https://developer.microsoft.com/en-us/windows/iot/win10/samples/alljoynjs

Stream Audio to Google Cast Audio from Raspberry Pi

I'd like to send audio directly from a Raspberry Pi to a Google Cast Audio device.
I'm happy to do this via a fileserver hosted on the Pi (or similar) but no external services can be used- no internet connection is available during operation. Is this possible?
Using Google Cast SDK, you would need a "sender" application to initiate the launch of your app on a cast device and sending the instructions to that. After that is done, your (html5) application on the cast device can continue the playback on its own. Whenever the application on the cast device is brought down, you would need a sender to restart this process. The platforms supported by Cast SDK are Android, iOS and chrome, so RP is not among the supported platforms. Another issue in your scenario is that any cast device requires internet connectivity; without one, such device will not boot up completely and won't be useful.

Can PeerFinder class of .NET communicate with mobile phone devices through laptop via bluetooth?

I doubt the limitation of PeerFinder class in .NET. Can it make connection only with other laptops when implemented on laptop and phone to same phone when implemented on phone? Is it limited only to communicate with Windows OS devices, or is it able to communicate with any bluetooth device irrespective of OS?
Kindly, help me if you are sure of this class capabilities. I have seen the implementation of 32Feet.NET but my question is limited about PeerFinder class and its limitations.
Start from this link, in which you can find several useful links for WinRT communication (the suggested protocol to use from Windows Phone 8 to communicate using NFC or Bluetooth)
http://blogs.ugidotnet.org/Nick60/archive/2012/12/30/win-rt-proximity-communication.aspx
You have two possible scenarios:
App to Device: you can connect a Windows Phone 8 device to third party devices (for example a LEGO robot or car audio systems) Bluetooth/RFCOMM (that is serial port profile, for the emulation of RS232 serial connections).
App to App: for communications between Windows Phone 8 devices and also Windows 8/Windows RT devices!
The PeerFinder class is the base class for discover another instance of your app on a nearby device and create a socket connection between the peer apps by using a tap gesture or by browsing:
http://msdn.microsoft.com/en-us/library/windows/apps/br241203.aspx
Hope this helps!
Unfortunately, it seems that the only way to stablish a socket connection using Bluetooth between a WP8 app and a Windows 8 app is by triggering the connection using NFC tap gesture. Although the PeerFinder documentation suggests that you might be able to specify AlternateIdentities to advertise peers running on both devices, it seems that Windows 8 relies on WiFi Direct, while WP8 uses Bluetooth.
So, if you are not able to use the NFC tap gesture between both devices to trigger the connection, you might not be able to pair both apps running on the different devices.
See this thread for more info.

Resources