3 posts / 0 new
Last post
System.InvalidCastException: Specified cast is not valid.
Hi team, this is Amit. I have poly v5200 series headset  and getting below exception while run sample code (found on plantronic form).    System.InvalidCastException: Specified cast is not valid.    at Interop.Plantronics.COMSessionClass.GetActiveDevice()    at PLTCSharpSample.Program.AttachDevice()        

Hello - I'm getting this same error on any attempt to call GetActiveDevice from my application's COMSession. I can retrieve the SessionId and PluginName for the session, so I believe the ComSessionManager is correctly intialized and the session is correctly registered. Like Amitkumar above, i've tried this using the sample code. Running .Net 6.0 on Windows 11. Thanks

Hi again - I solved this for myself after carefully reading the FAQ. The question at https://developer.plantronics.com/faq-page#t101n138 contains the following note: "NOTE: if you have paired your headset directly to your host computer without a dongle this is not supported by the Plantronics SDK. You must unpair and pair with the headset's dongle." After unpairing directly and attaching the BT600 dongle the sample code worked perfectly. Hope this helps someone else!

Add new comment