Giter VIP home page Giter VIP logo

Comments (8)

Lar-Sen avatar Lar-Sen commented on June 24, 2024 1

I adressed this issue in my own set of mods, please check my repository.
In fact I guess there is some confusion here. Initial (working) mod patched PTT+F2 key combination for 1750Hz toneburst, as many people thought the right combination was "Long press F1".
So you can have 2 possible tonebursts to configure.

from quansheng_uv-k5_firmware.

RE3CON avatar RE3CON commented on June 24, 2024

from quansheng_uv-k5_firmware.

whosmatt avatar whosmatt commented on June 24, 2024

This issue is about the python mod, which does not work. Your mod will also not work, and I'm not sure why you check if tone is below 2 bytes (0xffff), just to then make an 8 byte buffer and then writing a 4 byte uint. writing these mods without a clue about data types is risky. This is the correct js implementation of the python mod:

class Mod_ChangeToneBurst extends FirmwareMod {
        constructor() {
            super("1750Hz Tone Frequency", "The 1750Hz button sends a 1750Hz activation tone by default. To open NOAA channels (in combination with the NOAA frequencies mod on the receiving unit), you can use this mod to send a 1050Hz tone. Common repeater tone pulse frequencies are 1000Hz, 1450Hz, 1750Hz, 2100Hz", 0);
            this.toneValue = addInputField(this.modSpecificDiv, "Enter a new Tone Burst value in Hz from 1000-3950:", "1750");
        }

        apply(firmwareData) {
            const minValue = 1000;
            const maxValue = 3950;
            const inputValue = parseInt(this.toneValue.value);

            if (!isNaN(inputValue) && inputValue >= minValue && inputValue <= maxValue) {
                const newData = new Uint8Array(4);
                const dataView = new DataView(newData.buffer);
                dataView.setUint32(0, inputValue, true);

                console.log(uint8ArrayToHexString(newData)); // value is correct

                firmwareData = replaceSection(firmwareData, newData, 0x29cc); // does not seem to work
                log(`Success: ${this.name} applied.`);
            }
            else {
                log(`ERROR in ${this.name}: Repeater Tone Burst must be a Tone Freq. in Hz from 1000-3950 Hz!`);
            }
            return firmwareData;
        }
    }

But since the python mod doesn't seem to do anything, neither will this js mod.

from quansheng_uv-k5_firmware.

whosmatt avatar whosmatt commented on June 24, 2024

If someone else can confirm that mod_change_Tone_1750Hz.py does not work it would be helpful.

from quansheng_uv-k5_firmware.

wrcrooks avatar wrcrooks commented on June 24, 2024

Have you tried modifying the address reference of '0x29cc' in the script to '0x3e7c'? I find the value '39 1B' at '0x29cc' in firmware files created your UVMOD tool. Could the address have been shifted to accommodate the 'App' mods?

image

from quansheng_uv-k5_firmware.

whosmatt avatar whosmatt commented on June 24, 2024

Sadly that did not do the trick. I am taking a closer look in ghidra but I dont see an immediate problem:

image
this is inside the function that processes the key presses.

image
this is inside the function that resembles the "state machine" if you can really call it that.

I am not sure why the tone gets set twice, but these are also the only values I could find and changing both of them still does not change the tone.

If anyone wants to explore, here are the two sections in OEFW:
https://github.com/DualTachyon/uv-k5-firmware/blob/1994d68cc5e1df36706bffca6050c6bbd1bf7a44/app/app.c#L1376
https://github.com/DualTachyon/uv-k5-firmware/blob/1994d68cc5e1df36706bffca6050c6bbd1bf7a44/functions.c#L155

from quansheng_uv-k5_firmware.

wrcrooks avatar wrcrooks commented on June 24, 2024

https://github.com/DualTachyon/uv-k5-firmware/blob/1994d68cc5e1df36706bffca6050c6bbd1bf7a44/app/app.c#L1376
https://github.com/DualTachyon/uv-k5-firmware/blob/1994d68cc5e1df36706bffca6050c6bbd1bf7a44/functions.c#L155

This is an amazing work effort and the community around this radio is incredible. Are you thinking of switching to the open source replication of the firmware as the base for your UVMOD site @whosmatt?

from quansheng_uv-k5_firmware.

whosmatt avatar whosmatt commented on June 24, 2024

https://github.com/DualTachyon/uv-k5-firmware/blob/1994d68cc5e1df36706bffca6050c6bbd1bf7a44/app/app.c#L1376
https://github.com/DualTachyon/uv-k5-firmware/blob/1994d68cc5e1df36706bffca6050c6bbd1bf7a44/functions.c#L155

This is an amazing work effort and the community around this radio is incredible. Are you thinking of switching to the open source replication of the firmware as the base for your UVMOD site @whosmatt?

Absolutely not, because addresses and offsets change with every build. If we develop a simple filesystem with apps, I might make a tool to install apps.
I am almost done with a installer though which pulls and installs the latest custom firmware builds.

from quansheng_uv-k5_firmware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.