Problem:
You get a message like follows, when you run any of the bechele programs:
Can't bless non-reference value at /usr/local/lib/aarch64-linux-gnu/perl/5.36.0/RPi/I2C.pm line 30. (wrong or non existing i2c device)Can't call method "write_block" on an undefined value at /usr/local/share/perl/5.36.0/RPi/MultiPCA9685.pm line 38.END failed--call queue aborted
The problem is related to the i2c interface to the Servo PWM PCB’s
Possibly the i2c devices are not loaded into the Kernel or the i2c device in /dev is not setup correctly, or the wrong device is specified in the ConfigL.pm file of the bechele software.
Possible solution:
To narrow down the problem, you may use the installed i2c Tools:
Type: i2cdetect -y 0 or i2cdetect -y 1
you should see something like:
i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: 40 41 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
Here you see two devices on the i2c bus – these are two PWM PCBs on address 40h and 41h
This shows you the Boards are visible on device /dev/i2c-1
Problem:
You get an error message when you start servocalib.pl or trackui.pl like:
serial device does not respond
Possible reasons are:
- The serial joystick is configured in ConfigL.pm, but none is connected.
- The serial device is not configured within the OS
- The serial device specified in ConfigL.pm differs from the real device name in use.
- The serial device is occupied by a terminal process (getty)
Possible Way to figure out the reason:
To narrow down the problem, you may use minicom to access the serial device.
Type: minicom -D /dev/ttyAMA0 -b 38400 or minicom -D /dev/ttyS3 -b 38400
if minicom opens the device and every time you type “4” on the keyboard, the youstick should respond with four values (2 x Number – these are the joystick positions + 2 x Boolean – these are the buttons – pressed or not 1=not pressed 0=pressed):
440 280 1 1
Problem:
You get an error message when you start servocalib.pl or trackui.pl like:
Use of uninitialized value $realdevice in string at /usr/local/share/perl/5.36.0/Linux/Joystick.pm line 211. Can't call method "nextEvent" on an undefined value at /usr/local/bin/bechele/servocalib-single.pl line 141. serial device does not respond
Possible reasons are:
- The USB joystick is configured in ConfigL.pm, but none is connected.
- The Joystick device js0 or js1 is not configured within the OS
Possible way to figure out the reason:
To narrow down the problem, you may:
- run the script /usr/local/bin/gamepad.pl to access the joystick device.
- check the /dev directory for a js0 or js1 device (Note: on a default Raspbian installation, joystick devices must be loaded as kernel module – they are usually not installed by default.)