Help Troubleshooting AD2Pi

General Discussion

Help Troubleshooting AD2Pi

Postby jasonsf » Sun May 20, 2018 11:01 am

My AD2Pi was was working until I had a failure on my SD card. After replacing the card and reinstalling, I am having problems I'd like help with. My guess is a wiring issue, but everything looks fine visually.

Here are the symptoms:
  • telnetting on port 10000 DOES show a stream of messages from the Alarm panel.
  • Communication appears to be one-way. No response to commands in terminal or from web app.
  • Setup wizard yields:
    Opening device ✔
    Saving device configuration ⚠ Test timed out.
    Keypad communication (Send) ⚠ Test timed out.
    Keypad communication (Receive) ✔
  • Web app diagnostics page returns a python error (which might be from a null response from the board?):
    Code: Select all
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1997, in __call__
        return self.wsgi_app(environ, start_response)
      File "/opt/alarmdecoder-webapp/ad2web/app.py", line 128, in __call__
        return self.app(environ, start_response)
      File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1985, in wsgi_app
        response = self.handle_exception(e)
      File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1540, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
        response = self.full_dispatch_request()
      File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
        rv = self.handle_user_exception(e)
      File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
        reraise(exc_type, exc_value, tb)
      File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
        rv = self.dispatch_request()
      File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
        return self.view_functions[rule.endpoint](**req.view_args)
      File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 228, in decorated_view
        return func(*args, **kwargs)
      File "/opt/alarmdecoder-webapp/ad2web/decorators.py", line 16, in decorated_function
        return f(*args, **kwargs)
      File "/opt/alarmdecoder-webapp/ad2web/settings/views.py", line 717, in system_diagnostics
        device_settings['serial'] = current_app.decoder.device.serial_number.upper()
    AttributeError: 'long' object has no attribute 'upper'

I'm looking for any advice on how to troubleshoot this and repair. I've replaced the Raspberry Pi thinking something happened with the GPIO interface, but that didn't help.

Thanks-
Jason
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Re: Help Troubleshooting AD2Pi

Postby jasonsf » Thu Jun 07, 2018 8:13 pm

I'm still looking for any help I can get. I've switched from docker to the latest beta image and am in worse shape. No messages at all from the serial port 10000. The only changes I've made from the base image is to add a wpa_supplicant file to get on wifi and to disable the bluetooth via
Code: Select all
dtoverlay=pi3-disable-bt
.
Devices appear correct:
Code: Select all
 ls -al /dev | grep serial
lrwxrwxrwx  1 root root           7 Jun  4 19:55 serial0 -> ttyAMA0
lrwxrwxrwx  1 root root           5 Jun  4 19:55 serial1 -> ttyS0


Any troubleshooting tips?

Thanks-
Jason
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Re: Help Troubleshooting AD2Pi

Postby kevin » Sat Jun 09, 2018 10:43 am

try connecting to raw stream with all software stopped and see if you are able to communicate with panel
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Help Troubleshooting AD2Pi

Postby jasonsf » Sat Jun 09, 2018 2:17 pm

Thanks Kevin, I'll give that a try. Any links to how to do that? I'm not real experienced with hardware devices and how they communicate. I saw a reference in another post about using the screen utility. Is that what you are referring to?

Jason

Sent from my Pixel 2 using Tapatalk
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Re: Help Troubleshooting AD2Pi

Postby kevin » Sat Jun 09, 2018 2:31 pm

sure, screen will work, anything that can connect to the serial port directly

screen <device> <speed>

if you have permissions problems try with sudo
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Help Troubleshooting AD2Pi

Postby jasonsf » Sat Jun 09, 2018 2:34 pm

Code: Select all
screen /dev/ttyAMA0 115200


Returns an empty screen. No messages. Same with serial0 as the device.

restarting ser2sock and telnetting also returns no messages.

Jason
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Re: Help Troubleshooting AD2Pi

Postby kevin » Sat Jun 09, 2018 2:40 pm

Make sure nothing else is using the serial port

make sure ser2sock is stopped, make sure gunicorn is stopped

sudo lsof | grep <device> to see what has it opened
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Help Troubleshooting AD2Pi

Postby jasonsf » Sat Jun 09, 2018 2:45 pm

I'm not seeing anything that might have the device open.

Code: Select all
pi@alarmdecoder:~ $ sudo service gunicorn stop
pi@alarmdecoder:~ $ sudo service ser2sock stop
pi@alarmdecoder:~ $ sudo lsof | grep tty
systemd-l   399           root    6r      REG       0,15     4096       7600 /sys/devices/virtual/tty/tty0/active
systemd-l   399           root   13u      CHR        4,6      0t0       1046 /dev/tty6
agetty      741           root  cwd       DIR      179,2     4096          2 /
agetty      741           root  rtd       DIR      179,2     4096          2 /
agetty      741           root  txt       REG      179,2    30508      12969 /sbin/agetty
agetty      741           root  mem       REG      179,2   151984      18453 /usr/lib/locale/C.UTF-8/LC_CTYPE
agetty      741           root  mem       REG      179,2  1613360      18450 /usr/lib/locale/locale-archive
agetty      741           root  mem       REG      179,2    46820       2198 /lib/arm-linux-gnueabihf/libnss_files-2.19.so
agetty      741           root  mem       REG      179,2    38612       2206 /lib/arm-linux-gnueabihf/libnss_nis-2.19.so
agetty      741           root  mem       REG      179,2    71628       2195 /lib/arm-linux-gnueabihf/libnsl-2.19.so
agetty      741           root  mem       REG      179,2    30592       2196 /lib/arm-linux-gnueabihf/libnss_compat-2.19.so
agetty      741           root  mem       REG      179,2  1242776       2160 /lib/arm-linux-gnueabihf/libc-2.19.so
agetty      741           root  mem       REG      179,2    18920      16877 /usr/lib/arm-linux-gnueabihf/libarmmem.so
agetty      741           root  mem       REG      179,2   134448       2125 /lib/arm-linux-gnueabihf/ld-2.19.so
agetty      741           root  mem       REG      179,2    26262      17395 /usr/lib/arm-linux-gnueabihf/gconv/gconv-modules.cache
agetty      741           root    0u      CHR        4,1      0t0       1041 /dev/tty1
agetty      741           root    1u      CHR        4,1      0t0       1041 /dev/tty1
agetty      741           root    2u      CHR        4,1      0t0       1041 /dev/tty1

pi@alarmdecoder:~ $ dmesg| grep tty
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.000814] console [tty1] enabled
[    0.834708] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Re: Help Troubleshooting AD2Pi

Postby kevin » Sat Jun 09, 2018 2:48 pm

since nothing has it open - do confirm that all 4 wires are correctly installed to the ad2pi and try to connect to it with screen

issue some commands to it, try to reboot it with =

if you're having no luck, you can try the firmware updater, maybe it's got scrambled - other than that, i suggest emailing/calling support and seeing if they can sort you out.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Help Troubleshooting AD2Pi

Postby jasonsf » Sat Jun 09, 2018 2:49 pm

Thanks for the advice Kevin. I'll check the wires and firmware.

Jason
jasonsf
Senior Nut
Senior Nut
 
Posts: 60
Joined: Sun Oct 16, 2016 2:43 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 9 guests

cron