-
Notifications
You must be signed in to change notification settings - Fork 132
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
mod_change_Tone_1750Hz.py does not actually work #85
Comments
because its wrong written but my last patch, I submitted works without a
glitch.
class Mod_ToneBurst extends FirmwareMod {
constructor() {
super("Repeater Tone Burst", "Changes the Tone by PTT and
Side F2 Key, used to open HAM Repeaters and NOAA Channels. The default
is 1750 Hz. To open NOAA Ton-Squelch set 1050 Hz. Other not so common
repeater tone pulse freq are 1000Hz, 1450Hz, 1750Hz, 2100Hz", 0);
this.inputTone = addInputField(this.modSpecificDiv, "Enter
a new Tone Burst frequency (Hz)", "1050");
}
apply(firmwareData) {
const offset = 0x29cc;
const tone = (this.inputTone.value);
if (tone <= 0xffff) {
const buffer = new ArrayBuffer(8);
const dataView = new DataView(buffer);
dataView.setUint32(0, tone, true);
const toneHex = new Uint8Array(buffer);
firmwareData = replaceSection(firmwareData, toneHex, offset);
log(`Success: ${this.name} applied.`);
}
else {
log(`ERROR in ${this.name}: Unexpected data, already
patched or wrong firmware?`);
}
return firmwareData;
}
}
,
matt ***@***.***> schrieb am Sa., 26. Aug. 2023, 11:58:
… I could not get this mod to work, the tone when pressing the 1750Hz button
is always unchanged.
Has this ever been tested?
—
Reply to this email directly, view it on GitHub
<#85>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIOBTKPR7HUNE6VHQ6I2YY3XXHCDFANCNFSM6AAAAAA37N7MOU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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. |
If someone else can confirm that |
Sadly that did not do the trick. I am taking a closer look in ghidra but I dont see an immediate problem:
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: |
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 adressed this issue in my own set of mods, please check my repository. |
I could not get this mod to work, the tone when pressing the 1750Hz button is always unchanged.
Has this ever been tested?
The text was updated successfully, but these errors were encountered: