Fix SNMP version to v1 to match radio firmware

This commit is contained in:
Graham McIntire 2026-03-30 13:32:11 -05:00
parent 2006e9e052
commit d3f9f0443e
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -54,7 +54,7 @@ defmodule Microwaveprop.Commercial.SnmpClient do
def poll_af11x(host, community) do
oids = Map.keys(@af11x_oids)
args = ["-v2c", "-c", community, "-t", "5", "-r", "1", host | oids]
args = ["-v1", "-c", community, "-t", "5", "-r", "1", host | oids]
case run_cmd("snmpget", args) do
{output, 0} ->
@ -69,10 +69,10 @@ defmodule Microwaveprop.Commercial.SnmpClient do
def poll_af60(host, community) do
static_oids = Map.keys(@af60_static_oids)
static_args = ["-v2c", "-c", community, "-t", "5", "-r", "1", host | static_oids]
static_args = ["-v1", "-c", community, "-t", "5", "-r", "1", host | static_oids]
station_oids = Enum.map(Map.keys(@af60_station_cols), &"#{@af60_base}.3.1.#{&1}")
station_args = ["-v2c", "-c", community, "-t", "5", "-r", "1", host | station_oids]
station_args = ["-v1", "-c", community, "-t", "5", "-r", "1", host | station_oids]
with {static_out, 0} <- run_cmd("snmpget", static_args),
{station_out, 0} <- run_cmd("snmpgetnext", station_args) do