Skip to content

Commit 0b36b9f

Browse files
Fix: Incorrect warning for nRF9151 modem FW files
Downloadable from https://www.nordicsemi.com/Products/Development-hardware/nRF9151-SMA-DK/Download?lang=en#infotabs there is currently a modem firmware file named "mfw_nrf9151-ntn_1.0.0-1.alpha.zip" and more like that will probably come. So the app should not warn that this is an invalid file name.
1 parent f31d5f8 commit 0b36b9f

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

Changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 4.7.2 - Unreleased
2+
3+
### Fixed
4+
5+
- Fixed incorrect warning "Unexpected file name detected" for nRF9151 modem
6+
firmware files with variant suffixes (e.g.,
7+
`mfw_nrf9151-ntn_1.0.0-1.alpha.zip`).
8+
19
## 4.7.1 - 2025-12-18
210

311
### Fixed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pc-nrfconnect-programmer",
3-
"version": "4.7.1",
3+
"version": "4.7.2",
44
"displayName": "Programmer",
55
"description": "Tool for flash programming Nordic SoCs and SiPs",
66
"homepage": "https://github.com/NordicSemiconductor/pc-nrfconnect-programmer",

src/components/ModemUpdateDialogView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const isValidNrf9160FirmwareName = (filename: string | undefined) =>
3535
export const isValidNrf91x1FirmwareName = (filename: string | undefined) =>
3636
!filename ||
3737
/mfw_nrf91x1_\d+\.\d+\.\d+.*.zip/.test(filename) ||
38-
/mfw.*nrf91.1_\d+\.\d+\.\d+\.zip/.test(filename);
38+
/mfw.*nrf91.1(-\w+)?_\d+\.\d+\.\d+.*.zip/.test(filename);
3939

4040
const ModemUpdateDialogView = () => {
4141
const abortController = useRef(new AbortController());
@@ -73,7 +73,7 @@ const ModemUpdateDialogView = () => {
7373
url =
7474
'https://www.nordicsemi.com/Products/Development-hardware/nrf9160-dk/download#infotabs';
7575
} else if (is91x1) {
76-
expectedFileName = 'mfw_nrf91x1_X.X.X*.zip';
76+
expectedFileName = 'mfw_nrf91?1*_X.X.X*.zip';
7777
expectedFwName = isValidNrf91x1FirmwareName(modemFwName);
7878
url = 'https://www.nordicsemi.com/Products/nRF9161/Download';
7979
}

src/components/__tests__/ModemUpdateDialogView-test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ describe('Modem firmware filename validation', () => {
7070
).toBe(true);
7171
});
7272

73+
it('accepts names from https://www.nordicsemi.com/Products/nRF9151/Download', () => {
74+
expect(
75+
isValidNrf91x1FirmwareName('mfw_nrf9151-ntn_1.0.0-1.alpha.zip'),
76+
).toBe(true);
77+
});
78+
7379
it('accepts undefined as valid (no file selected)', () => {
7480
expect(isValidNrf91x1FirmwareName(undefined)).toBe(true);
7581
});

0 commit comments

Comments
 (0)