Mmdvm kicad Duplex hat 14mhz firmware issues

Help with Raspberry Pi Foundation Boards (Raspberry Pi, Pi Zero, Pi Zero W, Pi A, Pi B, Pi B+, Pi2 B, Pi3 B, Pi 3 B+)
User avatar
G8SEZ
Posts: 427
Joined: Fri Apr 13, 2018 8:26 pm

Re: Mmdvm kicad Duplex hat 14mhz firmware issues

Post by G8SEZ »

KE7FNS wrote: Sat Dec 05, 2020 1:45 am
What RPi 4 recognition code are you referring too?
It's the platformDetect.sh change made in August that I was thinking of, it added the 8GB version. Memory failure on my part with that, I thought it did something else.
--

Brian G8SEZ
2E0WKS
Posts: 14
Joined: Sun Jul 21, 2019 10:00 pm

Re: Mmdvm kicad Duplex hat 14mhz firmware issues

Post by 2E0WKS »

KE7FNS wrote: Sat Dec 05, 2020 7:07 am I think I've uncovered half of what the OP is reporting, I still don't know what error he is experiencing though.

The overview of the pistar-mmdvmhshatflash script is that it downloads files from the MMDVM_HS github repo, one of those files is determined by which parameter you enter when executed and that script gets downloaded and renamed to flash.sh

Inside of that script there is some very crude OS detection going on:

https://github.com/juribeparada/MMDVM_H ... hat.sh#L42

The results of "uname -m" on a RPi 4 running Pi-star are the same as on an RPi 3 running Pi-star, WHY??? because they BOTH use the same 32-bit kernel in Pi-star even though they are both ARMv8 64-bit processors.
The message that is output to the console is effectively meaningless. It makes no difference that it says it is a RPi 3 when it is run on an RPi 4. Actually there is another issue that I see and it will say its a RPi 3 when it is run on a RPi 2B, because the RPi 2B runs the same armv7l kernel too.

If you compare the two sections for detecting armv7l against armv6l the sections of code for each are IDENTICAL, so again there is no difference in operation on a system that detects armv7l against one detected as armv6l, both of them are set to the same values when run on their respective kernel

Basically the way the script determines the platform from "uname -m" is poorly done at best. If it were properly written it should parse something like /proc/cpuinfo to retrieve the correct RPi hardware model, but realistically it isn't really needed and it is just extra meaningless fluff written to the screen. The other sections allow for the script to function correctly on x86_64 and 32-bit Linux OS's (non ARM)

Theres really no reason to have two separate cases when they both run identical code in side them. Both of those sections could be combined into one with a simple OR statement, and one line to retrieve the RPi hardware model info.

The simple fact it boils down to is it isn't a Pi-star related script, its a script from MMDVM_HS that is DOWNLOADED, so it isn't really Pi-star's responsibility. The OP needs to create 2 new issues on the MMDVM_HS github, one for the YSF cutting out after 29 seconds, and the other for the incorrect detection of the RPi model during flashing.
Pi4 flashing on ki cad clone of a clone HS_DUEL HAT firmware flask fails and ACK warning JP1 SOLDERED.
FLASHES FINE ON ZERO
the high BER after 29 seconds resolved by using roger clark driver suspect txco fitted.

I love Pi-star but find the forum abrasive, it's not criticism just want to see project evolve.

73
M0WKS
User avatar
G8SEZ
Posts: 427
Joined: Fri Apr 13, 2018 8:26 pm

Re: Mmdvm kicad Duplex hat 14mhz firmware issues

Post by G8SEZ »

I think we all want to see the project evolve sensibly, but certain features of its past make that more difficult. Perhaps there will be a change in this regard but it's not exactly clear to me what and when. Speaking in riddles is de rigeur in some respects.

If all the code were public then it would be easier to understand what's going on, but it's not there yet.

As for the flashing script it clearly doesn't recognise the RPi4 as a specific board, and I think that's where it's going wrong. You could ask Andy CA6JAU to sort this out, the RPi4s are new enough that they're not thoroughly debugged in the MMDVM_HS code and supporting scripts yet. If you raise an issue then something should happen eventually.
--

Brian G8SEZ
KE7FNS
Pi-Star Team
Posts: 1782
Joined: Wed Apr 17, 2019 11:11 pm

Re: Mmdvm kicad Duplex hat 14mhz firmware issues

Post by KE7FNS »

2E0WKS wrote: Mon Dec 07, 2020 9:07 pm Pi4 flashing on ki cad clone of a clone HS_DUEL HAT firmware flask fails and ACK warning JP1 SOLDERED.
FLASHES FINE ON ZERO
You should test it on an RPi 3, 2, or any other RPi for that matter.

