/dev/null 2>&1 &'); system('sudo echo "" > /var/log/pi-star/pi-star_modemflash.log > /dev/null 2>&1 &'); if (isset($selectedOption)) { system('sudo NP=1 /usr/local/sbin/pistar-modemupgrade ' . escapeshellarg($selectedOption) . ' > /dev/null 2>&1 &'); } } // passed sanity chk. header('Cache-Control: no-cache'); session_start(); if (!isset($_GET['ajax'])) { if (file_exists('/var/log/pi-star/pi-star_modemflash.log')) { $_SESSION['update_offset'] = filesize('/var/log/pi-star/pi-star_modemflash.log'); } else { $_SESSION['update_offset'] = 0; } } if (isset($_GET['ajax'])) { if (!file_exists('/var/log/pi-star/pi-star_modemflash.log')) { exit(); } $handle = fopen('/var/log/pi-star/pi-star_modemflash.log', 'rb'); if (isset($_SESSION['update_offset'])) { fseek($handle, 0, SEEK_END); if ($_SESSION['update_offset'] > ftell($handle)) //log rotated/truncated $_SESSION['update_offset'] = 0; //continue at beginning of the new log $data = stream_get_contents($handle, -1, $_SESSION['update_offset']); $_SESSION['update_offset'] += strlen($data); echo nl2br($data); } else { fseek($handle, 0, SEEK_END); $_SESSION['update_offset'] = ftell($handle); } exit(); } // Get the firmware version if (file_exists('/usr/local/bin/firmware/version.txt')) { $versionData = parse_ini_file('/usr/local/bin/firmware/version.txt', true); } if (isset($versionData['Firmware']['mmdvm_hs_version'])) { $mmdvm_hs_version = $versionData['Firmware']['mmdvm_hs_version']; $dvmega_fw_version = $versionData['Firmware']['dvmega_version']; $rpt_version = $versionData['Firmware']['rpt_version']; $fw_ver_msg = "Latest firmware version(s): Hotspot:". $mmdvm_hs_version. " DV-Mega:".$dvmega_fw_version." Repeater:".$rpt_version."."; } else { $fw_ver_msg = "Unkown (failed to retrieve firmware version)."; } ?>
This tool will attempt to upgrade your selected modem to the latest version available firmware version:
When ready, select your modem type below and click, "Upgrade Modem". Do not interrupt the process or
navigate away from the page while the process is running.
Please understand what you are doing, as well as the risks associated with flashing your modem.
(IMPORTANT: Please note, we are not firmware developers, and we offer no support for firmware.
We provide utilities to update the firmware. For firmware support, you will need to utilise other
support resources from the firmware developers/maintainers or the web.)
Error executing the command.
'; } ?>