0 Replies Latest reply on Jan 16, 2017 10:33 AM by Tim Pidgeon

    ZD410 bluetooth communication in Windows UWP

    Tim Pidgeon

      Hello,

      I am trying to send ZPL commands to my ZD410 over Bluetooth with a Raspberry Pi 3 running Windows 10 IoT.

       

      To test connecting to it from my Windows 10 PC, I have successfully paired the printer to my PC. If I can get it running on my PC, I will pair it with my RPi3 and try to remote debug from Visual Studio.

       

      I am trying to connect as specified here: printing - Windows IoT - Zebra Bluetooth Printer - Stack Overflow . I have tried scanning to find the device but the method returns an empty DeviceInformation collection. My code is below:

       

      public sealed partial class MainPage : Page
          {
              public MainPage()
              {
                  this.InitializeComponent();
              }
      
      
              private async void button_Click(object sender, RoutedEventArgs e)
              {
                  var devices = await DeviceInformation.FindAllAsync(RfcommDeviceService.GetDeviceSelector(RfcommServiceId.SerialPort));
      
      
                  if (devices.Count() == 0)
                  {
                      textBox.Text = "No devices found.";
                  }
                  else
                  {
                      foreach (var device in devices)
                      {
                          listView.Items.Add(device.Name);
                      }
                  }
              }
          }
      

       

      I have added the device capabilities to my manifest:

      <Capabilities>
          <Capability Name="internetClient" />
          <DeviceCapability Name="bluetooth.rfcomm">
              <Device Id="any">
                <Function Type="name:serialPort"/>
              </Device>
          </DeviceCapability>
        </Capabilities>
      

       

       

      Any help would be appreciated.

      Thanks!