geary / AnyTone-D868UV

Unofficial issue tracker for AnyTone AT-D868UV and AT-D878UV radios and firmware
58 stars 1 forks source link

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

Open doronbc opened 6 years ago

doronbc commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

bizart commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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

bizart commented 6 years ago

@DL2MF Success, send you an email

NeuerUser commented 6 years ago

@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 commented 5 years ago

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

bizart commented 5 years ago

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

cveith commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

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

ayasystems commented 5 years ago

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 commented 5 years ago

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

Thanks! Michael

gymnae commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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.

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 commented 5 years ago

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 commented 5 years ago

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

bizart commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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.

gymnae commented 5 years ago

Looks like we others can give this a try. Where could we find a Firmware package for upload? A new Firmware was released recently. If these files are only shared via eMail: gymnae [at] nurfuerspam.de

g8ijy commented 5 years ago

No need to touch reset pin. Just restart the radio in normal firmware update mode (PTT+ Top Key). ST-link will then connect without problems.

doronbc commented 5 years ago

@g8ijy you made me realize why it wasnt working for me, i never had it in firmware update mode, i will need to try again tonight, thank you.

if anyone does have experience, aptitude or willingness, we could still use help creating a usb bootloader. i have zero experience, but am willing to experiment. @DL2MF previously had the full d878 flash available, if they still want to provide it, and if you have intentions to create a usb bootloader for a more finished product, please reach out to them via email.

please don't reach out to them looking for a finished product though, right now, an ST link is still required, no USB support is currently available.

http://kevincuzner.com/2018/06/28/building-a-usb-bootloader-for-an-stm32/ http://wiki.stm32duino.com/index.php?title=Burning_the_bootloader https://github.com/rogerclarkmelbourne/STM32duino-bootloader

g8ijy commented 5 years ago

It is not essential to have the radio in firmware update mode but it does make it easier to connect with ST-Link. The SWD port is disabled when the main firmware starts so it is necessary to catch the processor during the reset. However SWD is still active in Firmware Update mode so ST-Link will connect without needing a reset. The firmware release 1.10 also contains the necessary Icon Update files so DL2MF's External Flash Dump is no longer essential.

gymnae commented 5 years ago

The firmware release 1.10 also contains the necessary Icon Update files so DL2MF's External Flash Dump is no longer essential.

Does this mean we can use the vanilla 1.10 package from the manufacturer and flash it via STM software, or does this package needs to be dissembled for manual flashing of parts?

My understanding of the discussion so far:

  1. We need to flash certain parts of the official Firmware package only - but which ones is still not clear "to the masses" since there's no docu yet
  2. All future updates still require using ST-Link, Firmware updates cannot be done via CPS
  3. The 868 will work as an 878, but it's not a full conversion due to the limits of updating to new Firmwares

Since I feel as a lurker and consumer, I can offer to write (and host) a pictured guide after successful conversion.

Kreischie commented 5 years ago

Is it possible to flash all hardware versions of the 868 or only the newest?

UB1AAM commented 5 years ago

20190103_173813

bizart commented 5 years ago

@g8ijy no difference if radio is in firmware update mode.. I find that st-link connection has to be established before bootloader is actually running. Newer st-link utility connects easily.

New firmware release 1.10 gives free icon update, I have to assemble my own icon update extracted from supplied by @DL2MF (external) 878 flash dump.

Once st-link connection is established and complete internal flash downloaded, it is a matter of few easy steps to extract bootloader area, modify few strings, so new firmware can be identified by CPS and assemble with whatever version you would like. Good hex-editor is needed. Do not use notepad++ in hex mode, it can revert unexpectedly bytes.

I will be back at office next week, and can provide exact addresses to assemble your own firmware.

@Gymnae yes, until someone dumps internal flash of 878 (bootloader area), or there is a modified firmware update flash tool, firmware can be updated only through st-link.

fatboyslim01 commented 5 years ago

Ok so have my st link not used one before complete newbie but willing to learn have my radio in bits and connected up, can someone tell me if i have the settings correct to make backup and if so how long should it take to read it from the radio and save to PC.

Thanks in advance Steve

screenshot

UB1AAM commented 5 years ago

stm - screen 015

fatboyslim01 commented 5 years ago

@UB1AAM Thanks worked a treat that's my backup done.

Hotwire commented 5 years ago

THIS IS EXCELLENT! Good work!

UB1AAM commented 5 years ago

Who needs.... 878MCU.hex https://mega.nz/#!HFAQCIYa!-AyYM1KOVm6eDTbF3AwEVXLh1WtS2Alj7NuXcVCpxug

Next, you need to update the icons with stadial means.

bizart commented 5 years ago

@UB1AAM great, consider all issues solved.

s57pz commented 5 years ago

Everything works like on 878 including with computer connect, update FW, icons and CP

Shrani.si

Kreischie commented 5 years ago

@s57pz also update over USB??

s57pz commented 5 years ago

Yes, CPS, FW an Icons

s57pz commented 5 years ago

Shrani.si

Shrani.si

Kreischie commented 5 years ago

Wow, i love this community! Now i only need a tutorial how to do this :D

s57pz commented 5 years ago

Analog APRS is OK

Shrani.si