Please post the EXACT output so I can read the error message reported and can narrow down where in the script it fails. You've probably got a faulty serial port on your RPi or something, either way it is specific to YOUR hardware you are using, as I can flash different dual hats using an RPi 4 all day long with different versions, and if you would like I'll provide you with video evidence of the procedure.
2E0WKS wrote: Mon Dec 07, 2020 9:07 pm the high BER after 29 seconds resolved by using roger clark driver suspect txco fitted.
I'm glad you got that sorted.
2E0WKS wrote: Mon Dec 07, 2020 9:07 pm I love Pi-star but find the forum abrasive, it's not criticism just want to see project evolve.
You come here reporting 'Pi-star issues' but fail to provide details when asked for more information.
G8SEZ wrote: Mon Dec 07, 2020 10:10 pm As for the flashing script it clearly doesn't recognise the RPi4 as a specific board, and I think that's where it's going wrong. You could ask Andy CA6JAU to sort this out, the RPi4s are new enough that they're not thoroughly debugged in the MMDVM_HS code and supporting scripts yet. If you raise an issue then something should happen eventually.
The script doesn't need to detect the RPi 4 or any RPi model, it simply checks the kernel version and prints a message.

Its funny that I don't have any issues flashing different model hats with an RPi 4, the script works fine as it is written for me. That tells me its something to do with the OP's hardware, not the script being faulty.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
KE7FNS
Pi-Star Team
Posts: 1782
Joined: Wed Apr 17, 2019 11:11 pm

Re: Mmdvm kicad Duplex hat 14mhz firmware issues

Post by KE7FNS »

This is the output of my successful hat downgrade flashing.

Code: Select all

[email protected](rw):~$ grep -i hardware /proc/cpuinfo
Hardware        : BCM2711
[email protected](rw):~$ grep -i model /proc/cpuinfo
model name      : ARMv7 Processor rev 3 (v7l)
model name      : ARMv7 Processor rev 3 (v7l)
model name      : ARMv7 Processor rev 3 (v7l)
model name      : ARMv7 Processor rev 3 (v7l)
Model           : Raspberry Pi 4 Model B Rev 1.2
[email protected](rw):~$ sudo pistar-mmdvmhshatdowngrade hs_dual_hat
Press any key to downgrade the hs_dual_hat firmware on this modem or Ctrl-C to quit...
Please choose the version to flash from the following list of 13 items by entering the corresponding line number:
1) v1.5.2
2) v1.5.1
3) v1.4.17
4) v1.4.16
5) v1.4.14
6) v1.4.12
7) v1.4.8
8) v1.4.7
9) v1.4.6
10) v1.4.3
11) v1.4.1
12) v1.3.7
13) v1.3.6

Please enter your choice or "q" to abort and press [ENTER]: 3

Your choice: 3 (v1.4.17)

Flashing your hs_dual_hat modem to the v1.4.17 version
--2020-12-07 19:58:54--  http://github.com/juribeparada/MMDVM_HS/releases/download/v1.4.17/install_fw_hsdualhat.sh
Resolving github.com (github.com)... 140.82.114.4
Connecting to github.com (github.com)|140.82.114.4|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://github.com/juribeparada/MMDVM_HS/releases/download/v1.4.17/install_fw_hsdualhat.sh [following]
--2020-12-07 19:58:54--  https://github.com/juribeparada/MMDVM_HS/releases/download/v1.4.17/install_fw_hsdualhat.sh
Connecting to github.com (github.com)|140.82.114.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/80589711/51a5d200-825a-11e9-9478-db1206f9a535?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201208%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201208T025855Z&X-Amz-Expires=300&X-Amz-Signature=b637ef758c7e00e514a015abf3201800bdc3b6581b194a7040b7a2268dd57004&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=80589711&response-content-disposition=attachment%3B%20filename%3Dinstall_fw_hsdualhat.sh&response-content-type=application%2Foctet-stream [following]
--2020-12-07 19:58:55--  https://github-production-release-asset-2e65be.s3.amazonaws.com/80589711/51a5d200-825a-11e9-9478-db1206f9a535?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201208%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201208T025855Z&X-Amz-Expires=300&X-Amz-Signature=b637ef758c7e00e514a015abf3201800bdc3b6581b194a7040b7a2268dd57004&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=80589711&response-content-disposition=attachment%3B%20filename%3Dinstall_fw_hsdualhat.sh&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.217.36.164
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.217.36.164|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2942 (2.9K) [application/octet-stream]
Saving to: ‘/tmp/mmdvmhshatfirmware/flash.sh’

/tmp/mmdvmhshatfirm 100%[===================>]   2.87K  --.-KB/s    in 0s

2020-12-07 19:58:55 (6.68 MB/s) - ‘/tmp/mmdvmhshatfirmware/flash.sh’ saved [2942/2942]

FINISHED --2020-12-07 19:58:55--
Total wall clock time: 2.0s
Downloaded: 1 files, 2.9K in 0s (6.68 MB/s)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   648  100   648    0     0   1846      0 --:--:-- --:--:-- --:--:--  1851
100 50452  100 50452    0     0  64270      0 --:--:-- --:--:-- --:--:--  174k
Cloning into 'STM32F10X_Lib'...
remote: Enumerating objects: 193, done.
remote: Total 193 (delta 0), reused 0 (delta 0), pack-reused 193
Receiving objects: 100% (193/193), 3.28 MiB | 5.41 MiB/s, done.
Resolving deltas: 100% (71/71), done.
Raspberry Pi 3 detected
stm32flash Arduino_STM32_0.9

