New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question - Analog APRS support, and/or 878 firmware support #59

Open
doronbc opened this Issue Nov 20, 2018 · 311 comments

Comments

Projects
None yet
@doronbc
Copy link

doronbc commented Nov 20, 2018

The D878UV, which appears to be the same hardware can generate an analog APRS message. Is the 868 capable of the same, and/or can the 878 firmware be loaded on the 868 with correct/expected results. Any response is appreciated.

Thanks and 73,
Doron
K1DBC

@bizart

This comment has been minimized.

Copy link

bizart commented Nov 20, 2018

Couple of days ago I have successfully uploaded firmware 1.07 from D878UV to 868. It is a not an "easy" update, requires some additional tools like st-link, because of bootloader differences, but I can confirm that all features are working fine. I am working now on icon update, because of two new menu entries (Roaming, APRS).

73,
Boyan
LZ5VH

@NeuerUser

This comment has been minimized.

Copy link

NeuerUser commented Dec 3, 2018

That's really interesting. So, the first step would then be to flash a new bootloader, I guess. Iis the programming port easily accessible on the pcb?

@Kreischie

This comment has been minimized.

Copy link

Kreischie commented Dec 3, 2018

Hi, i'm very interested to import the firmware from 878 to 868. Any progress in update the logos? Maybe you could specify in how you flashed the firmware from 878 to 868

vy 73
DO7CT

@NeuerUser

This comment has been minimized.

Copy link

NeuerUser commented Dec 3, 2018

As he mentioned the ST-Link, he probably flashed a new bootloader via programming pins on the pcb. Afterwards the Anytone probably accepts the 878 firmware via the normal update process.

@Kreischie

This comment has been minimized.

Copy link

Kreischie commented Dec 3, 2018

Okay, i'm an abolutely newbie in this so i think you need an programmer to do this.

@bizart

This comment has been minimized.

Copy link

bizart commented Dec 3, 2018

Hi,

Initially I was inspired by http://members.optuszoo.com.au/jason.reilly1/868mods.htm research, although I believe that frequency modification doesn't make much sense.

Used microcontroller in 868 / 878 is from GigaDevice GD32F303, actually it is a Chinese "clone" of STM32F series with 1024Kb flash size, so it can be fully accessed and programmed with standard ST-Link through SDIO interface. I am well familiar with STM devices, so looking at pcb board it was obvious that SDIO port is available right next to microcontroller package, so decided to give it a try. First step was to download full flash content including 868 bootloader, as flash was not read protected, next with few modifications to bootloader area and joining 878 update firmware, I was able to flash and run 878 firmware to 868 radio, which anyway is same hardware except bluetooth extension (extension connector is still present). Few issues to mention, although CPS recognizes radio as 878 and all new features are available, firmware can't be updated through Update Utility, and there are couple of missing icons. As soon as and if, Anytone releases Icon update firmware, those can be uploaded, as they reside in external flash.
Another possibility could be that 878 user, downloads entire firmware, including external flash content with ST-Link.

73

@NeuerUser

This comment has been minimized.

Copy link

NeuerUser commented Dec 4, 2018

Hi
Yeah, that was about was I thought you did :) Good work!

Probably the best approach is, indeed, downloading the complete flash from a 878. Then a bundle could be prepared to be flashed to a 868 to convert it into a 878. This bundle then either only consists of bootloader and icon pack, or is a full flash minus calibration area.

Now, how do we get a 878 to you, @bizart ? Either we find a fellow 878 user close to you, or I'll ask if we can all donate some money to you, so you can buy a 878. If we have 20 interested hams, each donating 10 USD, you should be able to get a 878, I guess.

What do you think?

@DL2MF

This comment has been minimized.

Copy link

DL2MF commented Dec 4, 2018

@bizart Enclosed the 128MBit Flash from 878. If you need the ZIP password, please send me an email.
(Notice for other users: Flash memory is not flashable FW! Wait for released version.)

@NeuerUser

This comment has been minimized.

Copy link

NeuerUser commented Dec 4, 2018

Wow, that was faster than I hoped for. Thanks, Mike. (Did you switch from MD380 to Anytone? Thanks for your great work there. I had a MD380 before I got the Anytone 868. Would be too good to be true, if we could start a similar open source project one day...)

@DL2MF

This comment has been minimized.

Copy link

DL2MF commented Dec 4, 2018

I've still some plannings for MD380tools, but also involved a little into GD77 and AT8x8. Might be an interesting future platform.

@bizart

This comment has been minimized.

Copy link

bizart commented Dec 5, 2018

@DL2MF Success,
send you an email

@NeuerUser

This comment has been minimized.

Copy link

NeuerUser commented Dec 6, 2018

@bizart : What did you need to flash? Was the bootloader section plus the icon section sufficient? Or did you need to flash the entire flash area?
Will you be able to prepare a simple package with some instructions for other hams that want to try it?

@NeuerUser

This comment has been minimized.

Copy link

NeuerUser commented Dec 10, 2018

@bizart Do you have any infos for us? We are excited that a conversion is possible.

@bizart

This comment has been minimized.

Copy link

bizart commented Dec 10, 2018

hi, couple of units upgraded completely,
waiting for successful upgrade confirmation from one more user

@cveith

This comment has been minimized.

Copy link

cveith commented Dec 10, 2018

@bizart
Nice to hear that you got it. I really would like to know what i have to do to setup my 868 with the newer firmware.

Is it possible to downgrade to the default 868 firmware again?
What tools (hardware and Software) do i need to perform the upload?

kind regards

Christian DO1CV

@NeuerUser

This comment has been minimized.

Copy link

NeuerUser commented Dec 10, 2018

@cveith : While I hope that @bizart will come up with a small package including a simple tutorial, I can guess currently, how the process will work (as I have flashed some other STM microprocessors).
Hardware: you will need an ST-Link V2 (costs app 3-6 USD). You will need to open the Anytone to get access to the SWIO interface (consisting of four pads, which you need to solder cables or a connector to). You will then connect the ST-Link to the pads and use either STM software (or some open source equivalent) to flash parts of the flash. The flash parts that needs to be flashed, so far only @bizart knows for sure. I guess it is the bootloader and the icon region.

Before you flash you can do a full flash backup, so, yes, you would be able to restore the HT to its original state, using the same process.

After the conversion has been done, you would not need the ST-Link for software updates, as the Anytone would have become a full 878 then.

@cveith

This comment has been minimized.

Copy link

cveith commented Dec 12, 2018

Would be nice :) my st-link programmer is on the way.

@ayasystems

This comment has been minimized.

Copy link

ayasystems commented Dec 17, 2018

Hi

I have a STLink and a 868 candidate to be flashed... Could you send to me the 878 downloaded full flahs?

ea4gkq [a_t] radiomad [d_o_t] es

Regards

@NeuerUser

This comment has been minimized.

Copy link

NeuerUser commented Dec 17, 2018

@bizart : As you can imagine, we are all waiting in full anticipation. :) Could you tell us, if you will release anything?

Thanks!
Michael

@Gymnae

This comment has been minimized.

Copy link

Gymnae commented Dec 18, 2018

Also very interested in trying this out. A programmer is on its way to me. This is apparently not loved by anytone, as a discussion regarding this option was censored on Facebook - hopefully it can remain here.

@geary

This comment has been minimized.

Copy link
Owner

geary commented Dec 18, 2018

This is apparently not loved by anytone, as a discussion regarding this option was censored on Facebook - hopefully it can remain here.

If you're referring to the AnyToneDMR Facebook group, don't blame AnyTone for deleting any comments. The group isn't run by Qixiang Electron Science Technology Co. Ltd (the AnyTone manufacturer), but by someone who sells their radios and has his own particular style of moderation. (I also had comments deleted along with a 12 hour ban, but that is a story for another day...)

Feel free to continue discussing here, I am interested to hear how this experiment goes!

@bizart

This comment has been minimized.

Copy link

bizart commented Dec 18, 2018

Hi,
Although I believe it is a marketing failure to sell same hardware as a different product, I would like to admire firmware / hardware developers for their wonderful job creating 868 full featured product. Honestly, I don’t care of aprs features, the only reason to dig into, was because of annoying blue background and in my opinion much better looking dark one. Obviously it is not a rocket science to combine existing bootloader with regular manufacturer updates, for anyone familiar with original st microelectronics hardware and thankfully Jason’s initial research. I am grateful to DL2MF for supplying external flash content which allowed me to fix missing icons and finally build fully working 878 firmware. As stated before it is not an “ease” upgrade, or user friendly and has certain disadvantages. Firmware cannot be updated with “regular” flash utility after upgrade, although you can still revert back to 868 firmware with it. Couple of 868 radios flashed and operating normally, but No Any Guarantee it will work for you. 878 CPS functionality is fine. Current assembly is with latest (known to me) 1.09 revision.

I have prepared short explanation of what is done, waiting for successful upgrade confirmation. Stay tuned.

@Gymnae

This comment has been minimized.

Copy link

Gymnae commented Dec 19, 2018

If you're referring to the AnyToneDMR Facebook group, don't blame AnyTone for deleting any comments. The group isn't run by Qixiang Electron Science Technology Co. Ltd (the AnyTone manufacturer), but by someone who sells their radios and has his own particular style of moderation. (I also had comments deleted along with a 12 hour ban, but that is a story for another day...)

Yes, that group. The owner of the group is a bit special. I was banned there too after pointing out that he was spreading a leaked internal beta and presenting it at his finding.

@NeuerUser

This comment has been minimized.

Copy link

NeuerUser commented Dec 20, 2018

Firmware cannot be updated with “regular” flash utility after upgrade, although you can still revert back to 868 firmware with it.

Please help me understand why this is the case.

  • I understand that the hardware is 100% identical, so the difference must be in software only.
  • The software is stored in the 1MB internal MCU flash memory and the 128MB external flash chip.
  • Additionally there is the ROM with the first stage bootloader, which is programmed by STM and should be the same between 868 and 878.
  • Therefore if one is able to extract a copy of the internal and external flash from the 878n and write that to the 868, the 868 effectively becomes a 878 in all respects.

So, what is currently missing then?

Couple of 868 radios flashed and operating normally, but No Any Guarantee it will work for you. 878 CPS functionality is fine. Current assembly is with latest (known to me) 1.09 revision.

I have prepared short explanation of what is done, waiting for successful upgrade confirmation. Stay tuned.

Sounds good! Staying tuned! :)

@doronbc

This comment has been minimized.

Copy link
Author

doronbc commented Dec 24, 2018

first off, @bizart thank you very much for taking lead on this, your efforts are very much appreciated by the larger community. for everyone else, thank you for keeping the ball rolling.

@NeuerUser hopefully in time, as things mature and more of us gain more awareness, the radio could possibly take updates as expected through the cps, and possibly a st-link will not be required. this is all dependent though on the community providing development support, and on anytone not taking any legal or developmental actions that would impair the potential feature set of this radio.

i like everyone else am very eagerly awaiting the release of instructions.

@Gymnae

This comment has been minimized.

Copy link

Gymnae commented Dec 30, 2018

My programmer arrived, I'm ready to help try out the package, @bizart

@bizart

This comment has been minimized.

Copy link

bizart commented Dec 31, 2018

Hi,

Checkout SWD interface to CPU.

swd_interface_crop

Note that you have to setup st-link utility for "connect under reset" and manually apply reset to mcu after power up. It is tricky sometimes, reset pin is next to crystal and there is no test point on pcb. Pull up resistor is with high value so even touching with tweezers will reset. You need fresh battery connected. I am also connecting usb cable just to notify that cpu resets (usb "disconnect" sound on windows machine). Right after reset, click on "connect target" (st-link utility).

First I would suggest to make a backup of your existing bootloader and rest of firmware, so start with reading entire area 0x08000000 to 0x080FFFFF and save to file.

Please note that you can easily brick your internal flash, so do not proceed without previous step!

Cheers

@doronbc

This comment has been minimized.

Copy link
Author

doronbc commented Dec 31, 2018

@bizart thank you very much for the follow up. i believe i have followed the instructions but I still can't seem to connect in st-link utility. can you or anyone else confirm my setup, i am touching pin 25 with a small piece of metal, and get the connection noises in windows, but st link util doesnt connect. i am holding the unit down to make sure the battery is connecting.

correction: reset pin is number 14

14:00:40 : Can not connect to target! If you're trying to connect to an STM32W1xx device, please select Normal or HotPlug mode from Target->Settings menu. If you're trying to connect to a low frequency application , please select a lower SWD Frequency mode from Target->Settings menu.
14:00:42 : No target connected

stm2
stm1
setup2
setup1
st link settings

pins

for anyone wondering, this is pin 25(corrected to 14), its 12 up from the bottom, its just under a pin that has a wavy trace coming out of it
25

from page 12 of http://gd32mcu.21ic.com/en/down/document_id/127/path_type/1

@ei4kn

This comment has been minimized.

Copy link

ei4kn commented Dec 31, 2018

The reset pin is actually pin 14 - the chip is the 100 pin package. But it is in the same place as in the picture. I'm waiting on a programmer to give this a go.

@doronbc

This comment has been minimized.

Copy link
Author

doronbc commented Dec 31, 2018

The reset pin is actually pin 14 - the chip is the 100 pin package. But it is in the same place as in the picture. I'm waiting on a programmer to give this a go.

thanks, that makes more sense. i just corrected that. i can try it again soon just to eliminate any other issue.

@bill2e0

This comment has been minimized.

Copy link

bill2e0 commented Feb 5, 2019

The 868 512k MCU is for the GD32F303VET6. It is a 512k chip.
For the GD32F303VGT6 which is on the v2 board. It is a 1024k. you will need the 868 MCU

@banmao

This comment has been minimized.

Copy link

banmao commented Feb 5, 2019

The 868 512k MCU is for the GD32F303VET6. It is a 512k chip.
For the GD32F303VGT6 which is on the v2 board. It is a 1024k. you will need the 868 MCU

I tried both files to flash to recover and the problem of buttons not working still exists. All the issues still exist as same. especially I think that is it because of my wrong flashing that make something in formware consider that pf2 is pressed? but stlink does not report any error so far for all flashing.

@bill2e0

This comment has been minimized.

@bill2e0

This comment has been minimized.

Copy link

bill2e0 commented Feb 5, 2019

Start the 868 in FW update mode (pressing and holding) the now bare white button on top and PTT button on the side while turning on?

@banmao

This comment has been minimized.

Copy link

banmao commented Feb 5, 2019

Start the 868 in FW update mode (pressing and holding) the now bare white button on top and PTT button on the side while turning on?

It is still able to enter flash mode, flashing will be no errors, but the issue of non-working buttons still exists. So based on this, I think the wrong things is limited to the buttons. Can the part of firmware managing buttons be damaged?

@sp4xkb

This comment has been minimized.

Copy link

sp4xkb commented Feb 5, 2019

@banmao the radio is assembled?

@vk7zja

This comment has been minimized.

Copy link

vk7zja commented Feb 5, 2019

@banmao What is printed in white letters on the PCB near the springs that make contact with the speaker, and what is printed on the second line of your MCU? The answers to these questions will be absolutely critical in choosing which of the five MCU flash images you should use (868 V1 / 868 V2 with 512k / 868 V2 with 1024k / 878 with 1024k / 6x2 with 1024k - though to be fair, the last three hardwares are identical)
868mainboard_modelid

@banmao

This comment has been minimized.

Copy link

banmao commented Feb 6, 2019

@banmao What is printed in white letters on the PCB near the springs that make contact with the speaker, and what is printed on the second line of your MCU? The answers to these questions will be absolutely critical in choosing which of the five MCU flash images you should use (868 V1 / 868 V2 with 512k / 868 V2 with 1024k / 878 with 1024k / 6x2 with 1024k - though to be fair, the last three hardwares are identical)
868mainboard_modelid

Printed VGT6 and D868UV2.
Thanks for everyone, after left the radio a whole night, it is fully recovered but now I only use 868 firmware. The problem seems that some software problem which is not fully reset.
But when I flashed to 878 yesterday, even after firmware and icon upgrade, it gave me a white background that I almost cannot see anything. What causes this happen?

@prokrypt

This comment has been minimized.

Copy link

prokrypt commented Feb 6, 2019

The white background is normal. You have to change it in the settings or CPS.

@Archcantor

This comment has been minimized.

Copy link

Archcantor commented Feb 6, 2019

The first time you power up the radio after flashing the 878 firmware the screen will be white and lots of fields will be missing. It will look strange, like something bad happened. You have to perform a factory reset and then flash the 878 Icon set. Then the radio will look like a normal 878, Now you can load your latest 868 codeplug.

@banmao

This comment has been minimized.

Copy link

banmao commented Feb 6, 2019

Now I have even more serious problem. Enter flashing mode and red led will blink. However stlink keeps on saying "cannot find device". I checked the soldering is good, is it possible that the chip is damaged?

@banmao

This comment has been minimized.

Copy link

banmao commented Feb 6, 2019

Even more strange things is that when I take away battery for a while and connect back, st link can connect and after few seconds disconnected. Anyone know what are the possible reasons? thanks a lot.

@banmao

This comment has been minimized.

Copy link

banmao commented Feb 6, 2019

The first time you power up the radio after flashing the 878 firmware the screen will be white and lots of fields will be missing. It will look strange, like something bad happened. You have to perform a factory reset and then flash the 878 Icon set. Then the radio will look like a normal 878, Now you can load your latest 868 codeplug.

Now I tried the last time and it stuck on white display with a lot of missing. The issue of keys not responding and PF2 kept press happened again. However, this was solved yesterday that remove battery and wait for a few hours. Can anyone help to explain why the keys are not responding and PF2 keeps pressing liket that?

@prokrypt

This comment has been minimized.

Copy link

prokrypt commented Feb 6, 2019

@banmao was your soldering work very clean? I think at least 2 of the pcb traces near your solder points route to the side button board. I like to use acid based fluxes, but I also wash my electronics with water afterwards 👻

@banmao

This comment has been minimized.

Copy link

banmao commented Feb 6, 2019

@banmao was your soldering work very clean? I think at least 2 of the pcb traces near your solder points route to the side button board. I like to use acid based fluxes, but I also wash my electronics with water afterwards 👻

Thanks for remind me. Now solder issue solved and still have issue of key responding. Waiting to try later.
By the way, is there any methods other than ptt+pf1 to have a full reset?

@prokrypt

This comment has been minimized.

Copy link

prokrypt commented Feb 6, 2019

I don't know of any other way to reset. Also, I found something interesting. One of the button board connections route directly to the CLK pin.
868mainboard_back_full
edit updated photo

@sp4xkb

This comment has been minimized.

Copy link

sp4xkb commented Feb 6, 2019

@banmao Do the buttons work correctly in the 868 version?

@banmao

This comment has been minimized.

Copy link

banmao commented Feb 6, 2019

@banmao Do the buttons work correctly in the 868 version?

It was working properly. And I will check the soldering point again. maybe it is due to my poor soldering skills.

@sp4xkb

This comment has been minimized.

Copy link

sp4xkb commented Feb 6, 2019

@banmao if you soldered to the programming connector, you have broken the connection to the buttons.

@banmao

This comment has been minimized.

Copy link

banmao commented Feb 6, 2019

@banmao if you soldered to the programming connector, you have broken the connection to the buttons.

Thanks for the help from everyone, and now I have successfully flashed to 878. It is really a test of soldering skills.
Now I have one minor issue, I cannot on the GPS. As I selected GPS to be on, the icon does not appear? Can anyone help? Thank you.

@sp4xkb

This comment has been minimized.

Copy link

sp4xkb commented Feb 6, 2019

@banmao does not connect the white ribbon cable that leads to the display.
52296962-bf8c6c00-29d3-11e9-9d9b-f80c8d047301
In a yellow frame

@banmao

This comment has been minimized.

Copy link

banmao commented Feb 6, 2019

@banmao does not connect the white ribbon cable that leads to the display.
52296962-bf8c6c00-29d3-11e9-9d9b-f80c8d047301
In a yellow frame

