Skip to contentSkip to conversation

Microsoft keyboad/mouse problem

Bluez-users Dave Sailer 3 participants 6 messages Dec 9, 2004 – Jan 19, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

My mouse and keyboard sometimes loose their connection. I'm running 2.6.10_rc2 and hidd --server on boot. I also run a script I found around the net that runs hidd --search and/or hidd --connect with retries and delays to try to connect to the keyboard & mouse. When the connection is lost, I typically run "hidd --show" to see that it is indeed not connected then "hidd --search" to reconnect and it USUALLY works especially since I upgraded the kernel from 2.6.8. Thankfully it is usually the mouse that is a problem, so I can do this from the same box. When "hidd --search" fails I remove and replace the batteries. I've noticed the mouse lights blinking at me, which I'm not sure is telling me the batteries are low. I checked and they weren't really that low. It sometimes seems as though the mouse desires batteries really well charged. The few times the keyboard was a problem, I ssh from another box and "hidd --search" and it works.

I'm new to this and I'm a bit confused on some things:

1) when the devices sleep should "hidd --show" show the device? (And the hidd server is waiting for a wakeup from the device?) I guess I should check "hidd --show" sometime when they've been inactive.

2) what does the blinking mouse mean (I don't have any docs with these devices).

3) Should I have to push the mouse and keyboard buttoms on every reboot or just one time for the device? (should I need that second script I'm running?)

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#1 lore raw

Hi Dave,

Quoted 6 lines

My mouse and keyboard sometimes loose their connection. I'm running 2.6.10_rc2 and hidd --server on boot. I also run a script I found around the net that runs hidd --search and/or hidd --connect with retries and delays to try to connect to the keyboard & mouse. When the connection is lost, I typically run "hidd --show" to see that it is indeed not connected then "hidd --search" to reconnect and it USUALLY works

Quoted 8 lines

especially since I upgraded the kernel from 2.6.8. Thankfully it is usually the mouse that is a problem, so I can do this from the same box. When "hidd --search" fails I remove and replace the batteries. I've noticed the mouse lights blinking at me, which I'm not sure is telling me the batteries are low. I checked and they weren't really that low. It sometimes seems as though the mouse desires batteries really well charged. The few times the keyboard was a problem, I ssh from another box and "hidd --search" and it works.

first questions is if this is the old Microsoft desktop or new 2.0 version of it?

Quoted 3 lines

1) when the devices sleep should "hidd --show" show the device? (And the hidd server is waiting for a wakeup from the device?) I guess I should check "hidd --show" sometime when they've been inactive.

When the device sniff then the connection should still be shown, but after a while it disconnects and then it will not be shown anymore. However this doesn't matter, because it will reconnect on the next touch to your running "hidd --server" instance.

Quoted 2 lines

2) what does the blinking mouse mean (I don't have any docs with these devices).

How should I know? I don't work for Microsoft ;)

Quoted 3 lines

3) Should I have to push the mouse and keyboard buttoms on every reboot or just one time for the device? (should I need that second script I'm running?)

You need to push the connect button only for the initial setup and there is no need for another script. Only "hidd --server" must run. However you need to push a keyboard or mouse button to initiate the reconnect.

Regards

Marcel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw

[Bluez-users] Permissions on Sockets

My application connects to a custom device. The app works when I run as su but I get an error from hci_send_cmd from the writev(dd, iv, ivn) when I run as a regular user.

Are there some permissions that I need to set to allow my regular user to write to the socket?

Thank you,

Jonathan

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#3 lore raw

Re: [Bluez-users] Permissions on Sockets

Hi Jonathan,

Quoted 6 lines

My application connects to a custom device. The app works when I run as su but I get an error from hci_send_cmd from the writev(dd, iv, ivn) when I run as a regular user.

Are there some permissions that I need to set to allow my regular user to write to the socket?

for some HCI commands you need root rights. About what commands are we talking?

Regards

Marcel

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#4 lore raw

Re: [Bluez-users] Permissions on Sockets

Thank you for your help.

I am doing an inquiry of all devices, finding our device, connecting to it and the reading bytes via a rawsocket.

The only issue I see so far is the writev command (I copied the code from hci_send_cmd).

How do I assign root rights for this?

Quoted 6 lines · Marcel Holtmann

Hi Jonathan,

Quoted 4 lines

My application connects to a custom device. The app works when I run as su but I get an error from hci_send_cmd from the writev(dd, iv, ivn) when I run as a regular user.

Quoted 6 lines
Quoted 2 lines

Are there some permissions that I need to set to allow my regular user to write to the socket?

for some HCI commands you need root rights. About what commands are we talking?

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#5 lore raw

Re: [Bluez-users] Permissions on Sockets

Hi Jonathan,

Quoted 7 lines

I am doing an inquiry of all devices, finding our device, connecting to it and the reading bytes via a rawsocket.

The only issue I see so far is the writev command (I copied the code from hci_send_cmd).

How do I assign root rights for this?

you need to change the HCI security filter inside the kernel or make your application setuid root or adapt the capabilities of your program.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users