OpenGD77 Hotspot users please update to the new version

posted in: DMR, GD-77, Ham radio | 28

While doing some testing for VK7ZJA this morning, to track down a bug in the official Anytone firmware, I managed to cause the OpenGD77 Hotspot being used by Clayton VK7ZCR to lock-up it was transmitting.

Fabio IZ2BKS had reported this bug to me a few days ago, and I had attempted to fix it, however because I was not able to replicate the bug, the fix I sent to Fabio was based on guessing what was causing the problem, and my guess proved to be wrong.

Clayton VK7ZCR was able to cause my OpenGD77 Hotspot to hang during transmission, and because my hotspot was running in the debugger attached to my PC, I was able to see what the Hotspot was doing when it hung.

The Hotspot hung while waiting for the Tx buffer to re-fill, with DMR frames from the network, but due to a combination of conditions, no DMR data was being sent by MMDVMHost to the OpenGD77 hotspot, and hence the Hotspot stayed permanently in its TX_BUFFERING state.

Normally the TX_BUFFERING state occurs after the OpenGD77 Hotspot receives the Voice Link Connect frames from MMDVMHost, and while its waiting for a few DMR voice frames to arrive and be put into the Tx DMR frame buffer. Then once there are 4 frames in the buffer the GD-77 Tx hardware is turned to start transmitting the DMR audio.

The TX_BUFFER state is also used, if the TX DMR frame buffer has become empty, because the other station has stopped transmitting,  but while the GD-77 Tx hardware is shutting down, and transmitting the 6 mandatory Link Terminator frames , (which takes 360mS to complete).. some more network data then arrives during that 360mS shutdown phase.

Consequentially, if during the Tx shutdown phase, a few extra DMR Voice frames arrives, the Hotspot would go back into TX_BUFFERING state, but would never leave that state, because not enough voice frames would arrive, because the transmission at the other end of the network had actually ended.

To correct this problem I’ve made several changes.

  1. I’ve added a 500mS timeout in the TX_BUFFERING state, so that if this timeout is exceeded whilst waiting for data from the network, the Hotspot will reinitialize and go back into Rx mode.
  2. Also if PiStar (MMDVMHost) sets the OpenGD77 Hotspot into IDLE mode while its in TX_BUFFERING mode, it immediately goes back into its Rx mode

The combination of these 2 changes seems to have made the Hotspot a lot more robust, and neither Clayton VK7ZCR or I can now replicate the same bug, no matter how quickly or how many times we re-key the PTT, even if we re-key multiple times in quick succession.

 

All OpenGD77 users should update to the new version (v0.0.5) before they use their OpenGD77 Hotspot again, from my “daily builds” link

https://github.com/rogerclarkmelbourne/OpenGD77/raw/master/firmware_binaries/daily_builds/firmware.sgl

After the update PiStar should show that the version of the Hotspot is now v0.0.5

