代码之家  ›  专栏  ›  技术社区  ›  Bruno Reis

蓝牙服务器应用程序接受来自移动设备的连接

  •  1
  • Bruno Reis  · 技术社区  · 14 年前

    我想开发一个桌面应用程序(在Windows上,最好是在.NET上),它接受来自移动设备的蓝牙连接,然后将命令发送给这个应用程序。

    我以前从没用过蓝牙。我已经寻找了这些应用程序的开源示例,但我运气不好。实际上,我在Microsoft上找到了一个用于WindowsCE上蓝牙堆栈的托管(.net)包装器,但在我的Windows7上无法使用它。

    你知道讨论这个话题的好文章吗?关于这个主题的任何其他信息来源?我应该从哪里开始?

    谢谢。

    1 回复  |  直到 14 年前
        1
  •  1
  •   alanjmcf    14 年前

    一个快速的vb代码示例显示了我们的32feet.net共享源蓝牙(以及obex和irda)库的使用:

    Dim lsnr As New BluetoothListener(MyConsts.MyServiceUuid)
    lsnr.Start()
    ' Now accept new connections, perhaps using the thread pool to handle each
    Dim conn As New BluetoothClient = lsnr.AcceptBluetoothClient()
    Dim peerStream As Stream = conn.GetStream()
    ...
    

    来自用户指南 http://www.alanjmcf.me.uk/comms/bluetooth/32feet.NET%20--%20User%20Guide.html

    从中获取库 http://32feet.codeplex.com/

    希望你觉得它有用。任何问题,请在这里或我们的论坛上提问。 http://inthehand.com/forums/default.aspx?GroupID=29