Jdog
Posts: 2
Joined: Thu Dec 19, 2013 7:43 pm

Bluetooth connection error spam

Thu Dec 19, 2013 8:08 pm

Working wity a pi-b, 16gb sd card berrybooting openelec and retropie, iogear gbu521 bluetooth dongle and wiimote.

I followed the wiimote setup instructions at http://blog.petrockblock.com/forums/top ... -retropie/

so far the wiimote is working. i'm not very happy with the actual button configuration used in the instructions but i can fiddle around with that.

when retropie starts up i can sync the wiimote no problem. it works with the games as expected but if i ssh into the pi, it starts crapping socket connect errors all over my console. even if i'm using nano it will start dropping the error messages straight into the file i'm editing.

The exact error printed is
"Socket connect error (control channel)"

This will print 10's of times per second, making the console unusable. If i don't connect the wiimote before i ssh in no errors are generated.

All the while this error is being printed the wiimote is still connected and working.

best case scenario: i find a way to stop this error from occurring; otherwise, i would be happy to just suppress the error message so that my console isn't rendered useless and i can do some debugging. I have a feeling this constant error generation is also making gameplay choppy. the audio and video are much smoother when using the keyboard.

everything i do with this pi seems to turn into a never ending google search.

InflatableFriend
Posts: 2
Joined: Thu Jan 02, 2014 4:02 pm

Re: Bluetooth connection error spam

Thu Jan 02, 2014 4:10 pm

I had the same problem, but I think I just found the problem...

At first when I set up using the guide, My wiimotes were not connecting. I fixed that problem by putting sudo on from of the wminput commands in /home/pi/bin/attachwii.sh

Code: Select all

#!/bin/bash
hcitool dev | grep hci >/dev/null
if test $? -eq 0 ; then
	sudo wminput -d -c  /home/pi/mywminput 00:19:1D:92:90:38 &
	sudo wminput -d -c  /home/pi/mywminput 00:19:1D:84:EF:33 &
else
	echo "Blue-tooth adapter not present!"
fi
That fixed my problem, however, once I started trying to configure the rest of it, I got that spamming Socket Connect Error that you are talking about. What I discovered is that the /etc/udev/rules.d/wiimote.rules file was invalid. It was not properly giving uinput access to non root users.
I changed it from this:

Code: Select all

KERNEL==“uinput“, MODE:=“0666“
To this:

Code: Select all

KERNEL==“uinput“, MODE=“0666“
That extra semicolon was stopping the rule from implementing. Now wminput has proper access to uinput as any user and I haven't seen that error again.

I hope this helps you and everyone else on the internet looking for this solution.

InflatableFriend
Posts: 2
Joined: Thu Jan 02, 2014 4:02 pm

Re: Bluetooth connection error spam

Mon Jan 06, 2014 6:22 pm

Update:

This did not solve the issue of the spamming error while the device is connected. The above fixed my issue when the device was not connected at all.

Jdog
Posts: 2
Joined: Thu Dec 19, 2013 7:43 pm

Re: Bluetooth connection error spam

Tue Jan 07, 2014 7:07 pm

InflatableFriend wrote:Update:

This did not solve the issue of the spamming error while the device is connected. The above fixed my issue when the device was not connected at all.
Thanks for the replies. So far I haven't found the time to continue work on my retropie. Hoping to get back at it february. The first one I made was a christmas gift so i got it working with a wired controller when the wiimotes became a problem. I'll have a little more time to work on my own since there will be no time constraint.

I don't remember running into that issue with the ":=" assignment. (although i might have)

Ransak
Posts: 9
Joined: Thu Jan 09, 2014 7:08 pm

Re: Bluetooth connection error spam

Thu Jan 09, 2014 7:25 pm

I ran into this issue. The Wii remotes were working well but any console (even over SSH) that was logged on was getting spammed dozens of times per second. It made working on this tons of fun.

Anyway, I poked around the documentation for wimput after I found it to be the cause. After a little bit of trial and error I found that I could redirect the errors to /dev/null . Technically this isn't fixing the problem, just helping you ignore it :P

In the walkthrough in setting up the Wii remotes here change the wminput in the attachwii.sh script to this:

Code: Select all

wminput -d -q -c  /home/pi/mywminput XX:XX:XX:XX:XX:XX > /dev/null 2>&1 &
The -q is supposed to help keep wminput quiet but it didn't do much (you can remove it if you like), so I redirected it to the bit bucket.

Note that this method does work but if you're troubleshooting wminput problems down the road you'll probably need to remove the /dev/null 2>&1 . No idea how much processor is getting eaten by the spam (I don't think it's very much though) so a real solution would be welcome since this isn't a 'fix'. Then again I'm using a bluetooth dongle I bought for $2 about eight years ago and my Wii remotes have been sitting around a broken Wii and a Pi I forgot I bought early this year, so the fact it works at all is something I can't be too picky about :D

Return to “Troubleshooting”