nRF Connect for Desktop - Programmer v3.0.4 support for nRF9160 using other USB chips

I'm developing currently with the nRF9160 feather , which uses a CP2102 for USB.

That works quite well, especially it enables to add different sensors, which isn't that easy with a Thingy:91. Using a nRF9160-DK for that requires a larger form-factor.

Flashing firmware for the Arm33 works quite well over USB using the zephyr tools. Also using a jlink works.

But using nRF Connect for Desktop and a USB connection seems to be refused (or not considered by Nordic).

According pc-nrfconnect-programmer devices.ts the Programmer App filters on the USB ids.

Would it be possible to add a checkbox to make other USB serials also available?

That would make it easier to update the modem-firmware over USB without jlink.

Parents Reply
  • Not sure, if that description is more intended as "rough overview" than a documentation of "step by step instruction".

    Using Ubuntu 20.04, installed node.js v14.21.3 and npm 6.14.18 I get for the pc-nrfconnect-programmer:

    > npm ci

     Cannot read property 'nrf-intel-hex' of undefined

    > npm install

    pm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@3. I'll try to do my best with it!

    The required version fo npm seems to be not mentioned.

    A more complete list of pre-requirements and instructions will be very helpful.   

Children
  • Seems to require node.js v18,  not v14, as in the documentation.

    The links to "nrf-device-lib-js" are not longer valid.

  • > As far as I know you should be able to modify the code and remove the filter the recompile it as your own customized version of nRF Connect Programmer. 

    Using node.js v18 it's possible to follow the documentation and build a Programmer including different USB id. Unfortunately it seems, that the programmer uses something else to select valid devices (my be the missing "nrf-device-lib-js").

  • Hi,

    Achim Kraus said:
    Using node.js v18 it's possible to follow the documentation and build a Programmer including different USB id. Unfortunately it seems, that the programmer uses something else to select valid devices (my be the missing "nrf-device-lib-js").

    How did you configure the application? 

    Can you try adding this here:

    const deviceListing: DeviceTraits = {
        nordicUsb: true,
        serialPorts: true,
        jlink: true,
        mcuBoot: true,
        nordicDfu: true,
        // Add this line
        usb: true,
    };

  • I tried it.

    The Programmer shows now a "CP2102 USB to UART" pictogram.  If I select that, the programmer shows "Unknown Family".

    My current diffs:

    --- a/src/util/devices.ts
    +++ b/src/util/devices.ts
    @@ -193,6 +193,7 @@ export enum CommunicationType {
      * Supported USB vender IDs
      */
     export enum VendorId {
    +    SILICON_LABS = 0x10c4,
         SEGGER = 0x1366,
         NORDIC_SEMICONDUCTOR = 0x1915,
     }
    @@ -200,14 +201,14 @@ export enum VendorId {
     /**
      * Supported USB serial DFU product IDs
      */
    -export const USBProductIds = [0x521f, 0xc00a, 0xcafe];
    +export const USBProductIds = [0x521f, 0xc00a, 0xcafe, 0xea60,];
     
     /**
      * Supported USB MCUboot product IDs
      */
     export const McubootProductIds = [
         // Thingy91
    -    0x520f, 0x9100,
    +    0x520f, 0x9100, 0xea60,
         // Thingy53
         0x530c,
     ];
    @@ -217,7 +218,7 @@ export const McubootProductIds = [
      */
     export const ModemProductIds = [
         // Thingy91
    -    0x520f, 0x9100,
    +    0x520f, 0x9100, 0xea60,
     ];
     
     /**
    @@ -256,9 +257,11 @@ const getDeviceDefinitionByFamily = (
     const getProductId = (device: nrfdl.Device) => {
         if (!device.serialPorts) return 0;
     
    +    console.err("Serial Product ID: " + productId);
    +
         return parseInt(
             device.serialPorts.reduce(
    -            (m, p) => (p.vendorId === '1915' ? p.productId : '') || m,
    +            (m, p) => (p.vendorId === '1915' || p.vendorId === '10c4'? p.productId : '') || m,
                 ''
             ),
             16
    @@ -276,7 +279,7 @@ const identifyUsbByVersion = (device: nrfdl.Device) => {
     
     const identifyUsbBySerialPort = (device: nrfdl.Device) => {
         const productId = getProductId(device);
    -
    +    console.err("Product ID: " + productId);
         // nRF52
         if (USBProductIds.some(id => id === productId)) {
             return deviceDefinitions.find(d => d.family === DeviceFamily.NRF52);
     

  • Hi,

    Did you try to only add that or did you add it + the other stuff that you changed?

    regards

    Jared

Related