Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: mentosan on July 04, 2019, 02:27:16 PM

Title: Error 0x00050015
Post by: mentosan on July 04, 2019, 02:27:16 PM
Hi

I know this is a very special case, but I am trying my luck anyway :)

Got our client/server solution working, no issues whatsoever.
We also use our product internally deployed as an App-V package.
Very strangely when running virtualized I get 0x00050015 when trying to enumerate characteristics:

* the call below works well, I am able to list and find our custom service
client.ReadServices(wclGattOperationFlag.goReadFromDevice, out wclGattService[] services);
* the call below gives 0x00050015
client.ReadCharacteristics(service, wclGattOperationFlag.goReadFromDevice, out characteristics);

Any idea what could cause that 0x00050015 error in this case?  I suspect some wrong (restrictive) COM isolation model on our side when building the package. Do you use any COM calls internally?

Thank you,
Radu


Title: Re: Error 0x00050015
Post by: Mike Petrichenko on July 04, 2019, 03:34:36 PM
Hi,


Unfortunately this error indicates that something wrong but driver does not provide any additional information about the error.

Try to change goReadFromDevice to goNone.

Yes, there are lot of COM calls because all WinRT API is actually COM based API. But there should no be any COM issues cause Bluetooth Framework does all preparation internally.
Title: Re: Error 0x00050015
Post by: mentosan on July 04, 2019, 04:00:25 PM
OK, it is what I was afraid of. There are several COM isolation modes available for App-V, most probably I've chosen a wrong one.
We have problems using the Windows Location Services too, and I saw in their code, they also use COM.

Thank you very much, at least I know in which direction to search -> COM.

Title: Re: Error 0x00050015
Post by: Mike Petrichenko on July 04, 2019, 04:10:36 PM
Probably yes, that can be a problem.
Title: Re: Error 0x00050015
Post by: mentosan on July 04, 2019, 06:34:00 PM
If you mentioned the goNone, could you please elaborate on the difference between goReadFromDevice and goNone. TBH from the docs I didn't fully understand and thought goReadFromDevice is always 'safe' and delivers fresh data :)
Title: Re: Error 0x00050015
Post by: Mike Petrichenko on July 04, 2019, 06:53:43 PM
There are 3 options:

goNone - uses default drivers settings (driver decide what is better), also should be used if device is "not connectable";
goReadFromCache - cache value and returns it without asking device for value;
goReadFromDevice - always ask device for current value.