Click here to Skip to main content
15,847,077 members
Articles / Desktop Programming / Win32

Spokes SDK 5-Minute Quick-Start Blog!

15 Mar 2013CPOL2 min read 15.1K   2  
Spokes SDK 5-Minute Quick-start blog!

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

Image 1

Hi All,

Adding Plantronics support to your app is as easy as this!

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Plantronics.UC.SpokesWrapper;
namespace SpokesQuickStartDemo
    class Program
        static Spokes spokes;
        static void Main(string[] args)
            spokes = Spokes.Instance;
            spokes.PutOn += spokes_PutOn;
            spokes.TakenOff += spokes_TakenOff;
            spokes.Connect("Spokes Quick Start");
            Console.WriteLine("Press enter to quit...");
            spokes.PutOn -= spokes_PutOn;
            spokes.TakenOff -= spokes_TakenOff;
        static void spokes_TakenOff(object sender, WearingStateArgs e)
            Console.WriteLine("Headset is not worn");
        static void spokes_PutOn(object sender, WearingStateArgs e)
            Console.WriteLine("Headset is worn");

The above command line application will show you when the headset is put on and taken off, like this:

Image 2

Background info

The Plantronics Spokes SDK contains all you need to integrate support into your app for Plantronics headset, speaker and multiline devices.

Spokes is a software runtime that talks to the Plantronics device on your behalf and exposes a set of APIs to program the device. Read more.

Spokes 2.7 has 3 main APIs:

  • COM Service, being a Win32 COM interface typically used from C++ apps
  • .NET Interop for COM Service, allowing C#/VB.NET apps to connect to above COM Service
  • REST Service, being a web service offering access to Spokes from language of your choice via HTTP requests

Note: iPlugin API will not be available in next major Spokes release. If you are using it you need to migrate to COM Service or .NET Interop for COM Service / SpokesWrapper.cs.

More detail: Integrate to Spokes in 5-minutes (or less)!

  1. Install Spokes software from Plantronics | Support | Downloads & Apps | Plantronics (don't bother with the SDK yet, you don't need for this quick-start)
  2. Launch Visual Studio
  3. Choose File | New | Project
  4. Choose Visual C# | Windows | .NET Framework 4 | Console Application (must be .NET 4 or higher to use Spokes C# API)
    Image 3
  5. In the Solution Explorer in the project References, right-click and Add Reference:
    Image 4
  6. Navigate to the Spoke runtime folder: C:\Program Files (x86)\Plantronics\PlantronicsURE, and select Interop.Plantronics.dll
    Image 5
  7. Right click on the reference in the project and choose properties, and set Embed Interop Types to False:
    Image 6
  8. Now download a copy of SpokesWrapper.cs, a source file that does a lot of hard work for you!
  9. Right click on project in Solution Explorer and click Add Existing Item
    Image 7
  10. Navigate to the location of the SpokesWrapper.cs file you just downloaded and click Add. This should now be added to your project in Solution Explorer.
  11. You can now write your program code like the sample at the top of this blog!
    • Visual Studio project is attached below...
  12. For a more comprehensive sample using the wrapper please refer to the Spokes Easy Demo.
    • This demo includes softphone call control, mobile call control / mobile caller id, multi-line control, serial numbers as well as status of: wearing sensor, proximity, docking, softphone calling, mobile calling, mute and multi-line.

Have fun! See you soon ...

This article was written by Lewis Collins. Lewis became a member of the Plantronics Engineering team in August 2011. In this role he provides software consulting and expertise internally across teams and to external development partners who want to integrate with the Plantronics SDK kits and headset products. Previously Lewis gained experience in a wide range of software engineering activities and technologies, working in the telecommunications and public safety sectors as a software engineer at Integraph, a consultant for Altran Technologies UK and as a software engineer for Teleca Ltd.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
United States United States
Today’s smart devices and applications have untapped potential in the realm of context-aware computing. Plantronics is making it possible for its audio devices to deliver contextual information to a range of applications through Plantronics headsets. The Plantronics Spokes SDK allows developers to create a range of business applications that will have the power to change the way we communicate and collaborate.

Please check out our DevZone for more info on the Spokes SDK:

Comments and Discussions

-- There are no messages in this forum --