2 hotspots failed after upgrade to 4.1.2

General support for the Pi-Star System
K5MRE
Posts: 29
Joined: Sun May 27, 2018 1:28 pm

Re: 2 hotspots failed after upgrade to 4.1.2

Post by K5MRE »

Both Nextion and TFT Serial.

Was this changed recently? it's assuming '/dev/'. There should be an exception for port modem.

Code: Select all

        // Set the MMDVMHost Display Type
        if  (empty($_POST['mmdvmDisplayPort']) != TRUE ) {
          if ($_POST['mmdvmDisplayPort'] == "None") {
                  $configmmdvm['TFT Serial']['Port'] = $_POST['mmdvmDisplayPort'];
                  $configmmdvm['Nextion']['Port'] = $_POST['mmdvmDisplayPort'];
          } else {
                  $configmmdvm['TFT Serial']['Port'] = "/dev/".$_POST['mmdvmDisplayPort'];
                  $configmmdvm['Nextion']['Port'] = "/dev/".$_POST['mmdvmDisplayPort'];
          }
        }
K5MRE
Posts: 29
Joined: Sun May 27, 2018 1:28 pm

Re: 2 hotspots failed after upgrade to 4.1.2

Post by K5MRE »

Yeah - looks like there were two recent commits that added the '/dev/'.

commit c28f23f6fce71531738febfb6b5c17e938b022cb

... was the first.
K5MRE
Posts: 29
Joined: Sun May 27, 2018 1:28 pm

Re: 2 hotspots failed after upgrade to 4.1.2

Post by K5MRE »

Proposed fix. I'd submit via git but I always forget how.

Code: Select all

diff --git a/admin/configure.php b/admin/configure.php
index f2013a4..fbde7b5 100755
--- a/admin/configure.php
+++ b/admin/configure.php
@@ -1876,7 +1876,7 @@ if ($_SERVER["PHP_SELF"] == "/admin/configure.php") {
 
        // Set the MMDVMHost Display Type
        if  (empty($_POST['mmdvmDisplayPort']) != TRUE ) {
-         if ($_POST['mmdvmDisplayPort'] == "None") {
+         if ($_POST['mmdvmDisplayPort'] == "None" || $_POST['mmdvmDisplayPort'] == "modem" ) {
                  $configmmdvm['TFT Serial']['Port'] = $_POST['mmdvmDisplayPort'];
                  $configmmdvm['Nextion']['Port'] = $_POST['mmdvmDisplayPort'];
          } else {
@@ -3034,7 +3034,7 @@ else:
                 } else {
                         echo '      <option value="modem">modem</option>'."\n";
                 }
-                if ( ($configmmdvm['Nextion']['Port'] == "None") || ($configmmdvm['Nextion']['Port'] == "" )) { } else {
+                if ( ($configmmdvm['Nextion']['Port'] == "None") || $_POST['mmdvmDisplayPort'] == "modem" || ($configmmdvm['Nextion']['Port'] == "" )) { } else {
                        $currentPort = str_replace($configmmdvm['Nextion']['Port'], "/dev/", "");
                         echo '      <option selected="selected" value="'.$currentPort.'">'.$configmmdvm['Nextion']['Port'].'</option>'."\n";
                 }
K5MRE
Posts: 29
Joined: Sun May 27, 2018 1:28 pm

Re: 2 hotspots failed after upgrade to 4.1.2

Post by K5MRE »

... so the above should fix some of the cases.

I think the other cases, like mine, were probably having a pre-installed NextionDriver. I suspect I had it on there before and it likely loaded out of order, killing access to any other program.

Assuming the previous patch fixes some of the cases, for the others, if folks run a 'systemctl -a | grep -I nextion' and/or 'ps -aef | grep -i nextion' and post the results back, it'd help.
K5MRE
Posts: 29
Joined: Sun May 27, 2018 1:28 pm

Re: 2 hotspots failed after upgrade to 4.1.2

Post by K5MRE »

This one was I was starting fresh with, so it didn't have NextionDriver already on it. That's why it didn't have any references to it.

Your settings are exactly correct. As long as NextionDriver is loading in the proper order, it should be set to /dev/NextionDriver in those sections and nextion set to modem so it can shim itself in the middle.

Andy - Let me know if you need me to put in a pull request for that. I don't have anything setup right now to send it, but I can. Prob easier to just add the edit yourself if you agree with it.
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: 2 hotspots failed after upgrade to 4.1.2

Post by MW0MWZ »

Thats super weird - I wonder why mine didnt break...

Looking at that now...
Andy

73 de MW0MWZ
http://pistar.uk
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: 2 hotspots failed after upgrade to 4.1.2

Post by MW0MWZ »

Thanks for pointing out where this was broken.. the config page has been updated and will now correctly set "modem" rather than "/dev/modem"
Also the page has been setup to auto-fix broken configs that have "/dev/modem" set for the screen even if you dont re-choose "modem" from the list of ports.

That should clear these up...
Andy

73 de MW0MWZ
http://pistar.uk
W4BPP
Posts: 11
Joined: Sun Sep 29, 2019 2:19 pm

Re: 2 hotspots failed after upgrade to 4.1.2

Post by W4BPP »

Hey fantastic. I'm the other guy (op). Work corralled me for the day yesterday. One of my hotspots I rebuilt on a new card so I can get you whatever you might want from the non-working config or try tests to revive it. The other one came back to life when I inadvertently selected NONE for the oled3 display and then cold booted (just applying didn't do it for some reason).

Let me know if you want anything from my stick broke config to verify the fix or if you want me to manually adjust something to get it working.
User avatar
kd2lh
Posts: 33
Joined: Thu Aug 22, 2019 3:26 pm

Re: 2 hotspots failed after upgrade to 4.1.2

Post by kd2lh »

KE7FNS wrote: Thu May 28, 2020 1:01 am
kd2lh wrote: Thu May 28, 2020 12:46 am The OLED IS attached through the /dev/ttyAMA0 port.
No it isn't.

That is the serial port connection from the RPi to the MMDVM hat.


And again, the OLED does not use serial communications, it uses i2c.

type

Code: Select all

sudo i2cdetect -y 1
And you'll see its address which should be 0x3C or maybe 0x22.
The detected address is 0x3c.

The MMDVMHSHAT i2c pins to the RPi are where the OLED is physically attached, but the dashboard configuration options don't include "i2c".

For the "OLED Type 3" display device, the options for Port: only include:

"None"; "modem" "/dev/ttyAMA0" and a second "/dev/ttyAMA0".

Was this involved in the hangup? Why the second "/dev/ttyAMA0"? What is the mechanism that MMDVMHost properly finds the "i2c" connected OLED?

Special code for the type 3 Oled that selects i2c interface from the Rpi to the modem board? Is the "port" selection simply ignored?
K8RWM
Posts: 4
Joined: Tue Nov 20, 2018 11:54 pm

Re: 2 hotspots failed after upgrade to 4.1.2

Post by K8RWM »

I have a N5BOC Duplex Hotspot with no display. I have always been able upgrade Pi-Star to the latest level without issue until now. After upgrading to 4.1.2 the MMDVM hotspot worked fine until rebooting. Following a reboot, TRX stays blank and there is no communication with the hotspot. If I reinstall a lower version, everything works as expected. I have been able to duplicate this issue several times. Something is not quite correct with version 4.1.2.
Post Reply