Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Some issues in building main source and demo #6

Open
rainerfritz opened this issue Nov 22, 2023 · 1 comment
Open

Some issues in building main source and demo #6

rainerfritz opened this issue Nov 22, 2023 · 1 comment

Comments

@rainerfritz
Copy link

rainerfritz commented Nov 22, 2023

Hi !

First of all, thanks a lot for the big effort you invested in that project and that you share it!

I installed the packages with npm install ci from the package-lock file. If I do it with npm install, I get a lot of dependency conflicts, but that could be my setup here as well.
I need to set the "noUnusedLocals": false in the tsconfig.json, because the configurationDescriptor throws an declared but its value is never read error.

In the demo, I need to set the webpack version to 4.47.0, because version >5 seems to have an issue with the events, but solved that. Still some dependency issues but the gatsby build is working:

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   peer react@">=16.8.0" from @emotion/[email protected]
npm WARN   node_modules/@emotion/react
npm WARN     peer @emotion/react@"^11.0.0-rc.0" from @emotion/[email protected]
npm WARN     node_modules/@emotion/styled
npm WARN     5 more (@mui/material, @mui/styled-engine, @mui/system, ...)
npm WARN   18 more (@emotion/styled, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"0.0.0-experimental-c8b778b7f-20220825" from [email protected]
npm WARN node_modules/gatsby/node_modules/react-server-dom-webpack
npm WARN   react-server-dom-webpack@"0.0.0-experimental-c8b778b7f-20220825" from [email protected]
npm WARN   node_modules/gatsby
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"0.0.0-experimental-c8b778b7f-20220825" from [email protected]
npm WARN   node_modules/gatsby/node_modules/react-server-dom-webpack
npm WARN     react-server-dom-webpack@"0.0.0-experimental-c8b778b7f-20220825" from [email protected]
npm WARN deprecated @types/[email protected]: This is a stub types definition. keyv provides its own type definitions, so you do not need this installed.
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.

I have a RAK4631 microcontroller with an Nordic nRF52840 on it. When I flash it with the Nordic Connect App it works so far.
The problem here is, that it throws the "Uncaught (in promise) Error: No matches found. Is this a DFU device?" error.

So the InterfaceFilter does not match in my case

export const InterfaceFilters = {
	DFU: (iface: USBInterface): boolean =>
		iface.alternate.interfaceClass == 0xfe &&
		iface.alternate.interfaceProtocol == 0x02 &&
		iface.alternate.interfaceSubclass == 0x01,
};

I think interface 1 is used
In chromes chrome://usb-internals/ I have on

interface 0:
endpoints: Array(1)
0: USBEndpoint {endpointNumber: 1, direction: 'in', type: 'interrupt', packetSize: 8}
length: 1[Prototype]]: Array(0)
interfaceClass: 2
interfaceName: null
interfaceProtocol: 0
interfaceSubclass: 2
second endpoint is same
interface 1:
endpoints: Array(2)
0: USBEndpoint {endpointNumber: 1, direction: 'out', type: 'bulk', packetSize: 64}
1: USBEndpoint {endpointNumber: 2, direction: 'in', type: 'bulk', packetSize: 64}
length: 2[[Prototype]]: Array(0)
interfaceClass: 10
interfaceName: null
interfaceProtocol: 0
interfaceSubclass: 0
second endpoint is same.

I tried it with:

export const InterfaceFilters = {
	DFU: (iface: USBInterface): boolean =>
		iface.alternate.interfaceClass == 0x0A &&
		iface.alternate.interfaceProtocol == 0x00 &&
		iface.alternate.interfaceSubclass == 0x00,
};

But no luck so far, still getting the same error.

Thx a lot
Rainer

@jcxldn
Copy link
Member

jcxldn commented Mar 13, 2024

Hi, apologies for the late reply, this fork was for a competition last year. I was not using DfuSe devices in the competition, so support for those has not yet been re-implemented in my rewrite. I believe the nRF52840 makes use of DfuSe?

You might have better luck with the original repo: https://github.com/Flipper-Zero/webdfu

Thanks and apologies again for the late reply,

James

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants