{"id":1123,"date":"2024-02-19T16:58:12","date_gmt":"2024-02-19T16:58:12","guid":{"rendered":"https:\/\/bechele.de\/?page_id=1123"},"modified":"2024-02-19T17:53:09","modified_gmt":"2024-02-19T17:53:09","slug":"_fault-handling-possible-sources-of-problems","status":"publish","type":"page","link":"https:\/\/bechele.de\/?page_id=1123","title":{"rendered":"_Fault handling &#8211; possible sources of Problems"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>Problem:<\/strong><br>You get a message like follows, when you run any of the bechele programs:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">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<\/pre>\n\n\n\n<p>The problem is related to the i2c interface to the Servo PWM PCB&#8217;s<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Possible solution:<\/strong><\/p>\n\n\n\n<p>To narrow down the problem, you may use the installed i2c Tools:<\/p>\n\n\n\n<p>Type:<strong><em> i2cdetect -y 0<\/em><\/strong>  or  <strong><em>i2cdetect -y 1<\/em><\/strong><\/p>\n\n\n\n<p>you should see something like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">i2cdetect -y 1\n     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f\n00:                         -- -- -- -- -- -- -- --\n10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n40: 40 41 -- -- -- -- -- -- -- -- -- -- -- -- -- --\n50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n70: -- -- -- -- -- -- -- --\n<\/pre>\n\n\n\n<p>Here you see two devices on the i2c bus &#8211; these are two PWM PCBs on address 40h and 41h<\/p>\n\n\n\n<p>This shows you the Boards are visible on device \/dev\/i2c-1 <\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Problem:<\/strong><\/p>\n\n\n\n<p>You get an error message when you start servocalib.pl or trackui.pl like: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">serial device does not respond<\/pre>\n\n\n\n<p>Possible reasons are: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The serial joystick is configured in ConfigL.pm, but none is connected.<\/li>\n\n\n\n<li>The serial device is not configured within the OS<\/li>\n\n\n\n<li>The serial device specified in ConfigL.pm differs from the real device name in use.<\/li>\n\n\n\n<li>The serial device is occupied by a terminal process (getty)<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Possible Way to figure out the reason:<\/strong><\/p>\n\n\n\n<p>To narrow down the problem, you may use minicom to access the serial device.<\/p>\n\n\n\n<p>Type: <em><strong>minicom -D \/dev\/ttyAMA0 -b 38400<\/strong><\/em> or <strong><em>minicom -D \/dev\/ttyS3 -b 38400<\/em><\/strong><\/p>\n\n\n\n<p>if minicom opens the device and every time you type &#8220;4&#8221; on the keyboard, the youstick should respond with four values (2 x Number &#8211; these are the joystick positions + 2 x Boolean &#8211; these are the buttons &#8211; pressed or not 1=not pressed 0=pressed):<\/p>\n\n\n\n<p>440 280 1 1<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Problem:<\/strong><\/p>\n\n\n\n<p>You get an error message when you start servocalib.pl or trackui.pl like: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Use of uninitialized value $realdevice in string at \/usr\/local\/share\/perl\/5.36.0\/Linux\/Joystick.pm line 211.\nCan't call method \"nextEvent\" on an undefined value at \/usr\/local\/bin\/bechele\/servocalib-single.pl line 141.\nserial device does not respond<\/pre>\n\n\n\n<p>Possible reasons are: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The USB joystick is configured in ConfigL.pm, but none is connected.<\/li>\n\n\n\n<li>The Joystick device js0 or js1 is not configured within the OS<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Possible way to figure out the reason:<\/strong><\/p>\n\n\n\n<p>To narrow down the problem, you may:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li> run the script <strong><em>\/usr\/local\/bin\/gamepad.pl<\/em><\/strong> to access the joystick device.<\/li>\n\n\n\n<li>check the \/dev directory for a js0 or js1 device (Note: on a default Raspbian installation, joystick devices must be loaded as kernel module &#8211; they are usually not installed by default.)<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem:You get a message like follows, when you run any of the bechele programs: Can&#8217;t bless non-reference value at \/usr\/local\/lib\/aarch64-linux-gnu\/perl\/5.36.0\/RPi\/I2C.pm line 30. (wrong or non&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":1060,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1123","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/1123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bechele.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1123"}],"version-history":[{"count":1,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/1123\/revisions"}],"predecessor-version":[{"id":1124,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/1123\/revisions\/1124"}],"up":[{"embeddable":true,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/1060"}],"wp:attachment":[{"href":"https:\/\/bechele.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}