Announcement

Collapse
No announcement yet.

RPI3 & Razberry, serial port issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    RPI3 & Razberry, serial port issue

    I have HS3 (3.0.0.280) setup and running fine on a RPI3 (Raspbian GNU/Linux 8.0 (jessie)) and having trouble getting the Razberry card to be recognised.

    It can detect the Razberry GPIO card fine with z-way-server software that came with it. That was installed first to disable bluetooth etc. The z-way-server, sb_connect and mongoose services were disabled afterwards by removing the /etc/init.d/ scripts.

    When I try to add it as a z-wave interface the only serial port available is dev/ttyS0, I need dev/ttyAMA0 to appear in the dropdown from what I've found online.

    Doing a dmseg | grep tty I get the following (with and without serial login shell set):

    Code:
    [    0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa02082 bcm2709.serial=0xfcb402e8 smsc95xx.macaddr=B8:27:EB:B4:02:E8 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0  console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
    [    0.001332] console [tty1] enabled
    [    1.818746] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
    [    2.976915] console [ttyAMA0] enabled
    [    3.911204] systemd[1]: Expecting device dev-ttyAMA0.device...
    [    4.492334] systemd[1]: Starting system-serial\x2dgetty.slice.
    [    4.501095] systemd[1]: Created slice system-serial\x2dgetty.slice.
    Code:
    [    0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa02082 bcm2709.serial=0xfcb402e8 smsc95xx.macaddr=B8:27:EB:B4:02:E8 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0  console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
    [    0.001327] console [tty1] enabled
    In both situations I can still only see ttyS0.

    enable_uart=1 was added to the end of /boot/config.txt which I thought may have done it, however HS3 stubbornly refuses to show ttyAMA0.

    Code:
    [    0.000000] Kernel command line: 8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa02082 bcm2709.serial=0xfcb402e8 smsc95xx.macaddr=B8:27:EB:B4:02:E8 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0  console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
    [    0.001332] console [tty1] enabled
    [    1.820067] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
    I tried using ttyS0 just in case but that errors out.

    Code:
    06:30:56:2867:[Z-Wave Warning]->New Interface: Cannot configure COM port /dev/ttyS0, will attempt an open.
    Error: New Interface: Cannot open COM port /dev/ttyS0, exiting. Ex=Input/output error
    06:30:57:4895:[Z-Wave Error]->New Interface: Cannot open COM port /dev/ttyS0, exiting. Ex=Input/output error
    To be honest i've messed around with so many settings other than listed here that a fresh install maybe required and try again.

    If anybody can suggest anything it would be great appreciated!

    #2
    Progress

    After a reinstall and some troubleshooting i've found the following settings which appear to be key:

    The razberry responds to the z-way-server service (and the red led comes on) with:

    /boot/config.txt
    enable_uart=1
    dtoverlay=pi3-miniuart-bt

    However with those settings homeseer can only see one of the dev/tty ports as previously mentioned. (The z-way-server service had been deactivated and a reboot occurred, so I don't think the port wasn't still in use from that).

    Commenting out both those lines in config.txt (plus reboot) allows Homeseer to see all the ports, however selecting dev/ttyAMA0 gives errors, which isn't surprising as the serial port has been deactivated.

    Code:
    08:03:44:6154:[Z-Wave]->Initializing Z-Wave interface Razberry z-wave (Generic Serial Controller) on /dev/ttyAMA0
    08:03:44:6184:[Z-Wave]->Razberry z-wave: ----------------------------------------------------------------------
    08:03:44:6221:[Z-Wave]->Razberry z-wave: The Z-Wave Command Execution Thread was Started or Restarted.
    08:03:44:6342:[Z-Wave]->Razberry z-wave: The Z-Wave API Execution Thread was Started or Restarted.
    08:03:44:6371:[Z-Wave]->Razberry z-wave: Getting node information from controller...
    Error: Razberry z-wave: The Razberry z-wave interface did not respond to the request for the HomeID and Node - it may be disconnected or malfunctioning (2).
    08:03:48:5219:[Z-Wave Error]->Razberry z-wave: The Razberry z-wave interface did not respond to the request for the HomeID and Node - it may be disconnected or malfunctioning (2).
    Strangely HS3 only sees all the ports when enable_uart=* is commented out, setting it to 0 also results in ports disappearing.

    So I know the hardware is fine and the Pi3 can talk to the razberry, I'm just not sure if this is an os config issue or a HS3 one.

    I'm in a bit of a catch-22, any ideas?

    Comment


      #3
      It works!

      Got the controller to initialise at last!

      /boot/config.txt
      enable_uart=1
      core_freq=250

      Then used /dev/ttyS0 and it fired up. Happy days.

      Comment

      Working...
      X