This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

j-link issue if used with Nordic EK j-link OB

I wish to inform Nordic about this issue with jlink OB used on EK boards when used in OS X environment.

J-link OB returns " Can not connect to J-Link via USB." and a CDC disabling is due to establish a connection.

But, if I use j-link Lite Cortex M there are no problems, the connection is ready without disabling CDC.

All firmwares are updated.

Not fatal but annoying .

-c

Parents
  • Does J-Link Lite Cortex M have the CDC control and data endpoints as well as the Segger vendor-specific one? There's a number of posts on the Segger forum which explain that OSX, when it detects a CDC device, takes exclusive access to the entire device, including any of the endpoints which aren't CDC, that prevents libusb from accessing the Segger endpoint even though the CDC driver isn't using it.

    This is arguably an OSX bug (well Segger argues it is) and I filed a bug report against it which I've not had a reply to yet.

    If J-Link Lite Cortex M does have the CDC endpoints as well as the Segger one, I'm not sure how it's working, unless it presents itself as a composite CDC + Vendor device instead of one single interface, thus allowing OSX to attach the CDC driver to the CDC bit and leave the rest alone.

Reply
  • Does J-Link Lite Cortex M have the CDC control and data endpoints as well as the Segger vendor-specific one? There's a number of posts on the Segger forum which explain that OSX, when it detects a CDC device, takes exclusive access to the entire device, including any of the endpoints which aren't CDC, that prevents libusb from accessing the Segger endpoint even though the CDC driver isn't using it.

    This is arguably an OSX bug (well Segger argues it is) and I filed a bug report against it which I've not had a reply to yet.

    If J-Link Lite Cortex M does have the CDC endpoints as well as the Segger one, I'm not sure how it's working, unless it presents itself as a composite CDC + Vendor device instead of one single interface, thus allowing OSX to attach the CDC driver to the CDC bit and leave the rest alone.

Children
  • I have used other jtag on OSX with CDC. Never have any issue with CDC. Only problem is with Segger, so arguably it is Segger bug. I have developed USB HID product in the past and I can say that Apple is very strict on USB descriptor. I remembered making a little mistake in one of the descriptor. OSX refuse to accept it although it is listed. But under Windows everything worked fine.

  • Not every jtag also has a serial channel on it which presents as a CDC device, so those all work fine.

    Anyway in this case after some back and forth between Apple and Segger, Apple does open the device exclusively but only grabs the two CDC interfaces and leaves the proprietary one available, and I wrote the code myself, it's usable. Where the segger driver is having issues, I currently believe, is attempting to get basic information, like the serial number, off the device by using the control pipe, which requires the device to be opened, which it can't do (which is what libusb does too). Apple's IOKit however provides almost all the information you could want cached after device attachment via another mechanism so there's no real need to do this.

    I've given Segger all the information I have and they are looking into it, so they tell me.

    Apple probably shouldn't open the device exclusively as it does, because it stops even the most basic control function from working, but in this case I think segger can do what they want another way.

    If they even tell me they fixed it I'll report back.

Related