Running Klipper on an MKS Robin Nano V3

Basic Information:

Printer Model: Custom build
MCU / Printerboard: MKS Robin Nano V3.
klippy.log: klippy.log (151.7 KB)

I’m having trouble connecting my Robin Nano V3 to an rPi 4 using USB.

I have created a klippy image that I have loaded into the Robin Nano using the directions given in: MKS Robin nano V3.0 motherboard using Klipper firmware tutorial (Translated from Chinese)

My only issue is what to specify is the “USB ids” in “make menuconfig” - I’m leaving it as the “USB serial number from CHIPID” (although, to be honest, I’m not sure what to do with that - but one problem at a time).

I have plugged in an “A” to “B” USB cable between the Robin Nano. The “A” End (the rectangle) is plugged into the rPi and the “B” End (the square) is plugged into the Robin Nano.

The Robin Nano/Klippy is not recognized in Mainsail.

Now, when I do a “lsusb”, it seems to be:
Bus 001 Device 007: ID 1d50:614e OpenMoko, Inc.

When I do “lsusb -v”, the port information is:

Bus 001 Device 007: ID 1d50:614e OpenMoko, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        16
  idVendor           0x1d50 OpenMoko, Inc.
  idProduct          0x614e
  bcdDevice            1.00
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x003e
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      CDC ACM:
        bmCapabilities       0x06
          sends break
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval             255
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0

So the USB CDC port is enumerated but not getting recognized.

Anybody have any ideas what I’m doing wrong here?

Thanx!

Just as an additional few datapoints.

  1. I also tried the Robin Nano V3 Klipper build provided by MKS here:
    MKS Robin Nano V3 Klipper Build
    with the same results when I looked at the ports using “lsusb” on the rPi.

  2. I plugged the Robin Nano V3’s USB port into a Mac and did an “ioreg -p IOUSB” command and got the results:

+-o Root  <class IORegistryEntry, id 0x100000100, retain 20>
      :
      :
  +-o AppleUSBXHCI Root Hub Simulation@14000000  <class AppleUSBRootHubDevice, id 0x100000526, registered, matched, active, busy 0 (0 ms), retain 9>
    +-o stm32f407xx@14200000  <class AppleUSBDevice, id 0x100000528, registered, matched, active, busy 0 (1 ms), retain 14>
  1. I then ran CoolTerm, which discovered the port and when connected seems to be polling the host (although it didn’t respond to any of my keyboard inputs):
    image

  2. I did kDiff on the two bin files (the one I built and the one provided by MKS) and while there are differences, the two files have a lot of simularities.

So the Robin Nano V3’s programmed with klipper USB port seems to be there as a CDC device and it can be connected to by other computers.

So why isn’t Mainsail recognizing it? Maybe I was a bit premature when I was dismissive of the question about the USBID that will be used when I built klipper for the controller board.

Any suggestions as what to do next?

Thanx again!

Got it.

The issue was with the USBID.

Looking around, I found the “dmesg” command in Linux as a way to get more information on a system and its devices, tried it and the last bit of information provided was:

[ 8686.320070] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8686.320087] usb 1-1.2: Product: stm32f407xx
[ 8686.320102] usb 1-1.2: Manufacturer: Klipper
[ 8686.320116] usb 1-1.2: SerialNumber: 3E0040000A51363439343739
[ 8686.325193] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[25298.272325] usb 1-1.2: USB disconnect, device number 7
[25545.976544] usb 1-1.2: new full-speed USB device number 8 using xhci_hcd
[25546.118607] usb 1-1.2: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[25546.118629] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[25546.118647] usb 1-1.2: Product: stm32f407xx
[25546.118664] usb 1-1.2: Manufacturer: Klipper
[25546.118681] usb 1-1.2: SerialNumber: 3E0040000A51363439343739
[25546.123786] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[25727.408349] usb 1-1.2: USB disconnect, device number 8
[28120.339053] usb 1-1.2: new full-speed USB device number 9 using xhci_hcd
[28120.481097] usb 1-1.2: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[28120.481120] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[28120.481139] usb 1-1.2: Product: stm32f407xx
[28120.481156] usb 1-1.2: Manufacturer: Klipper
[28120.481174] usb 1-1.2: SerialNumber: 3E0040000A51363439343739
[28120.486308] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[28399.321537] usb 1-1.2: USB disconnect, device number 9
[28582.113126] usb 1-1.2: new full-speed USB device number 10 using xhci_hcd
[28582.255242] usb 1-1.2: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[28582.255266] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[28582.255284] usb 1-1.2: Product: stm32f407xx
[28582.255301] usb 1-1.2: Manufacturer: Klipper
[28582.255318] usb 1-1.2: SerialNumber: 3E0040000A51363439343739
[28582.263649] cdc_acm 1-1.2:1.0: ttyACM1: USB ACM device

Noting the “SerialNumber” hex string and comparing it to the other examples out there, I decided to copy that into “printer.cfg” and lo and behold I’m connected and I can access hardware on the printer.

I’ve tested it with both the MKS provided klipper firmware as well as the klipper firmware that I built and both work fine.

This was something of an ordeal and I have gone through many online tutorials and videos (some with the MKS Robin Nano V3 as the controller) and I only found the “dmesg” approach by reading about debugging USB CDC connection problems on a tutorial for a different (NXP) microcontroller family.

Is there somewhere I missed to find this information?

Well, you could have followed the official documentation, which details how to find the correct connection address: building-and-flashing-the-micro-controller

Thank you for your comment and suggestion.

I did try the official documentation (sorry, I should have noted that in my original post) but I couldn’t get the bootloader size option to show up correctly my controller (the Robin Nano V3) when I did the “make menuconfig” operation. This lead me to searching for other examples, which lead me to the MKS documentation which was linked in my first post.

Looking back, the MKS sample printer.cfg is different from the one that is in the Klipper Github repository. I used the Klipper example printer.cfg rather than the MKS, which has a bit more information in its header that would have helped me with the “make menuconfig” operation.

Actually, if I had read further through the MKS example, I would have been fine. When I got to the loading of the klipper Flash image, I thought that was the end of the process.

This is a case of a newbie trying to do something that they really didn’t understand all the necessary steps with parts that didn’t match the generic example(s) given.