使用DA14531简单多线程

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
9个帖子/ 0新
Last post
joachimkr
Offline
Last seen:2个月6天前
Joined:2018-07-06 08:58
使用DA14531简单多线程

Hello,

I have written an application with Keil IDE, transferring RFID reader results by notification of a subscribing node. The reader is part of my hardware system. Hardware handling is started, after a client requested to be notified by value change on his reader.
That is working, but it blocks any other activity.
Now, I need a hint / simple example, how I can accomplish the following:

Another, identical node may be instructed, to use this one as relay. This is a substitute for mesh and needs to fit into the small RAM, too. So I want to build a tree, where nodes near the root have somehow priority, but allow to forward the source and read result information. The DA14531 has no support for MESH and this is totally OK with me. I just need to serve more than one GATT service channel using the same connection. And, I need to support 3 or more connections, where I supervise the network with a node, which uses GATT services to instruct connections. No automatism, I want control about connections and accept a resulting priority.
我想,我需要能够,使用另一个gatt通道/服务,将我的参数和开始活动放在那里,而我的主要活动仍在继续。
我已经观察到的是,在启动我的主循环后,在启动RFID后,没有其他GATT服务则再工作。
我用LED开关打开或关闭了它。直到我开始我的通知,它正常工作。启动时,LED切换GATT服务不再可到达。
I noticed, the advertising of services also stops - which is fine in principal. But I see it as an indication, that any other activity is impossible. My number of connections is set to 1. But is this the showstopper, or are there more?
The same connection is used to both services, but my RFID loop consumes anything. How can I suspend it, to serve further GATT services?
为什么我的第一次通知服务占领entire system? (The code has polling nature, interrupt from the RFID frontend is currently not available)
As a first step, I want to be able, to use my LED switching service, while the RFID reader is running.

Thanks for help and hints!
joachim

P.S. A backgrounder: Any node like PC or Raspberry seems to limit the number of connections. Some people have figured out, this is in the range of 7 connections, simultanously. I need to connect around 100 devices. The traffic will be small enough, to pass notifications from the mates.

设备:
PM_Dialog
Offline
Last seen:2天10小时前
Staff
Joined:2018-02-08 11:03
嗨Joachimm,

嗨Joachimm,

感谢您在线的问题,并享受您对我们的乐趣产品的兴趣。雷电竞官网登录

让我检查一下,我会回复你。

Des the DA14531 act as a Central or as a Peripheral?

同时,请看看DA14585 / DA14586 - DA14531多级示例SW example.

此示例演示了单个外设如何连接到多个中心。DA14531能够支持最多3.此外,它还展示了如何根据不同的连接保持不同的特征值。

Thanks, PM_Dialog

joachimkr
Offline
Last seen:2个月6天前
Joined:2018-07-06 08:58
Hello,

Hello,
这实际上是一个有趣的例子,它显示了SDK ROM功能过载的预期困难。我的第一个答案是:
我的设备可以采用外围角色作用,广告所有服务和一个(完全有能力的)设备,如覆盆子PI,然后可以向所有设备写下整个管弦乐队的连接参数,因此任何将构建并保持最多3个连接。一个向上,2向下。从向下接收的数据被向上转发。
Does that explain my idea? The two downward devices connect to the upward device.

您是否看到我的设备的单线行为难以?我需要一种方法来将控件返回到库代码,因此它将提供多个GATT服务,我的某种方式轮询代码,目前将永远运行和独占。

Thanks a lot,
joachim

PM_Dialog
Offline
Last seen:2天10小时前
Staff
Joined:2018-02-08 11:03
Hi Joachim,

Hi Joachim,

>>然后可以向所有设备编写整个管弦乐队的连接参数,因此任何将构建并保持最多3个连接。

关于这句话,你能澄清一下吗?因此,单个外围设备将同时连接到3个居民。因此,外围设备应将连接参数更新到所有3个连接的中心?

Thanks, PM_Dialog

Hi Joachim,

>>然后可以向所有设备编写整个管弦乐队的连接参数,因此任何将构建并保持最多3个连接。

关于这句话,你能澄清一下吗?因此,单个外围设备将同时连接到3个居民。因此,外围设备应将连接参数更新到所有3个连接的中心?

Thanks, PM_Dialog

joachimkr
Offline
Last seen:2个月6天前
Joined:2018-07-06 08:58
Hello,

Hello,

您误解了一下,我的意图是,每个设备都有3个并发连接。2作为中央,为了将信息从下面的订购外围设备中转发,1中的一个外围的角色到下一个上层。结果是一系列树结构,其中我具有“网格”的基本功能 - 在较高的级别将其消息快速发送到最终中心。
正如我发现的那样,限制似乎在最高级别的7个并发连接附近。这意味着,我可以构建二叉树。
The setup of this tree structure needs a mastering device, which just organizes the network.

Any DA14531 would need to support two peripherals and an upper central node.
Configuration (in terms of Bluetooth MAC addresses) would be set by a dedicated application and would be kept in nonvolatile memory.

这更清晰吗?
谢谢你的支持,
joachim

PM_Dialog
Offline
Last seen:2天10小时前
Staff
Joined:2018-02-08 11:03
嗨joachimkr,

嗨joachimkr,

是否有可能共享您的应用程序的高级框图,以便我们可以更好地理解它?

Thanks, PM_Dialog

joachimkr
Offline
Last seen:2个月6天前
Joined:2018-07-06 08:58
Hello,

Hello,
Yes, of course. The DA14531 doesn't support mesh, so I search for a circumvent. I can live with a tree of devices, where some are near central, some are leafs. Leafs send their events, value changes to upper next level. There, it is forwarded, to next and so on. Finally, the device next to the consuming (non-DA14531) device sends anything coming from lower levels - and it's own value changes. My circumventing implementation needs a configuration, at the network setup. A managing device sends the connection data and role in this setup to any of the devices. They store this in nonvolatile memory. That is acceptable, because it is usually done just once. Does this make sense ?

Greetings,
joachim

PM_Dialog
Offline
Last seen:2天10小时前
Staff
Joined:2018-02-08 11:03
嗨joachimkr,

嗨joachimkr,

为延迟道歉。DA14531能够支持最多3个连接。但是,它不可能同时起到外围和中央。您可以执行角色切换。

Thanks, PM_Dialog

joachimkr
Offline
Last seen:2个月6天前
Joined:2018-07-06 08:58
Hi,

Hi,
感谢您对角色交换机的建议。我可能会发现,这意味着什么。

目前,我的计划是提供允许叶节点的GATT服务,将事件/值传递到两个服务,左右,其中值被接受,另一个服务,父节点(两者都具有相同的角色)可以注册待通知。
The result is a binary tree, where the root nodes send notifications for /in permission for/ all subtree units.

每个单元充当转发器,可以通过通知生成自己的值。
Bandwith is not a problem. I can also compress data to 20 bytes per notification.

The setup of this tree might need switching, but I assume (tell me, if I am wrong) that all tree units can stay in Peripheral mode, except for connection establishment. I would like a solution, to distribute the MACs of the tree units in a setup phase and trigger the tree units to store these permanent. I have a flash device attached.

顺便提一句。TI有一个应用笔记,具有类似的想法。但我不明白设置阶段,并希望我自己的详细信息,以某种方式手动设置。

此致,
joachim