Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7619

General • Re: Using Raspberry Pi Pico as HID bridge for Pi 5 - Feasibility check

$
0
0
1. On multiple connections. It is possible for multiple clients to connect simultaneously. Normally this is blocked for HID devices - otherwise anybody could make a second connection and see the key strokes. But there is an option to allow multiple HID connections. Also, normal behaviour is to send notifications to all connected clients, but btferret allows this to be overridden so sends can be directed to one client only. See documentation for:

Code:

set_flags(HID_MULTI,FLAG_ON);   // allow multiple connections to HID deviceset_notify_node(7);   // send notifications (keys/mouse) to node 7 onlyset_notify_node(ALL_DEVICES);  // send to all devices - default
2. Speed. Firtstly, the connection interval limits how many notifications can be sent per second so set this to the fastest possible. Secondly, the current version 19 does limit the speed at which notifications can be sent. The next version 20 allows much faster rates and should largely fix the problem - maybe 1-2 weeks away.

Code:

set_le_interval(6,6);    // fastest possible connection intervalBut from within server it may be necessary to use:set_le_interval_update(clientnode,6,6);ORset_le_interval_server(clientnode,6,6);VERSION 20 methodsset_flags(FAST_TIMER,FLAG_ON);le_server(lecallback,20);    // timer is now ms rather than deci-seconds so 20ms here

Statistics: Posted by petzval — Sat Mar 01, 2025 10:58 am



Viewing all articles
Browse latest Browse all 7619

Trending Articles