28 Responses

  1. Aldo
    |

    Hi Roger, thanks for your great work, I’m trying the ver. 0.0.5 and I will tell you if there will be any further blocks in Tx.
    Together with other friends, I would like to support your efforts, of which many take advantage, for example with a donation via Pay Pal.
    Thank you so much again
    IU2GDE Aldo

  2. vr2vye
    |

    The MD-760 pi-star can read the firmware ,but cannot send and receive.

  3. Reggie
    |

    Just a question but can you update it through pistar or does it have to be through the updater/software

  4. Ken
    |

    Hi Roger,

    I’m not a programmer or anything. But I think I discovered a bug in the newest version v0.0.5. When talker alias kicks in on MMDVMHost it causes it to stop transmitting and disappear from the pi. Not really sure what to do. I don’t seem to be able to get it to transmit for more than 1 second.

  5. Roger Clark
    |

    I only changed the logic for Tx shutdown and buffering.

    It should not have affected TA, but I only tested on DMR+ which does not support TA.

    So I will test on BM

  6. Roger Clark
    |

    Interesting point.

    In theory PiStar could update the GD-77, and I did write a python based updater which would probably run on PiStar, but I don’t have time to test that as an update method.

    I think my python code is in my GD77 repo that contains all the different versions of official firmware and other utilities etc.

    So you could try to use it to update from PiStar if you want, and potentially send a PR to the PiStar repo manages by Andy Tailor to include it into Pistar

  7. Roger Clark
    |

    Ken

    I can’t replicate that bug.

    I tested on BM and DMR+ and just checked with my testers including N1ID who has been using it on BM all day and not had any problems

  8. RiKu Bister
    |

    Heya Roger, i have been testing this since yesterday (mostly listening, not talking) and there is major improvement on audio shuttering, it not doing that so much anymore. big improvement, thanks for that.

    However when i set hotspot power to 100(full) on mmdvmhost(to let radio power setting come true), and from radio set txpower to about 600 then i will get on screen 1714208mW is that normal? this was also on older version.. the power setting works but on screen it says garbage numbers.. if power is set from pi-star then there is more reasonable numbers.

    OH1E

  9. Roger Clark
    |

    Minimum power setting is 800.

    I should have checked or values below that and not allow them. The value of power is wrong, because its trying to display a negative number for power in a field that can only display positive numbers

    Change the value to around 850. Or just set 1% in PiStar

  10. RiKu Bister
    |

    850 is too much, it works with less. i want less. actually with that high power 850 charging port dont like at all, it get way too much rf :DD and led light will blink. same with 1% on pi-star is too much. i managed to get alot less power this way.

  11. Roger Clark
    |

    I just checked and min is set to 775

    Use 775 or 776 if you want, it will only be a few mW and its likely you are not even using the PA at all, because the AT-1846S transceiver chip inside the radio probably outputs 10 or 20mW, into the input of the PA, which you are probably picking up on your other radios.

  12. RiKu Bister
    |

    Did you knew on VHF it has more power output..? so setting 775 is not that what might think it is.
    VHF setting 1100 -> 0.1W
    VHF setting 1600 -> 1W
    VHF setting 2000 -> 2W
    VHF setting 2500 -> 3.5W
    VHF setting 3000 -> 5W+
    UHF setting 1100 -> too low to measure
    UHF setting 1300 -> 0.3W
    UHF setting 2000 -> 1W
    UHF setting 2500 -> 2.5W
    UHF setting 3000 -> 4.5W
    UHF setting 3500 -> 5.5W+
    this is measured with diamond SX-600 meter with dummy load. ON FM ANALOG.

    I do have also radio communicator tester spectrum analyzer, and our club has also. i might later try with them for more precise info with lower power.

  13. Roger Clark
    |

    Yes. The VHF PA is more efficient than the UHF PA

    There are in theory 2 calibrated points for each 5Mhz freq range that the radio supports, which contain that number divided by 16, but I have found the calibration values on some radios are not that accurate.

  14. John KM6YLK
    |

    Roger, Thank you for the firmware. I experimented and got my GD-77 converted for pi-star on a Pi-3. I updated the firmware to the latest version and now the console isn’t seeing the radio. I previously had it configured as the USB Libre, and now it is the GD-77USB. Any advice? I can be reached at jsteakman@hotmail.com. Thank you so much in advance.

  15. Roger Clark
    |

    John

    I’d recommend you power cycle everything. Make sure the GD-77 has booted before you power-up PiStar.

    The MMDVMHost task seems to crash in PiStar if the USB is unplugged or the radio is rebooted etc.

    The OpenGD77 Hotspot mode will also work with the Zumspot Libre setting, as they are both USB devices, its just that the dashboard can’t read the version number because the identification text that the Zumspot Libre sends back t MMDVMHost is different from the OpenGD77 and the version number is not in the same place in the “modem description”

    BTW.
    Do you mean you actually had a Zumspot Libre attached , or just that prior to the OpenGD77 DMR Hotspot option being added to PiStar, that you were using the Zumspot Libre option for the OpenGD77

    You can only have one USB modem attached to PiStar at a time, it does not have a way of selecting which modem is which.
    The “modem” menu does not really do what its name implies it does.

  16. Johan Hansson
    |

    I upgraded my GD77 without no problem hotspot works, but only by sending gateway traffic when sending from another radio (tried PD785 and Anytone 878) the GD77 seems not to receive, do you have any suggestion?

    //Johan

  17. Roger Clark
    |

    RF Offset ??
    Colour Code ??

  18. Johan Hansson
    |

    No offset and correct color code using same settings as other hotspots

  19. Johan Hansson
    |

    Gd77 is transmitting network traffic fine but seems not to receive

  20. Johan Hansson
    |

    Hi Roger, I am using the same settings that worked with my Zumspots etc.. CC is correct as I hear traffic comming from the network but the GD77 seems not to receive RF traffic.. Another question trying to read the GD77 with OpenGD77 with the community CPS I get “Device not found”… Reverting back to stock firmware I can read the GD77 with the same CPS.. Any suggestion?

    //Johan

  21. Johan Hansson
    |

    Tried now on another GD77 same with that one.. I cannot get it to receive Local RF in hotspot mode.. Normal mode works fine so the RX is functional in the unit.. Any suggestions

    //Johan

  22. Johan Hansson
    |

    Also tried another GD77 as terminal still no luck.. I cannot get the GD77 in hotspot mode to RX

  23. Johan Hansson
    |

    Problem seemed to have been to a faulty PSU to my RPi, changed it and now it works…

  24. Roger Clark
    |

    Strange..

    It must have been causing interference

  25. Johan Hansson
    |

    Regarding the Community CPS, Is it normal that the an upgraded unit (with OpenGD77) cannot be read or written to the “normal” way but only via the OpenGD77 menu?
    //Johan

  26. Roger Clark
    |

    Yes.

    PiStar communicates with USB hotspots using USB serial, hence the OpenGD77 firmware must operate as a USB Serial slave device.

    The official firmware communicates via USB with the CPS as a USB HID device.

    It’s not possible for the OpenGD77 to be both a USB HID device and also USB Serial.
    It would not fit in the ROM.

    In theory the OpenGD77 could be written with 2 completely separate versions, one with USB HID that does not support Hotspot mode, and one that uses USB Serial and has Hotspot mode.

    But I will not be doing that , because it’s a code maintenance nightmare that I simply don’t have time for.

  27. Gary Vav
    |

    Thanks Roger, Great job I’ve done it.

  28. Johan Hansson
    |

    Thanks info Roger

    //Johan

Leave a Reply