开发者

32feet.NET: Problem with Bluetooth Listener and GUID value

I am using 32feet.NET library to create a Bluetooth service. But the listener fails to start with an invalid argument was supplied message. This is possibly related to the GUID value supplied. I generated the GUID at design time by using the Tools--->Create Guid menu option in Visual Studio.

Below I am posting the code snippet.

public static void Main()
    {
        BluetoothListener lsnr = new BluetoothListener(MyConsts.MyServiceUuid);
        lsnr.Start();//It throws an开发者_运维百科 Invalid arguement supplied exception
        BluetoothClient conn = new BluetoothClient();
        conn = lsnr.AcceptBluetoothClient();
        Stream peerStream = conn.GetStream();

    }
class MyConsts
{
    public static Guid MyServiceUuid = new Guid("{1D69EDBD-9862-43fe-A242-98322AE764A4}");   
}

Any Ideas??


I think something is wrong with the system. Unplug your dongle and try again, or reboot and see if its fixed.

If that doesn't help let me see the full stack-trace of the exception.

(BTW there's no need to initialise conn).

Alan (32feet.NET maintainer)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