心草草 发表于 2023-2-1 08:35:18

请问 【蓝牙通讯】 可以一对多吗?

官方教程里的【蓝牙通讯】 服务器打开时 客户A进入 服务器可以和客户A相互发送客户B进入后 客户A可以发信息 客户B发信息服务器收不到客户A(手机)退出后再进入 服务器就收不到所有客户消息了
但服务器只能向最后一个进入的客户发送消息
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOMAAACdCAYAAABGps/9AAAXRklEQVR4Ae2dT89k11HG5wMgxAIEXwEpWSEkr8dsEJ8AyAqUPZBERCAWSMjir4QlFlgojlhEBsQCBZSIkLBBgiBAgcDCmpjxROMoYGc8MzaZGNvSRfWaX8/jmqpzz7233+nbp2uko/r3VN3uc+rp2+/bb03feOaZZ6ZTrGnFP3uc9u8Uj7eueZo+uaR9v3GKJ2uEunnz5qpVZCxSnKJnn8Y1hyPjnTt3wjtn5u/dZM03PVq+lub4WNn1ouJ7YBgyRuTIfGxCFlc/WJPmz2wfA4dfa6KDKVnEtB5YTcYv/c2Xp+effz5dFs+ajLepD+4/nJYse2s79zaV5vfXzvweZ/ZSbC9ecapHj6F8l0fQ1WQ0Ir773nvpsnjWUC0yZj9LGml7yOjJNNf0UTzy6XOxeLYU53Wtq7rHlX15RLQzPzkZlXwQzt8tDUOsdWekwZH2BE33i2ZXHD5y1MYHHokfrPeb7X0RFl/JyyQh535yMkbEU4KiryFjRgSePGSZk4o3vYUHi+QxRDlgSl42CTn/TWS8d+8700/9/EtPLPOvfZvqyam2EXPpnZEnahJiqM/rkMb7NV/rZDr5WVz9YEteNik3k9GIF621ZORO6GXPnXFrM0MQpK+H32S2shzzk+91n1P2ZZJyExnv3r07ZauXjEo6CKd3Q/X13BkzkuDPGr2HKGCQnlTq5zrqy3SwJS+ThJz7yckYEU8Jig4pe96m2pOj8ZHq48njUww+xaCDQyrWfOrXHPxInwe2ZJEx/Qii1Rx7/Jxxrtl9XG19rkv9mut1raW64cz2Pp9f9uUQdPWdcUuT2N2NO95Smd0ZaewemT12zfUYSKOYTPe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HJyGjEermzZurVpFxf01UxD7OmQxFRv9LBH6xgMyaxudFOMVQz8u5vChevuM08gj7OBQZ7UA8aTgk9eMD70mFrTiw6tOaqmcY9ZdeJPQ9sJqMWz7P423qg/sPpyXL3toueZuqBFGdTcCH9H7slrRcn6944kiLoSMVX/rlknQ1GbfMDbbImP0saaQ9Nhm18SGGSfVHumK9rnhqIYmprTrxkpdJyKORccncoJJRyQfh/N3SMMSyO6M1NcuaOWpyjdPwa3xae6nuH5vm85hKFhln7wjaJFu+B1HJGBFPCYo+R0YeW29zG24O6zHg8UeSx6GSPHxqq068ZJFxFRnXzA22yOjJqbYRM7sz0sA0t8logUNGGHxgkOY3HTmnUyeSviZ2ycskop37prepa+cGW2TkTujlmjujksaerLe9T+OqQxB8JrMFViV5+NRWnXjJyyTkJjLqeNKSuUElo5IOwundUH1L7ow0NM2OxI80f7bAIKmBNH+mb8kht+RlkfJoZFRizs0NKhkj4ilB0SFlz9tUJYgnjG9wxWY6OcSRWtt86vc5ETbLIbdkkbHrZ8e9fs7oCYGN9A0OISIZYb2vZftrYiMtV/VWrYqNT8z/A+l6hAYSoQnzAAAAAElFTkSuQmCC
{:2_28:}纯小白啊(照葫芦画瓢 修改后 无法编译)



创世魂 发表于 2023-2-1 19:05:25

。。。蓝牙都是点对点的吧。。你的功能需要用hp, 通过tcp协议通讯。

心草草 发表于 2023-2-1 22:28:00

创世魂 发表于 2023-2-1 19:05
。。。蓝牙都是点对点的吧。。你的功能需要用hp, 通过tcp协议通讯。

{:3_59:}点对点也可以啊 大概知道了 就是不知道怎么保存链接的的客户 再逐个收发
我太菜了 像看天书一样 {:3_53:}Socket对象 这些个是不是类似远程服务的 客户ip端口啊
不能像视窗一样 每步 调试输出 还能明白个大概{:3_60:}

创世魂 发表于 2023-2-1 22:50:05

心草草 发表于 2023-2-1 22:28
点对点也可以啊 大概知道了 就是不知道怎么保存链接的的客户 再逐个收发
我太菜了 像看天书一样...
直接用hp啊,非常方便。肯定要端口啊。

心草草 发表于 2023-2-2 09:35:04

创世魂 发表于 2023-2-1 22:50
直接用hp啊,非常方便。肯定要端口啊。

开始看例子 也是准备用网络通讯的 但app不能在同一局域网呢
hp是要在同一网络下吧 就是不能连wifi呢{:3_53:}
再研究 研究

再问一个问题模板里的系统最低要有 安卓28版 安卓21版 我的手机22版
是不是吧模板里高出的28版本删了 就可以用21版了吗?
页: [1]
查看完整版本: 请问 【蓝牙通讯】 可以一对多吗?