locked
[Win8.1 Universal app] Bixolon R200II Bluetooth communication socket error and strange UUID

    Question

  • Hi, all,

    I'm trying to connect a universal app to a Bixolon R200II SPP printer via Bluetooth. The test machine is a Windows 8.1 up-to-date Lenovo with two Bluetooth dongles (the built in one BT 2.0 and USB Hama BT 4.0+LE adapter), with the first having Lenovo drivers and the second is with native support. The printer is paired to the computer and lists "Serial Port Service" in its Bluetooth services list.

    Initially I was not being able to discover the printer at all, despite having "name:serialPort" and "serviceId:00001101-0000-1000-8000-00805f9B34fb" in the app manifest. It turned out that the printer is listed with some strange UUID of "00000000-deca-fade-deca-deafdecacaff". Adding it yielded success into discovering the printer.

    The real problem is that for some reason I cannot create the Rfcomm service and connect to the printer on the await RfcommDeviceService.FromIdAsync() call. Reaching this line the code throws a System.Exception exception with message "A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself. (Exception from HRESULT: 0x80072738)".

    The code that I use:

    RfcommServiceId printerServiceId = RfcommServiceId.FromUuid(new Guid("00000000-deca-fade-deca-deafdecacaff"));
    DeviceInformationCollection services = await DeviceInformation.FindAllAsync(RfcommDeviceService.GetDeviceSelector(printerServiceId));
    
    if (services.Count > 0)
    {
        var service = await RfcommDeviceService.FromIdAsync(services[0].Id);
        ...
    }

    Anyone has idea what is wrong?


    • Edited by Kamka Wednesday, November 26, 2014 5:23 PM
    Wednesday, November 26, 2014 5:20 PM

Answers

  • So, just for other people's reference - I found the solution.

    Turns out the Bixolon R200II has something called "iOS Mode". And as we well know, nothing Mac-ish follows references and requirements. So, when in this mode we get a fake "Serial Port" profile with GUID of . Switching the printer to "Normal mode" yields the standard SPP ("Serial port (SPP) 'Serial Port Profile'") service to appear and be accessible by using "name:serialPort" and "serviceId:00001101-0000-1000-8000-00805f9B34fb" GUIDs.

    Case closed :)

    • Marked as answer by Kamka Thursday, November 27, 2014 8:51 AM
    Thursday, November 27, 2014 8:51 AM

All replies

  • So, just for other people's reference - I found the solution.

    Turns out the Bixolon R200II has something called "iOS Mode". And as we well know, nothing Mac-ish follows references and requirements. So, when in this mode we get a fake "Serial Port" profile with GUID of . Switching the printer to "Normal mode" yields the standard SPP ("Serial port (SPP) 'Serial Port Profile'") service to appear and be accessible by using "name:serialPort" and "serviceId:00001101-0000-1000-8000-00805f9B34fb" GUIDs.

    Case closed :)

    • Marked as answer by Kamka Thursday, November 27, 2014 8:51 AM
    Thursday, November 27, 2014 8:51 AM
  • Hi Kamka,

    Thank you for sharing solution here. This will help other community member.

    Good Job!

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Thursday, November 27, 2014 9:06 AM
    Moderator