Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section about pairing via bluetooth #213

Open
mrwerdo opened this issue Feb 15, 2022 · 8 comments · May be fixed by #138
Open

Add section about pairing via bluetooth #213

mrwerdo opened this issue Feb 15, 2022 · 8 comments · May be fixed by #138
Assignees
Labels
documentation Improvements or additions to documentation WIP A work in progress, feedback welcome but things might change

Comments

@mrwerdo
Copy link
Contributor

mrwerdo commented Feb 15, 2022

Don't mind me. I'm just documenting the steps for connecting bluetooth controllers here. I'll add these in later with a pull request...

The instructions are based on the ones located here, except with one minor difference: depending on the robot there is a large amount of interference. This creates dead zones where the PS3 controller can't send data. The dead zones are very clear cut. Slight movements can enable the PS3 to send data.

One spot which works quite well is placing the controller up against the back of the robot's case, just below the power buttons.

A few other points:

  1. Run jstest --normal /dev/input/js0 to verify that the controller is sending data. jstestcan be installed using pacman -S joyutils if it's not on the robot already. See here.
  2. It might be nice to enable auto power on boot for the bluetooth controller on the robot. See here.
  3. The bluetooth service is not started by default. Use systemctl start bluetooth to start it, and systemctl enable bluetooth to start it when the robot powers on.
  4. Restart after installing bluez-plugins
@mrwerdo mrwerdo added documentation Improvements or additions to documentation WIP A work in progress, feedback welcome but things might change labels Feb 15, 2022
@mrwerdo mrwerdo self-assigned this Feb 15, 2022
@tayloryoung6396
Copy link
Contributor

This honestly doesn't make a lot of sense, unless the CM740 has terrible EMI... might be worth grabbing one of the spectrum analysers and seeing what the issue is

@mrwerdo
Copy link
Contributor Author

mrwerdo commented Feb 15, 2022

I couldn't figure out what device provides Bluetooth. Do you know what model it is?

Maybe someone (re)moved the antenna? I found that the PS3 controller could send signals at most 1 meter away from the robot.

Another thing is that I was struggling to ping the robot just before leaving the lab. When ping worked it was sitting on the table, when ping didn't work it was airing on the ground. The robot lost power when it was moved. I know however that it had booted correctly because the PS3 controller could still connect to it.

(Thinking about this now, it could be the Bluetooth service preventing the network service from starting properly. I'd be surprised if this was the case though because they rely on different devices. It could be related to AutoEnable=true in /etc/bluetooth/main.conf.)

I was working on nugus-1.

@tayloryoung6396
Copy link
Contributor

If you're connecting to an IGUS, it's a NUC inside that it's connecting to. Afaik, it uses the same wireless controller as the WIFI for it, and the antennas have been changed in it. They're custom cables and antenna. I doubt the custom antenna and cables are the issue. We could run some experiments to see if the antenna orientation or type is the issue, but that comes with risks

@mrwerdo
Copy link
Contributor Author

mrwerdo commented Feb 15, 2022

It might be worth trying this step too: https://wiki.archlinux.org/title/Network_configuration/Wireless#Bluetooth_coexistence

If they are on the same chip then disabling Wifi and Bluetooth coexistence might make it work better. I'm not sure what this means exactly. Maybe it just prevents wifi and Bluetooth from transmitting at the same time?

@tayloryoung6396
Copy link
Contributor

If that is the case we COULD, although you'd then need to ethernet to the robot to do anything whilst the controller is connected.

@Bidski
Copy link
Collaborator

Bidski commented Feb 15, 2022

This honestly doesn't make a lot of sense, unless the CM740 has terrible EMI... might be worth grabbing one of the spectrum analysers and seeing what the issue is

Broken antennae on the NUC?

@Bidski
Copy link
Collaborator

Bidski commented Feb 15, 2022

(Thinking about this now, it could be the Bluetooth service preventing the network service from starting properly. I'd be surprised if this was the case though because they rely on different devices. It could be related to AutoEnable=true in /etc/bluetooth/main.conf.)

Bluetooth and WiFi are the same device, just different parts of the device. So if one is failing its highly likely that the other would be faliing as well. However, one of them working should not prevent the other from working

@Crafty15 Crafty15 linked a pull request Feb 19, 2022 that will close this issue
1 task
@Crafty15
Copy link
Contributor

Had a play around with this yesterday. The NUC in question was missing one of two antennas. One of the connectors on the board itself was pretty deformed so i'm guessing that's why it was left off.
The wireless cards are conveniently soldered to the motherboards so i swapped it out with a spare from the shelf and it seems to have sorted things out. The connection seems stable over a couple of meters at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation WIP A work in progress, feedback welcome but things might change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants