Project Rome - accessing Xbox console - c#

I am experimenting with Project Rome and I am facing some issue with finding my Xbox console.
I can find my tablet, another laptop but I cannot find my Xbox console - it is a developer kit. I also tried to switch it to retail console but no difference.
private RemoteSystemWatcher remoteSystemWatcher;
remoteSystemWatcher = RemoteSystem.CreateWatcher();
remoteSystemWatcher.RemoteSystemAdded += OnDeviceAdded;
remoteSystemWatcher.Start();
private void OnDeviceAdded(RemoteSystemWatcher sender, RemoteSystemAddedEventArgs args)
{
}
I also tried to find Xbox console via HostName or IP, unfortunately it raises exception. Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)). It seems like the same issue with this method as described here.
await RemoteSystem.FindByHostNameAsync(new HostName("...."));

It seems like a problem with specific version (10.0.14393.2113) of OS which I had installed before.
Right now I installed following version and it works without any problems.
Xbox One Recovery Update [14393.2152.161208-1218] December 14, 2016
Even this works if I use IP address of my Xbox console (with hostname it does not work).
await RemoteSystem.FindByHostNameAsync(new HostName("...."));

Related

BluetoothLEAdvertisementWatcher. No events on Hololens

I'm trying to send GPS-coordinates from an Android device to the Hololens by BLE-advertisments.
The problem as far as i see, the events from BluetoothLEAdvertisementWatcher do not trigger on the Hololens.
I have tried copy-paste both this implementation
and this on the receiver side, no received event.
This is the current implementation in Unity, i have implementated the same functions in a blank UWP-C# project and deployed directly on the Hololens with the same result.
private void StartWatcher()
{
void OnAdvertisementReceived(object sender, BluetoothLEAdvertisementReceivedEventArgs eventArgs)
{
Debug.Log("Event triggered"); // switched to Write-line on the C#->UWP implementation
}
void OnAdvertisementStop(object sender, BluetoothLEAdvertisementWatcherStoppedEventArgs eventArgs)
{
Debug.Log("Event triggered"); // switched to Write-line on the C#->UWP implementation
}
try {
BluetoothLEAdvertisementWatcher watcher = new BluetoothLEAdvertisementWatcher();
watcher.AdvertisementFilter.Advertisement.ManufacturerData.Add(GetManufacturerData());
watcher.Received += OnAdvertisementReceived;
watcher.Stopped += OnAdvertisementStop;
watcher.Start();
Debeug.Log("Started"); // switched to Write-line on the C#->UWP implementation
} catch (Exception e){
}
}
private BluetoothLEManufacturerData GetManufacturerData()
{
var manufacturerData = new BluetoothLEManufacturerData();
manufacturerData.CompanyId = 0X06EF;
return manufacturerData;
I know the advertisements are sent, becuase if i debug the native UWP-application directly in Visual Studio on the PC(even as ARM64), everything works. The events are triggered.
The watcher.Status reports "started" on the Hololens
Even if i disable the Bluetooth on the HoloLens while the application are running, the stop-event are not either triggered.
If i check watcher.Status after i disable the Bluetooth, the status reports aborted but the Stoped-event are not recieved.
The capability is activated following this article
Now to where it gets wierd.
During one of my first tries i had my application running on the Hololens as i've tried to remove the pairing between the Android device and HoloLens.
The android devices appears as two devices on the Hololens, device name as one and "LE"+MAC as the other.
Sometime during the time i was in the Bluetooth settings and removed the two adapters from the cellphone, the HoloLens recieved three separate advertisments. The data in the advertisments was also confirmed from my Android device becuase during my inital tries i parsed the data.
But thats it, i have tried to replicate this for 10 hours today, Pair and unpair the different adapters in different stages while listening for recieve events but without luck.
On my PC, it do not matter if the adapters are paired or not.
I have tried both .NET Standard 2.0 and .Net 4.x as API Compatibility Level.
I have set breakpoints in both the receive and Stoped event-handler as i was afraid that the calls from the Event-functions was the problem. As far as i see, we never reach the implemented events.
Any suggestion on what might be the next step to check is appreciated.
The Hololens Build is 19041.1144.
Ok, so i can now recevie advertisments on the HoloLens by running the example provedied by Microsoft.
I could not receive any events at all and no updates was available in the settings, so i've reinstalled all applications in the Microsoft Store and that seems to be the solution for me. After that and a restart of the HoloLens i was able to recieve advertisements from my PC.
Another tip for other tip for people trying to recieve advertisements on the HoloLens 2.
When i was able to receive advertismements from my pc i saw that the advertisments from my Android device was not recieved on the HoloLens, but recieved on the PC.
The advertisments on my PC was of type NonConnectableUndirected and from my Android device ScannableUndirected.
I needed to change to "AdvertisingSet" and in the AdvertisingSetParameters set both isConnectable and isScannable to false to be able to send NonConnectableUndirected.
Now the HoloLens recevies the advertisments from my Android device.

How to use ParseServer with Xamarin in 2019?

I have an IOS app (Objective C), which uses Sashido.io implementation of Parse, which works perfectly. Now I want to develop an Android app, which should connect to the same ParseServer.
Since I am familiar with C# and Visual Studio (Mac version) is my second home, I thought that Xamarin was the way to go - but I might be wrong;
For the last couple of days, I have been struggling to get any Xamarin multiplatform projects to connect to my parse server.
I have tried the SharedLibrary approach (.NET Standard2) with the Parse.NETStandard2 (v2.0.0) Nuget-package, but I had no luck with that, it crashes every time I would try to do anything Parse-releated - stack trace hinting some library is missing, but I am unable to locate the missing link.
I have now tried the Multiplatform-library with the Parse (v1.7.0) nuget-package as well, but with no grether luck;
The following code crashes with Parse-authorization error.
I have double/tripled checked both the ApplicationId and the Server-url.
ParseClient.Initialize(new ParseClient.Configuration
{
ApplicationId = "Xxxxxxxxxxxxxxxx",
WindowsKey = "undefined",
Server = "https://pg-app-xxxxxxxxxxxxxx.scalabl.cloud/1/"
});
try
{
ParseUser currentUser = ParseUser.LogInAsync("realusername", "realpassword").Result;
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(String.Format("EXCEPTION: {0}", ex.Message));
}
I have googled everything remotely related to my issue, but I haven't found any newer blogs or tutorials - letting me to believe that either, it is normally not an issue or that Xamarin and parse-server simply is a no go.
I would appreciate any pointers in the right direction for getting an Xamarin-app to connect to Parse.
I am not too familiar with the multiplatform environment.

C# client for CISCO IP Phones, that using tapi3lib, doesn't work in win 10

Our company uses Cisco telephony. And we have a little program on user-s PC wrote by our partner. This program tracks incoming calls and for the call rises record in our CRM-System. This program uses tapi3 (it is COM-object from deep inside of windows). Unfortunately, it doesn't work on PC with Windows 10.
Search a lot for causes of this problem didn't give me even some a bit useful answers. And indeed, I am coming to the opinion, that this library by itself have some problems with working with it on Windows 10.
Well I tried a lot of things, before wrote this question. Tried to use other versions (later versions) of tapi driver for cisco (CiscoTSP). Tried to use other instances of tapi3. Tried to make this program work on other machines with win10. And now I have no result.
This small example demos the problem.
using System;
using System.Collections.Generic;
using TAPI3Lib;
namespace TestTAPI
{
class Program
{
static void Main(string[] args)
{
var tapi = new TAPIClass();
tapi.Initialize();
List<String> names = new List<string>();
foreach (dynamic address in (tapi.Addresses as ITCollection))
{
names.Add(address.AddressName);
}
}
}
}
In result of execution I have empty List of Addresses, but it shouldn't be empty.
At least I should be see standard tapi Addresses, but I didn't. Moreover I see in "Control Panel" -> "Telephone and modem", that I have more Addresses then only standards.
Really don't know what is going wrong. Maybe I miss some details?
Or may be I can change using tapi3 to something else to make that work.
Assuming it works on an Win8 or Win8.1 (you did not specify). Have you checked your drivers config? If you save a config setting and then open the config page in "phone and modem" has it reset to default?
TAPI drivers default registry key for storing their config is here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony
Some (not all) flavors/edition/versions of Windows 10 have removed the access rights to the registry key from the built-in system account that runs the telephony service.
I don't know about Cisco specifically, but we have encountered several TAPI drivers from various manufactures that "save" their settings without giving an error, but in fact have not changed because of this issue.
Open your services.msc and check the Telephony (TapiSrv) service account, then check if it has access to the registry key.

How to troubleshoot remote UWP AppService problems?

I'm playing around with remote UWP AppServices in C# and I run into a very early roadblock: Getting a RemoteSystem instance.
I followed the tutorial on https://msdn.microsoft.com/en-us/windows/uwp/launch-resume/communicate-with-a-remote-app-service with my own code and I tried out the RemoteSystems sample as part of https://github.com/Microsoft/Windows-universal-samples
Unfortunately, the result is always the same.
First I request access to remote systems:
RemoteSystemAccessStatus status = await RemoteSystem.RequestAccessAsync();
This is successful: status has the value RemoteSystemAccessStatus.Allowed.
Next, I create a HostName instance:
var deviceHost = new HostName("computer2");
Then I want to get a RemoteSystem instance:
RemoteSystem remoteSystem = await RemoteSystem.FindByHostNameAsync(deviceHost);
This throws an exception:
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
What I tried
Searching the web doesn't bring up much at this time (remote UWP AppServices are too new)
The event log doesn't have anything interesting in it
The Windows firewall seems to be configured correctly (this seems to be done automatically by Visual Studio)
What I'm looking for
One of my computer was upgraded from Windows 7 to Windows 10, the other from Windows 8.1 to Windows 10. So there is a chance my computers are "misconfigured" in some way (I remember the unnecessary task scheduler entries for Windows Media Center...)
My question: What are recommended practices to troubleshoot these kinds of problems? Are there tools that can help me? Right now I'm now even sure where to start looking...

Autodesk.Inventor.Interop.dll on WinServer 64-bit 2012 R2 - interface non registred

i'm trying to develop a very simple web application based on the Autodesk Inventor engine.
I'm developing on Win7 64-bit with Visual Studio 2010 and Inventor 2015 and everything it's working perfectly on debugging but when i publish on the web server i get the error:
HRESULT: 0x800401F3 (CO_E_CLASSSTRING)
and the message
interface string not valid
The C# code line where i receive the error is:
Inventor.Application _invApp = (Inventor.Application)Marshal.GetActiveObject("Inventor.Application");
The full code for my test is the following:
using Inventor;
using System.Runtime.InteropServices;
namespace web_debug_cs
{
public partial class debug_runinventor : Ssytem.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e) { startInventorApplication(); }
private void startInventorApplication()
{
string sDebug = string.Empty;
try
{
Inventor.Application _invetorApp = (Inventor.Application)Marshal.GetActiveObject("Inventor.Application");
sDebug = "Success!!!";
}
catch (Exception ex) { sDebug = "UNSUCCESS!<br />" + ex.Message; }
lblAnswer.Text = sDebug;
}
}
}
I get this code directly from the Inventor 2015 guide, but (repeat) on the local machine everything it's ok, but not on the server.
I checked the permission (everyone: full control)
I registred manually with regsvr32 (impossible to register) both on system32 and SysWOW64
I registred on the framework 32 and 64 with regasm (registration success!)
I set the web site to work with 32-bit application
but nothing could solve this issue.
I thought about the possibility to import manually the dll with pInvoke, but with no success...
I googled a lot, i tryed to ask to Autodesk with no success.
I started Inventor on the Server to verify if it works, and it work perfectly!
Could anyone try to help me?
Thanks in advance for any kind reply!
Emanuele
I would not expect this to work due a simple reason: the webpage is running as a service, and Inventor runs as a user-level application. Imagine the following: the web page is requested by 100 clients/browsers, your app will launch Inventor 100 times. But more than that, the webpage is not on the user-level.
The best chance to work would be: your webpage receives a request (let's say create a .ipt file), create a record that the action must be performed (for instance, a new .txt file with instructions or a database entry), a Windows services detects the request and launch Inventor to process it. In this case you'll have a queue where requests are placed by your webpage, but processed later.
But I must say this is not supported nor allowed on the EULA, please review it.

Categories