From 5336b34a755ab3f105702023198e60766bfebc72 Mon Sep 17 00:00:00 2001 From: Trick Solutions Date: Tue, 3 Jun 2025 22:38:26 -0400 Subject: [PATCH] WiFi AP configuration support for Grandstream devices - Adding support for AP1 and AP2 (#7385) * Add SNMP configuration support for Grandstream HT801,HT802 and GXP2135 devices Added configurable SNMP settings to Grandstream HT801, HT802 and GX92135 provisioning template. Includes enable/disable toggle, SNMP version selection (default v2c), and community string configuration. SNMP is disabled by default for security. * Update app_config.php * WiFi AP configuration support for Grandstream devices Added WiFi access point 1 and 2 configuration (SSID, password, security type) for GRP2612/2613/2614/2615/2616 devices. Includes database configuration entries with unique UUIDs and template variable integration following FusionPBX patterns. --------- Co-authored-by: Matthew Midgett --- app/grandstream/app_config.php | 48 +++++++++++++++++++ .../provision/grandstream/grp2612/{$mac}.xml | 24 ++++++++++ .../provision/grandstream/grp2613/{$mac}.xml | 24 ++++++++++ .../provision/grandstream/grp2614/{$mac}.xml | 24 ++++++++++ .../provision/grandstream/grp2615/{$mac}.xml | 24 ++++++++++ .../provision/grandstream/grp2616/{$mac}.xml | 24 ++++++++++ 6 files changed, 168 insertions(+) diff --git a/app/grandstream/app_config.php b/app/grandstream/app_config.php index 7481ecd53f..97b43b7ffb 100644 --- a/app/grandstream/app_config.php +++ b/app/grandstream/app_config.php @@ -784,6 +784,54 @@ $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; $apps[$x]['default_settings'][$y]['default_setting_description'] = "Configure the security to use when connecting to a hidden SSID. Valid values: None, WEP, WPA/WPA2_PSK, 802.1X_EAP"; $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c1d2e3f4-5a6b-7c8d-9e0f-1a2b3c4d5e6f"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wifi_ap1_ssid"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "WiFi Access Point 1 SSID (network name)."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d2e3f4g5-6b7c-8d9e-0f1g-2b3c4d5e6f7g"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wifi_ap1_password"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "WiFi Access Point 1 password."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e3f4g5h6-7c8d-9e0f-1g2h-3c4d5e6f7g8h"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wifi_ap1_type"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "WPA_PSK"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "WiFi Access Point 1 security type. Valid values: None, WEP, WPA_PSK, WPA_WPA2_PSK, WPA_WPA2_EAP, Auto."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f4g5h6i7-8d9e-0f1g-2h3i-4d5e6f7g8h9i"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wifi_ap2_ssid"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "WiFi Access Point 2 SSID (network name)."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "g5h6i7j8-9e0f-1g2h-3i4j-5e6f7g8h9i0j"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wifi_ap2_password"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = ""; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "WiFi Access Point 2 password."; + $y++; + $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "h6i7j8k9-0f1g-2h3i-4j5k-6f7g8h9i0j1k"; + $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; + $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_wifi_ap2_type"; + $apps[$x]['default_settings'][$y]['default_setting_name'] = "text"; + $apps[$x]['default_settings'][$y]['default_setting_value'] = "WPA_PSK"; + $apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true"; + $apps[$x]['default_settings'][$y]['default_setting_description'] = "WiFi Access Point 2 security type. Valid values: None, WEP, WPA_PSK, WPA_WPA2_PSK, WPA_WPA2_EAP, Auto."; + $y++; $apps[$x]['default_settings'][$y]['default_setting_uuid'] = "032e7e44-2f61-4d62-ba64-00199a51b4f6"; $apps[$x]['default_settings'][$y]['default_setting_category'] = "provision"; $apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "grandstream_dhcp_option_override"; diff --git a/resources/templates/provision/grandstream/grp2612/{$mac}.xml b/resources/templates/provision/grandstream/grp2612/{$mac}.xml index 9126e7f867..cdc766f6ad 100644 --- a/resources/templates/provision/grandstream/grp2612/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2612/{$mac}.xml @@ -1488,19 +1488,31 @@ +{if isset($grandstream_wifi_ap1_ssid)} + {$grandstream_wifi_ap1_ssid} +{else} +{/if} +{if isset($grandstream_wifi_ap1_password)} + {$grandstream_wifi_ap1_password} +{else} +{/if} +{if isset($grandstream_wifi_ap1_type)} + {$grandstream_wifi_ap1_type} +{else} WPA_PSK +{/if} @@ -1524,19 +1536,31 @@ +{if isset($grandstream_wifi_ap2_ssid)} + {$grandstream_wifi_ap2_ssid} +{else} +{/if} +{if isset($grandstream_wifi_ap2_password)} + {$grandstream_wifi_ap2_password} +{else} +{/if} +{if isset($grandstream_wifi_ap2_type)} + {$grandstream_wifi_ap2_type} +{else} WPA_PSK +{/if} diff --git a/resources/templates/provision/grandstream/grp2613/{$mac}.xml b/resources/templates/provision/grandstream/grp2613/{$mac}.xml index 294b7e256f..5d02269207 100644 --- a/resources/templates/provision/grandstream/grp2613/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2613/{$mac}.xml @@ -1488,19 +1488,31 @@ +{if isset($grandstream_wifi_ap1_ssid)} + {$grandstream_wifi_ap1_ssid} +{else} +{/if} +{if isset($grandstream_wifi_ap1_password)} + {$grandstream_wifi_ap1_password} +{else} +{/if} +{if isset($grandstream_wifi_ap1_type)} + {$grandstream_wifi_ap1_type} +{else} WPA_PSK +{/if} @@ -1524,19 +1536,31 @@ +{if isset($grandstream_wifi_ap2_ssid)} + {$grandstream_wifi_ap2_ssid} +{else} +{/if} +{if isset($grandstream_wifi_ap2_password)} + {$grandstream_wifi_ap2_password} +{else} +{/if} +{if isset($grandstream_wifi_ap2_type)} + {$grandstream_wifi_ap2_type} +{else} WPA_PSK +{/if} diff --git a/resources/templates/provision/grandstream/grp2614/{$mac}.xml b/resources/templates/provision/grandstream/grp2614/{$mac}.xml index 294b7e256f..5d02269207 100644 --- a/resources/templates/provision/grandstream/grp2614/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2614/{$mac}.xml @@ -1488,19 +1488,31 @@ +{if isset($grandstream_wifi_ap1_ssid)} + {$grandstream_wifi_ap1_ssid} +{else} +{/if} +{if isset($grandstream_wifi_ap1_password)} + {$grandstream_wifi_ap1_password} +{else} +{/if} +{if isset($grandstream_wifi_ap1_type)} + {$grandstream_wifi_ap1_type} +{else} WPA_PSK +{/if} @@ -1524,19 +1536,31 @@ +{if isset($grandstream_wifi_ap2_ssid)} + {$grandstream_wifi_ap2_ssid} +{else} +{/if} +{if isset($grandstream_wifi_ap2_password)} + {$grandstream_wifi_ap2_password} +{else} +{/if} +{if isset($grandstream_wifi_ap2_type)} + {$grandstream_wifi_ap2_type} +{else} WPA_PSK +{/if} diff --git a/resources/templates/provision/grandstream/grp2615/{$mac}.xml b/resources/templates/provision/grandstream/grp2615/{$mac}.xml index 294b7e256f..5d02269207 100644 --- a/resources/templates/provision/grandstream/grp2615/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2615/{$mac}.xml @@ -1488,19 +1488,31 @@ +{if isset($grandstream_wifi_ap1_ssid)} + {$grandstream_wifi_ap1_ssid} +{else} +{/if} +{if isset($grandstream_wifi_ap1_password)} + {$grandstream_wifi_ap1_password} +{else} +{/if} +{if isset($grandstream_wifi_ap1_type)} + {$grandstream_wifi_ap1_type} +{else} WPA_PSK +{/if} @@ -1524,19 +1536,31 @@ +{if isset($grandstream_wifi_ap2_ssid)} + {$grandstream_wifi_ap2_ssid} +{else} +{/if} +{if isset($grandstream_wifi_ap2_password)} + {$grandstream_wifi_ap2_password} +{else} +{/if} +{if isset($grandstream_wifi_ap2_type)} + {$grandstream_wifi_ap2_type} +{else} WPA_PSK +{/if} diff --git a/resources/templates/provision/grandstream/grp2616/{$mac}.xml b/resources/templates/provision/grandstream/grp2616/{$mac}.xml index 294b7e256f..5d02269207 100644 --- a/resources/templates/provision/grandstream/grp2616/{$mac}.xml +++ b/resources/templates/provision/grandstream/grp2616/{$mac}.xml @@ -1488,19 +1488,31 @@ +{if isset($grandstream_wifi_ap1_ssid)} + {$grandstream_wifi_ap1_ssid} +{else} +{/if} +{if isset($grandstream_wifi_ap1_password)} + {$grandstream_wifi_ap1_password} +{else} +{/if} +{if isset($grandstream_wifi_ap1_type)} + {$grandstream_wifi_ap1_type} +{else} WPA_PSK +{/if} @@ -1524,19 +1536,31 @@ +{if isset($grandstream_wifi_ap2_ssid)} + {$grandstream_wifi_ap2_ssid} +{else} +{/if} +{if isset($grandstream_wifi_ap2_password)} + {$grandstream_wifi_ap2_password} +{else} +{/if} +{if isset($grandstream_wifi_ap2_type)} + {$grandstream_wifi_ap2_type} +{else} WPA_PSK +{/if}