Cypress技术william hill官网
直播中

李晨灵

7年用户 1428经验值
私信 关注
[问答]

BLE HID服务器设置

让我先解释一下我想要达到的目标(我用的是cy8ckit-042-ble)。
我有两个独立的开发工具模块,我想他们之间的联系和沟通(一个模块作为服务器的一个模块作为客户端藏藏)。
连接应该很简单:那是在配对模式,开始自动对过程直到连接设备服务器搜索。
沟通应该完全独立(配对过程和通信过程),没有主机或PC连接。
到目前为止,我可以设置隐藏客户端使用连接到一个普通的Windows PC的描述符,这实际上是很容易安装(HID鼠标/ HID键盘代码的例子有很大的帮助)。
但现在我想连接到另一个柏模块作为隐藏服务器。我想达到的目标是,把客户端(鼠标为例)可以操作一个领导在把服务器端。这应该作为一个独立的设置。
最后我还想使用从商店一鼠标连接到隐藏的服务器(这是独立的柏树模块)。
简短摘要:
在自动配对客户端发送HID描述符和服务器解释HID描述符和打开一个基于LED的某一事件。
问题:
如何做到这一点(服务器实现)?有一个示例项目吗?
提前感谢,
保罗

以上来自于百度翻译


     以下为原文
  Let me first explain what I want to achieve (I'm using the CY8CKIT-042-BLE).

I have two standalone BLE dev kit modules and I want to connect and communicate between them (one module act as HID server one module as HID client).
The connection should go pretty straight forward: server searches for devices that are in pairing mode and starts auto pair process until connected.
The communication should go entirely standalone (paring process and communications process), no host system or PC is hooked up.

So far I'm able to setup the HID client using the descriptors connecting to a regular Windows PC. This is actually pretty easy to setup (HID mouse / HID keyboard code examples were a great help).
But now I want to connect to another Cypress Module that acts as a HID server. What I want to achieve is that the HID client (mouse for example) can operate a LED on the HID server side. This should work as a standalone setup.
Eventually I also want to be able to use a BLE mouse from the store and hook it up to the HID server (which is the standalone cypress module).

Short summary:
After auto-pairing the client sends HID descriptors and server interprets HID descriptors and turns on a LED based on a certain event.

Questions:
  • How can this be achieved (the server implementation)?
  • Is there an example project?

Thanks in advance,

Paul

回帖(8)

李木木

2018-9-29 16:01:46
嗨,保罗,
我相信您是要求GATT客户设计的。
PSoC Creator包括用于BLE HID键盘和HID鼠标的示例,这些服务器是HID。我不认为有客户端连接到这些设备的例子。
谢谢,
兰吉特

以上来自于百度翻译


     以下为原文
  Hi Paul,
 
I believe you are asking for the GATT client designs.
PSoC Creator includes examples for BLE HID Keyboard and HID Mouse which are servers. I don't think there are examples of a client connecting to these devices.
 
Thanks,
Ranjith
举报

李晨灵

2018-9-29 16:11:58
引用: sdfjaslkdjf1 发表于 2018-9-29 10:39
嗨,保罗,
我相信您是要求GATT客户设计的。
PSoC Creator包括用于BLE HID键盘和HID鼠标的示例,这些服务器是HID。我不认为有客户端连接到这些设备的例子。

嗨,Ranjith,
也许我的服务器和客户端的术语不是正确的命名,但我不知道该如何更好地解释它。我把鼠标和键盘作为客户,对一些我称为服务器主机系统。
不是我想连接鼠标或键盘,它是这样的。
我想用一个单独的柏树(柏)和BLE模块连接普通HID鼠标吧。比方说,我用一个逻辑或微软BLE鼠标连接到这棵柏树模块运行在电池和理解藏(意为没有智能的PC / Windows系统是挂在这个用例)。
我想要的是经营LED按下鼠标点击,如果是可行的,然后我做了一个基础工作。
请参阅下面的图片说明我的用例。
干杯,保罗

以上来自于百度翻译


     以下为原文
  Hi Ranjith,
 
Maybe my terminology of server and client are not the proper naming in the BLE world, but I don't know how I should explain it better. I consider the mouse or keyboards as clients that pair to some host system which I call server.
 
It is not that I want to connect to the mouse or keyboard, it is the other way around.
 
I want to use a stand alone Cypress BLE module (Cypress) and connect a regular HID mouse with it. Let's say I use a Logitech or Microsoft BLE mouse and connect it to this Cypress module which runs on a battery and understands HID (meaning no intelligent PC/Windows system is hooked up in this usecase).
All I want is operate a LED by pressing a mouse click, if that is feasible then I got a foundation to work from.
 
See my picture below that explains my use case.
 

 
Cheers, Paul
举报

张涵

2018-9-29 16:20:24
引用: yuxiangxyz 发表于 2018-9-29 10:49
嗨,Ranjith,
也许我的服务器和客户端的术语不是正确的命名,但我不知道该如何更好地解释它。我把鼠标和键盘作为客户,对一些我称为服务器主机系统。
不是我想连接鼠标或键盘,它是这样的。

你好,保罗,
在蓝牙术语中,服务器是具有某种信息的设备(例如,在您的情况下,鼠标具有“按键”点击信息,因此它是服务器)。
- & gt;客户端是一种请求信息或你发送信息到它(在你的例子中,你将鼠标信息柏BLE设备和因此它是一个客户端)
客户端和服务器也被称为链路层主从分别与中枢和外周分别。
在这里,我们没有把客户准备的固件但你告诉你程序的柏树BLE设备与客户机/主机的角色,可以连接鼠标和按键可以闪烁LED在客户端设备(柏BLE设备)
请参考一个简单的例子,从下面的链接在中枢和外周作用。请找到随着文档的所有测试步骤之间进行通信的主从设备。
psoc-4-ble / 100_projects_in_100_days / day020_ble_uart大师·cypresssemiconductorco / psoc-4-ble·GitHub
-吉安

以上来自于百度翻译


     以下为原文
  Hello Paul,
 
      ->  In Bluetooth terminology ,Server is a device which has some information ( For example, in your case the Mouse has the 'Key' Click information and hence it is  a server)
 
     -> Client is a device which request the information OR you send the information to it ( In your example, you are sending the Mouse information to Cypress BLE device and hence it is a client )
 
Client and Servers are also known as Link Layer Master and Slave respectively and also Central and Peripheral respectively.
 
Here , we do not have an HID Client Ready Firmware but as you told you can program the Cypress BLE device with a Client/Master Role, can connect to the Mouse and on Key press can blink a LED on Client device ( Cypress BLE device)
 
Please refer a sample example from the below link on Central and Peripheral roles. Please find a document along with which has all the testing steps to communicate between Master and Slave device.
 
     PSoC-4-BLE/100_Projects_in_100_Days/Day020_BLE_UART at master · cypresssemiconductorco/PSoC-4-BLE · GitHub
 
 
-Gyan
举报

李晨灵

2018-9-29 16:28:54
引用: YHYDZ 发表于 2018-9-29 10:58
你好,保罗,
在蓝牙术语中,服务器是具有某种信息的设备(例如,在您的情况下,鼠标具有“按键”点击信息,因此它是服务器)。
- & gt;客户端是一种请求信息或你发送信息到它(在你的例子中,你将鼠标信息柏BLE设备和因此它是一个客户端)

嗨,Gyan,
谢谢你指出我的正确方向,这是令我困惑的术语(GATT,GAP,中央,外围,观察员等)。
如果找到北欧半导体术语的一个很好的解释:
HTTPS://DeZoNe.NordIMSI.COM/F/NODIC-Q-A/71/WIT-IS-A客户端和服务器端
我花了相当多的时间到Day20uBulyUART示例,但是由于这是在旧版本中创建的,所以我需要更新组件(我使用PSoC Creator 4.2),它首先需要被转换。这对于“UARTHI ToBuleCurrand”部分来说是很好的,但是对于“UARTHI ToBuffi外设”,它不能编译。
我已经检查并比较了PSoC Creator中的许多配置文件和设置,以及生成的输出文件,但我找不到根本原因。目录在那里,文件在那里,配置与“UARTHI ToBuffiCalm”相同。
我得到的错误:
ARM- NOE-EABI- GC.EXE:错误:…..…\\\文档 PSoC创建者 4.2下载(4.2).CYLBBLUV3V3L51库GCCSCyBuffStAcKyBulySoCuleApdio.A:没有这样的文件或目录
命令“ARME EABI GCC .exe”退出代码“1”失败。
但是该文件肯定是存在的,并且它试图从${PrutoDIr}返回的文件夹数量也是正确的。
虽然我可以用完整路径来手工编译(CLI),但是它生成了“UARTHYTHOBLULL Engult.ELF”文件,但是IDE不接收它。
我想知道在哪里可以找到${PrimeDIr}和其他IDE变量的定义(见下文)。
我被困在这一部分,失败的编译/链接,在ARM NOE-EABI GC.EXE的部分问题。
有什么主意吗?
干杯,
保罗

以上来自于百度翻译


     以下为原文
  Hi Gyan,
 
Thanks for pointing me out in the right Direction, it is the terminology that confuses me (GATT, GAP, Central, Peripheral, Observer, etc.).
If found a nice explanation about the terminology at Nordic Semiconductor:
https://devzone.nordicsemi.com/f/nordic-q-a/71/what-is-a-client-and-server-in-ble
 
I've spent quite some time to the Day20_BLE_UART example, but due to the fact that this is created in an older version I need to update the components (I'm using PSoC Creator 4.2) it first needs to be converted. This goes well for the "UART_to_BLE_central" part but for the "UART_to_BLE_peripheral" it fails to compile.
I've checked and compared many config files and settings in the PSoC Creator and also the generated output files but I'm not able to find the root cause. The Directory is there, the files are there and the config is identical of that of "UART_to_BLE_central".
 
The error I get:
arm-none-eabi-gcc.exe: error: ................DocumentsPSoC Creator4.2Downloads ( 4.2).cylibBLE_v3_51LibrarygccCyBLEStack_BLE_SOC_PERIPHERAL.a: No such file or directory
The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.
But the file is definitely there, and the amount of folders that it tries to go back from the ${ProjectDir} is also correct.
Although I was able to compile by hand (cli) using full path's and then it generates the "UART_to_BLE_peripheral.elf" file, but the IDE doesn't pick it up.
 

 
I wonder where I can find the definitions of ${ProjectDir} and the other IDE variables (see below).

 
I got stuck at this part where it fails compiling/linking at the part where arm-none-eabi-gcc.exe gave issues.
 
Any idea's here?
 
Cheers,
 
Paul
举报

更多回帖

发帖
×
20
完善资料,
赚取积分