Trying to see DongleBLE in linux with NCS

Hello,

I want to see my dongle BLE with command lsusb with NCS. I succed to see it with a FTDI USB to UART but i want to succed with only USB.

I succed only USB just with the old SDK connectivity by using a patch whitch came from pc-ble-driver. I tried to developp a pc-ble-driver version NCS with shell command but for commercialisation i can't have a FTDI on my board. can you help me ?

I use for my tests a dongle BLE nrf52840.

Regards,

Pierre-Yves

  • Hi,

     

    I understand that you want this to enumerate in your operating system as a COM port device, ie. a cdc_acm device.

    When firmware is the problematic component, you need to focus on that.

    What you need to do is to enter debug mode on your device, and see where it gets stuck. Similarly, if you do not have a uart pinout, you can use RTT to see what the log output is.

     

    Piwy said:
    I provided you also my prj.conf and my main.c.

    Always share your full project, not only two files.

    If your firmware worked before when transmitting shell over uart, and the only change that you did was the kconfig and device-tree overlay as I described in this answer:

     RE: Trying to see DongleBLE in linux with NCS 

    Then it will route your shell to use USB instead of UART. You can try to add this to for instance the shell_module sample in zephyr (../ncs/zephyr/samples/subsys/shell/shell_module)

    Kind regards,

    Håkon

  • I tried to use debug RTT but when i put my fireware in my custom device i can't connect to it after that unfortunatly.... that's why i can't have log output.

    Now i will only use the shell module from Zephyr. I build it with overlay-usb.conf and i have always the same issue, when i put the software in dongle_ble nordic=> no issue, this work.

    But not in my custom device..., there is a difference beetween them and it's not hw

  • Hi,

     

    Piwy said:
    Now i will only use the shell module from Zephyr. I build it with overlay-usb.conf and i have always the same issue, when i put the software in dongle_ble nordic=> no issue, this work.

    What do you mean by "no issue, this works"? Please share logs or similar showing the working behavior.

    Piwy said:
    But not in my custom device..., there is a difference beetween them and it's not hw

    As previously mentioned, you must configure a project for a nRF52840 custom device without DFU, and this is done by adding:

    CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n

     

    Since you can program a device, you shall also be able to debug it with VSCode, have you tried this?

    Could you share the schematic of your custom device?

     

    Kind regards,

    Håkon

  • Hi,

    My fireware works perfectly with Dongle Ble From nordics.

    I tried adding : CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n

    This don't work on my custom device. I can't debug it because i can't see RTT unfortunatly after flashing the device.

    I can't share it because it's condifdential...

    The HW is pretty the same as the dongle  USB+ and USB- are linked to D+ and D- , USB part is the same.

    With the Dongle_ble nordic the usb port opened but not with my device, the usb not opened ...i tried debug to saw it but it's not working. I thought i needed to use an USB bootloader to open the usb port but maybe i misunderstanding it.

  • I am unable to help you if you do not provide detailed information.

    Please spend a bit of time and answer the below questions.

    "It works on hardware xyz" is not sufficient information - what works? As previously stated, please share logs, screenshots, any information on how you program, run, and logs.

    Which project(s) are you trying to flash?

    What specific "board" are you building for? By "board" here, I mean the listed board in ncs/zephyr/boards/arm/ directory.

    Have you tried entering debug mode, if yes; please share the detailed information on what is observed. Screenshots, logs, etc.

     

    You mention that logging does not work. How did you enable RTT logging? By default, UART logging is used.

    As a minimalistic test: Run "hello_world", configured as board "nrf52840dk_nrf52840" (ie. not configured as nrf52840dongle), with these in prj.conf:

    CONFIG_USE_SEGGER_RTT=y
    CONFIG_UART_CONSOLE=n
    CONFIG_RTT_CONSOLE=y
    CONFIG_LOG=y
    CONFIG_LOG_BACKEND_UART=n
    CONFIG_LOG_BACKEND_RTT=y
    

    And open up the RTT viewer, and share the output.

    Piwy said:
    The HW is pretty the same as the dongle  USB+ and USB- are linked to D+ and D- , USB part is the same.

    Can you run anything successfully on your custom hardware? Hello world, blinky, etc?

    Do you have the nRESET pin (P0.18) routed to anything?

    Can you please share information related to the nRF only? For instance, what is the 32M xtal and its loading caps? Same for the 32k oscillator.

    Piwy said:
    I thought i needed to use an USB bootloader to open the usb port but maybe i misunderstanding it.

    No, you do not need a usb bootloader on your custom hardware. You have a debugger/programmer, meaning that you can access the device directly using SWD.

     

    Kind regards,

    Håkon

Related