Wireguard not automatically connecting

Wireguard not automatically connecting

Hi 

I am having a problem with Wireguard connecting after a reboot or power loss on my IR302 that I have recently purchased.

The Wireguard status shows random settings after each reboot with a different port each time eg.

interface: wg0
  listening port: 42716

The settings stay correct and I can view and click save the tunnel connects successfully eg.

interface: wg0
  public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  private key: (hidden)
  listening port: 51820

peer: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  endpoint: xx.xx.xx.xx:51820
  allowed ips: 0.0.0.0/0
  latest handshake: 21 seconds ago
  transfer: 124 B received, 180 B sent
  persistent keepalive: every 25 seconds


I am on firmware V3.5.78, and have tried downgrading to V3.5.77.

Any suggestions on what could be causing this and workarounds? The IR302 is of no use to me if this cannot automatically reconnect to the Wireguard tunnel.

Thank you