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

joystick.service error #20

Open
LittleBookboy12138 opened this issue Nov 9, 2020 · 13 comments
Open

joystick.service error #20

LittleBookboy12138 opened this issue Nov 9, 2020 · 13 comments

Comments

@LittleBookboy12138
Copy link

LittleBookboy12138 commented Nov 9, 2020

Both joystick.service and robot.service are active, but an error occurred while connecting the PS4 to the Pupper.

The specific questions are as follows:

pi@raspberrypi(rw):~$ sudo systemctl status joystick.service
● joystick.service - Pupper Joystick service
Loaded: loaded (/boot/appliance/home/pi/PupperCommand/joystick.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2019-02-14 10:17:57 GMT; 78ms ago
Process: 1173 ExecStart=/usr/bin/python3 /home/pi/PupperCommand/joystick.py (code=exited, status=1/FAILURE)
Main PID: 1173 (code=exited, status=1/FAILURE)

Thank you!

@juedongli
Copy link

https://github.com/stanfordroboticsclub/UDPComms
DEFAULT_IP = "10.0.0.255"

ip By default UDPComms sends to the 10.0.0.X subnet, but can be changed to a different ip using this argument.
Set to localhost (127.0.0.1) for development on the same computer.

@marx-bryan
Copy link

S $8Y4L5TJJYB`Y$ XF4R
i have the same question ,still unsolved

@mikh3x4
Copy link
Member

mikh3x4 commented Mar 19, 2022

try running python3 /home/pi/PupperCommand/joystick.py to run the joystick program without systemd. What does it output?

@marx-bryan
Copy link

try running python3 /home/pi/PupperCommand/joystick.py to run the joystick program without systemd. What does it output?

pi@pi(rw):~/PupperCommand$ sudo python3 joystick.py
Can't get device info: No such device
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/ds4drv/backends/bluetooth.py", line 89, in setup
subprocess.check_output(["hcitool", "clock"],
File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['hcitool', 'clock']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pi/PupperCommand/joystick.py", line 14, in
joystick = Joystick()
File "/usr/local/lib/python3.9/dist-packages/PS4Joystick.py", line 85, in init
backend.setup()
File "/usr/local/lib/python3.9/dist-packages/ds4drv/backends/bluetooth.py", line 92, in setup
raise BackendError("'hcitool clock' returned error. Make sure "
ds4drv.exceptions.BackendError: 'hcitool clock' returned error. Make sure your bluetooth device is powered up with 'hciconfig hciX up'.

@mikh3x4
Copy link
Member

mikh3x4 commented Mar 19, 2022

have you tired running hciconfig hciX up before running that command? Its a bit weird because I think joystick.py should run that on its own but I want to make sure

@marx-bryan
Copy link

sudo hciconfig hciX up
Can't get device info: No such device

@marx-bryan
Copy link

To start with,I didnt use offical img ,instead i used version _2021 bulleyes( 2021-10-30-raspios-bullseye),and followed the offical document to install the software

@mikh3x4
Copy link
Member

mikh3x4 commented Mar 19, 2022

It seems like the pi's bluetooth module is not showing up at all. What version of Pi are you using? What's the output of hcitool dev?

@marx-bryan
Copy link

raspberry 4b ,pi@pi(rw):~/PupperCommand$ hcitool dev
Devices:
device is blank

@mikh3x4
Copy link
Member

mikh3x4 commented Mar 19, 2022

It's possible something changed between raspios versions. A quick googling brings this up which suggests early bullseye versions had something wrong with bluetooth. I would recommend updating raspios (it should be possible to do in place without reinstalling) and seeing if that fixes things

@marx-bryan
Copy link

pi@pi(rw):$ sudo nano /etc/apt/sources.list.d/raspi.list
pi@pi(rw):
$ sudo apt-get update
Hit:1 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian bullseye InRelease
Hit:2 http://mirrors.tuna.tsinghua.edu.cn/raspberrypi bullseye InRelease
Reading package lists... Done
pi@pi(rw):$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@pi(rw):
$ sudo hcitool dev
Devices:
still blank
i think maybe i need to reinstall it to the newest version

@marx-bryan
Copy link

It's possible something changed between raspios versions. A quick googling brings this up which suggests early bullseye versions had something wrong with bluetooth. I would recommend updating raspios (it should be possible to do in place without reinstalling) and seeing if that fixes things

thanks for your advice

@AlfredMoore
Copy link

pi@pi(rw):$ sudo nano /etc/apt/sources.list.d/raspi.list pi@pi(rw):$ sudo apt-get update Hit:1 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian bullseye InRelease Hit:2 http://mirrors.tuna.tsinghua.edu.cn/raspberrypi bullseye InRelease Reading package lists... Done pi@pi(rw):$ sudo apt-get upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pi@pi(rw):$ sudo hcitool dev Devices: still blank i think maybe i need to reinstall it to the newest version

Did you solve it ? Totally same problem, though I am in the Debian 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants