Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G1000 XFD not enumerating as /dev/ttyACM0 #1

Open
mikeklinker129 opened this issue Oct 16, 2022 · 7 comments
Open

G1000 XFD not enumerating as /dev/ttyACM0 #1

mikeklinker129 opened this issue Oct 16, 2022 · 7 comments

Comments

@mikeklinker129
Copy link

Are there additional instructions for installing the G1000 XFD on linux?
The build and installation to X-Plane 11 works, but it is not connecting to the display.
Running Ubuntu 22, the device is listed under lsusb but I am not seeing any additional /dev/tty* devices when I plug it in. Does the display require specific drivers to work with Ubuntu?

@hamarituc
Copy link
Owner

My hardware does not require special drivers beside the usb_cdc driver shipped in the Linux kernel. You should see something like this then plugging in the USB port of the G1000:

[So Okt 16 22:18:06 2022] usb 1-1: new full-speed USB device number 11 using xhci_hcd
[So Okt 16 22:18:06 2022] usb 1-1: New USB device found, idVendor=32b6, idProduct=02f8, bcdDevice= 0.00
[So Okt 16 22:18:06 2022] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[So Okt 16 22:18:06 2022] usb 1-1: Product: RealSimGear G1000XFDv5
[So Okt 16 22:18:06 2022] usb 1-1: Manufacturer: RealSimGear Inc
[So Okt 16 22:18:06 2022] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

But it seems there is a USB ID clash in Ubuntu 22 which prevents USB CDC devices from being detected: https://askubuntu.com/questions/1403705/dev-ttyusb0-not-present-in-ubuntu-22-04. Although the USB IDs differ, it may be the worth checking if the solution there helps in this case, too.

@mikeklinker129
Copy link
Author

mikeklinker129 commented Oct 18, 2022

Thanks @hamarituc
This is what I am seeing, indicating that my computer knows the G1000 is there. Let me dig into seeing if the udev rules are overwriting it somehow...

mike@mike-desktop:~$ lsusb
Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 046d:c215 Logitech, Inc. Extreme 3D Pro
Bus 001 Device 004: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 003: ID 413c:2113 Dell Computer Corp. KB216 Wired Keyboard
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 0846:9053 NetGear, Inc. A6210
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 32b6:0016  RSG G1000 XFD BL
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

@mikeklinker129
Copy link
Author

This is all I see in dmesg... I dont get the USB ACM Device

[    1.534388] usb 3-4: New USB device found, idVendor=32b6, idProduct=0016, bcdDevice= 2.54
[    1.534396] usb 3-4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[    1.534399] usb 3-4: Product: RSG G1000 XFD BL

@hamarituc
Copy link
Owner

It seems like the cdc_acm driver is not loaded. You can check this with dmesg | grep cdc_acm. The command should generate an output like this.

# dmesg | grep cdc_acm
[    1.147304] usbcore: registered new interface driver cdc_acm
[    1.147306] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

If not, try sudo modprobe cdc_acm or sudo modprobe cdc-acm to load the driver (I'm unsure about the right notation, as I prefer to compile this module statically into the kernel in contrast to loading it as a module).

@mikeklinker129
Copy link
Author

mikeklinker129 commented Oct 24, 2022

So loading the driver sudo modprobe cdc_acm has no effect, and with udev rules I can make the screen show up, but not as part of the dialout group, or anything that will allow me to open a serial port.

SUBSYSTEMS=="usb", ATTRS{idVendor}=="32b6", ATTRS{idProduct}=="0016", \
     GROUP:="tty", \
     MODE:="0666", \
     SYMLINK+="ttyACM%n" 

would yield:

....
crw--w---- 1 root tty     4,  7 Oct 23 17:48 /dev/tty7
crw--w---- 1 root tty     4,  8 Oct 23 17:48 /dev/tty8
crw--w---- 1 root tty     4,  9 Oct 23 17:48 /dev/tty9
lrwxrwxrwx 1 root root       15 Oct 23 21:29 /dev/ttyACM3 -> bus/usb/001/014
crw------- 1 root root    5,  3 Oct 23 17:48 /dev/ttyprintk
crw-rw---- 1 root dialout 4, 64 Oct 23 17:48 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Oct 23 17:48 /dev/ttyS1
...

Diving into why the cdc_acm driver won't pick up the device:
This documentation says that if you see cls=ff(vend) in /sys/kernel/debug/usb under the device you are SOL trying to use cdc_acm

Under /sys/kernel/debug/usb, this is the screen:

T:  Bus=01 Lev=03 Prnt=04 Port=02 Cnt=02 Dev#= 12 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=32b6 ProdID=0016 Rev= 2.54
S:  Product=RSG G1000 XFD BL
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 98mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=02 Driver=(none)
E:  Ad=82(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=1ms

Similarly, with lsusb -t the driver listed is null:

mike@mike-desktop:~/ainstein_testing$ lsusb -t
....
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
        |__ Port 5: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 5: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 6: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 3: Dev 10, If 0, Class=Vendor Specific Class, Driver=, 12M

where Port 3: Dev 10 is the G1000.

And lsusb -v yields this info on the G1000:

Bus 003 Device 017: ID 32b6:0016  RSG G1000 XFD BL
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x32b6 
  idProduct          0x0016 
  bcdDevice            2.54
  iManufacturer           0 
  iProduct                2 RSG G1000 XFD BL
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0027
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1 
      bInterfaceProtocol      2 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)

So... are they shipping new screens with a device that requires a different driver?

@hamarituc
Copy link
Owner

So... are they shipping new screens with a device that requires a different driver?

It seems like your device is different from mine. My display reports as

# lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
    |__ Port 1: Dev 110, If 1, Class=CDC Data, Driver=cdc_acm, 12M
    |__ Port 1: Dev 110, If 2, Class=Vendor Specific Class, Driver=, 12M
    |__ Port 1: Dev 110, If 0, Class=Communications, Driver=cdc_acm, 12M

# lsusb -v -s 01.1:110

Bus 001 Device 110: ID 32b6:02f8 RealSimGear Inc RealSimGear G1000XFDv5
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x32b6 
  idProduct          0x02f8 
  bcdDevice            0.00
  iManufacturer           1 RealSimGear Inc
  iProduct                2 RealSimGear G1000XFDv5
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0054
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass       2 Abstract (modem)
      bFunctionProtocol       1 AT-commands (v.25ter)
      iFunction               0 
    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       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1 
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
    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     0x01  EP 1 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     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      5 
      bInterfaceProtocol      0 
      iInterface              0 
Device Status:     0x0000
  (Bus Powered)

# cat /sys/kernel/debug/usb/devices
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=110 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=32b6 ProdID=02f8 Rev= 0.00
S:  Manufacturer=RealSimGear Inc
S:  Product=RealSimGear G1000XFDv5
C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=100mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=02 Prot=01
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=05 Prot=00 Driver=(none)

Whats the serial number of your device?

Could you confirm it works on another linux box (or maybe windows) and provides a serial port?

Reviewing the firmware update information on the website (https://help.realsimgear.com/en/articles/4490455-realsimgear-firmware-utility-windows-only) reveals they are using avrdude to flash the firmware. This is an indicator that they don't use a distinct USB to serial converter, but instead implement the serial device in software. So in theory there should be no difference.

@dna1969
Copy link

dna1969 commented Oct 22, 2024

Did you made any progress on this issue ? :) I face exactly the same problems

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

No branches or pull requests

3 participants