http://github.com/rogerclarkmelbourne/arduino_stm32

Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (Medium-density)
- RAM        : 20KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote and verified address 0x0800c514 (100.00%) Done.

Starting execution at address 0x08000000... done.


Flashing your hs_dual_hat modem complete, press any key to reboot your Pi-Star System...
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
KE7FNS
Pi-Star Team
Posts: 1782
Joined: Wed Apr 17, 2019 11:11 pm

Re: Mmdvm kicad Duplex hat 14mhz firmware issues

Post by KE7FNS »

This is the output of a normal flash upgrade.

Code: Select all

[email protected](ro):~$ grep -i hardware /proc/cpuinfo
Hardware        : BCM2711
[email protected](ro):~$ grep -i model /proc/cpuinfo
model name      : ARMv7 Processor rev 3 (v7l)
model name      : ARMv7 Processor rev 3 (v7l)
model name      : ARMv7 Processor rev 3 (v7l)
model name      : ARMv7 Processor rev 3 (v7l)
Model           : Raspberry Pi 4 Model B Rev 1.2
[email protected](ro):~$ sudo pistar-mmdvmhshatflash hs_dual_hat
Press any key to write the hs_dual_hat firmware to this modem or Ctrl-C to quit...
Flashing your hs_dual_hat modem to the latest version
URL transformed to HTTPS due to an HSTS policy
--2020-12-07 20:01:49--  https://github.com/juribeparada/MMDVM_HS/releases/download/v1.5.2/install_fw_hsdualhat.sh
Resolving github.com (github.com)... 140.82.112.4
Connecting to github.com (github.com)|140.82.112.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/80589711/1acb3e00-21fa-11eb-883b-4e826c17310a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201208%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201208T030150Z&X-Amz-Expires=300&X-Amz-Signature=52650f939858c633abfb7b75e62e9cc5c9e33064a91cbcd1368601481fefc488&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=80589711&response-content-disposition=attachment%3B%20filename%3Dinstall_fw_hsdualhat.sh&response-content-type=application%2Foctet-stream [following]
--2020-12-07 20:01:50--  https://github-production-release-asset-2e65be.s3.amazonaws.com/80589711/1acb3e00-21fa-11eb-883b-4e826c17310a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201208%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201208T030150Z&X-Amz-Expires=300&X-Amz-Signature=52650f939858c633abfb7b75e62e9cc5c9e33064a91cbcd1368601481fefc488&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=80589711&response-content-disposition=attachment%3B%20filename%3Dinstall_fw_hsdualhat.sh&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.146.211
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.146.211|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3092 (3.0K) [application/octet-stream]
Saving to: ‘/tmp/mmdvmhshatfirmware/flash.sh’

/tmp/mmdvmhshatfirm 100%[===================>]   3.02K  --.-KB/s    in 0s

2020-12-07 20:01:50 (8.46 MB/s) - ‘/tmp/mmdvmhshatfirmware/flash.sh’ saved [3092/3092]

FINISHED --2020-12-07 20:01:50--
Total wall clock time: 1.9s
Downloaded: 1 files, 3.0K in 0s (8.46 MB/s)
./flash.sh: line 29: [: =: unary operator expected
Downloading latest firmware (stable)...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   648  100   648    0     0   1775      0 --:--:-- --:--:-- --:--:--  1775
100 52648  100 52648    0     0  64837      0 --:--:-- --:--:-- --:--:--  530k
Cloning into 'STM32F10X_Lib'...
remote: Enumerating objects: 193, done.
remote: Total 193 (delta 0), reused 0 (delta 0), pack-reused 193
Receiving objects: 100% (193/193), 3.28 MiB | 5.02 MiB/s, done.
Resolving deltas: 100% (71/71), done.
Raspberry Pi 3 detected
stm32flash Arduino_STM32_0.9

http://github.com/rogerclarkmelbourne/arduino_stm32

Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (Medium-density)
- RAM        : 20KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote and verified address 0x0800cda8 (100.00%) Done.

Starting execution at address 0x08000000... done.


Flashing your hs_dual_hat modem complete, press any key to reboot your Pi-Star System...

As you can clearly see, the scripts work perfectly on a Raspberry Pi 4 therefore the flashing problem must be your specific hardware, like you have a bad serial port on the RPi 4.

I realize I'm wasting my time trying to teach something to someone who isn't willing to learn, but oh well maybe someone else will learn from all of this.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
KE7FNS
Pi-Star Team
Posts: 1782
Joined: Wed Apr 17, 2019 11:11 pm

Re: Mmdvm kicad Duplex hat 14mhz firmware issues

Post by KE7FNS »

Heres one just for funzies.

Code: Select all

stm32flash 0.5

http://stm32flash.sourceforge.net/

Using Parser : Raw BINARY
Interface serial_posix: 921600 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (STM32F10xxx Medium-density)
- RAM        : 20KiB  (512b reserved by bootloader)
- Flash      : 128KiB (size first sector: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote and verified address 0x0800cb20 (100.00%) Done.

Starting execution at address 0x08000000... done.
Yeah that says 921600 baud. It literally takes 5 seconds to complete the flash :ugeek:
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
Post Reply