Thank you sir, it's not properly installed and I have fixed it. Now my 868 is perfectly becomes 878.
Again thanks to all of you who provided enthusiastic help.
Thank you again.

@prokrypt

This comment has been minimized.

Copy link

prokrypt commented Feb 7, 2019

I have aligned the full resolution images of both sides of the board and made an animated gif for those of you who like to, uh, trace the traces. Back side (the side you don't normally see!) of the board is flipped horizontally.

(warning: 7MB gif, though your browser might've already loaded it ;)
868ani

@vk7zja

This comment has been minimized.

Copy link

vk7zja commented Feb 7, 2019

@prokrypt Brilliant!

@marrold

This comment has been minimized.

Copy link

marrold commented Feb 20, 2019

Hi All,

Thanks for the great work! I have a couple of questions:

  1. Most radios have "calibration" data set per radio by the manufacturer. Is this written over or lost when flashing with the 878 Firmware? If yes, can it be restored?
  2. There's now several hex files spread around over the internet, which one is the "real" recommended file to do this?

Thanks again

@M6NBP

This comment has been minimized.

Copy link

M6NBP commented Feb 20, 2019

@Archcantor

This comment has been minimized.

Copy link

Archcantor commented Feb 20, 2019

Norman, how do you know that the manufacturer does not adjust the factory settings when the radio is made? I would assume that some radio performance specifications must be checked and set to meet regulatory requirements.

Marrold, I am pretty sure that these factory settings are in a special place in memory and not stored in the firmware memory. They are preserved during a firmware update. See Jason Reilly's excellent resource page here: http://members.optuszoo.com.au/jason.reilly1/868mods.htm Those memory locations are at the bottom of the page. Once you flash the 878 firmware on an 868 I believe the only way you can flash back to the old 868 firmware is through ST-Llink using the same process you used to flash the 878 firmware. If you are only using the AT Flash Utility or the CPS on your computer you can go up or down in firmware versions but only within the same model 868 or 878. You have to use ST-Link to switch models. Once you switch to the 878 there is no reason to want to go back.

Here's where to get the files: https://github.com/UB1AAM/AnyTone
Press the Clone or Download button to get them in a ZIP file.

-Rick W1RHS

@M6NBP

This comment has been minimized.

Copy link

M6NBP commented Feb 20, 2019

@vk7zja

This comment has been minimized.

Copy link

vk7zja commented Feb 21, 2019

To say that no DMR radio is calibrated in the factory is 100% factually inaccurate. While it may be true for one / some, it can't be assumed that is the case for all.
Proof of this can be found in two ways:

  1. A major OEM supplier of 'cheap' Chinese radios opened their factory for a tour which was recorded on video, which in turn found it's way onto YouTube. Part of that video clearly shows each and every radio passing over an alignment jig with high end European test gear. Such a process would be mandatory for a radio to gain regulatory approval - which many of these radios do in fact have eg: FCC Part 90 certification.
  2. If no radio is aligned at the factory, then why is the alignment data different, unique and varies from individual radio to individual radio? Not even the laziest manufacturer would go putting random data into the alignment field and pass that off as QC'ed ready to go out the door.
    Some of the ultra cheap Chinese radios may have a 'default' alignment data set loaded in them - looking at you, Baofeng - but the remainder all have unmistakable signs of being individually aligned. I've delved deep into quite a few, so my sample pool size isn't unrepresentative of the field...

...and the AnyTone is no exception to that. They are aligned, no question about it. Firmware updating or resetting doesn't overwrite alignment data, this is held in a physically different chip of flash memory, in a reserved memory area specific to that purpose.

@Archcantor

This comment has been minimized.

Copy link

Archcantor commented Feb 21, 2019

Thanks for confirming my assumptions. In general, I assumed each radio had a unique callibration/alignment area in memory. Every so often you hear people say, "Make sure you have a backup of your alignment data." because you can't just ask someone else to give you a copy of their data. Further, who would trust dealers to perform individual alignment/calibration before sale? How could the radio achieve regulatory approval and be shipped before QC testing? Thanks again for your comments and clarifying this with your experience. -Rick W1RHS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment