6 Replies Latest reply on Nov 15, 2014 10:09 AM by KurtE

    Use an USB2AX on Galileo G2 (ttyACMx) device?

    KurtE

      I have been playing around with both Intel Edison's and a Intel Galileo G2 and was seeing about if I could get the same sketch to work on the Galileo that I now have running on the Edison.

      I am using some USB2AX devices to control AX12 servos.  This device uses an Atmega32u2 processor.  On most machines including the Edison it shows up as an ACM device:

       

      When I plug it into Edison, dmesg shows:

      [ 3155.127391] usb 1-1: new full-speed USB device number 3 using dwc3-host

      [ 3155.151082] usb 1-1: New USB device found, idVendor=16d0, idProduct=06a7

      [ 3155.151115] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220

      [ 3155.151136] usb 1-1: Product: USB2AX

      [ 3155.151155] usb 1-1: Manufacturer: Xevelabs

      [ 3155.151173] usb 1-1: SerialNumber: 74031303437351D02210

      [ 3155.151992] usb 1-1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes

      [ 3155.160156] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

       

      But when I plug it into Galileo, I only see:

      [  759.170161] usb 1-1: new full-speed USB device number 3 using ohci_hcd

       

      Is there anything special to get the ttyACM devices to work on Galileo.  I am using the 1.0.4 IDE I believe I am using the SD card version of firmware... Should figure out ways to verify.

       

      Suggestions?

        • 1. Re: Use an USB2AX on Galileo G2 (ttyACMx) device?
          KurtE

          Maybe I am missing something,  like what capabilities the server mode USB has and if there is anything I need to do enable things.

           

          Today I tried a few different things, like I updated to Alex'T s devtool image.  I booted, I have an 3.3v FTDI breakout cable connected up so I have PuTTY connection to it.  I tried plugging in the device mentioned and same thing.  So I thought maybe I will try to connect on a hub, same difference.  So then I plugged in a USB to serial cable that is FTDI based again no new tty device created.  The only message on my debug terminal shows:

          [  419.870163] usb 1-1: new full-speed USB device number 2 using ohci_hcd

          dmesg | tail

          Is showing almost nothing.  The last time it is showing is fro time 0.000000

           

          I did the opkg install kernel...ftdi... from Alex'ts stuff and it said the latest version was already installed.

           

          Any suggestions? 

          • 2. Re: Use an USB2AX on Galileo G2 (ttyACMx) device?
            Intel_Alvarado

            Hi,

            We will investigate on your issue and contact you as soon as we have more information.

            Regards

            Sergio

            • 3. Re: Use an USB2AX on Galileo G2 (ttyACMx) device?
              Intel_Alvarado

              Hi KurtE,

              Why don’t you try changing the udev rules? I found a link that you might find useful http://www.reactivated.net/writing_udev_rules.html#example-usbhdd . Look at the examples part of the document to get an idea of the different devices you can modify with udev. Let me know if this was helpful.

              Regards

              Sergio

              • 4. Re: Use an USB2AX on Galileo G2 (ttyACMx) device?
                KurtE

                I am not quite sure yet what to try here with udev.  I am not an expert with udev rules, but I do use them.  For example when I use XBees with FTDI xbee adapters, I will use a rule to create a device: /dev/ttyXBEE which I reference in the code.  This takes care of issues where ttyUSBx the actual device may change numbers depending on how the devices were enumerated...

                 

                I first had to install it on the Galileo .  When I plug the device into the USB port, All I see from dmesg is:

                [ 1084.750197] usb 1-1: new full-speed USB device number 5 using ohci_hcd

                and it appears to create an object in the /dev of 1-1

                 

                If I look at it with udevadm I see:

                root@clanton:~# udevadm info --query=property --name=1-1

                BUSNUM=001

                DEVNAME=/dev/bus/usb/001/005

                DEVNUM=005

                DEVPATH=/devices/pci0000:00/0000:00:14.4/usb1/1-1

                DEVTYPE=usb_device

                DRIVER=usb

                MAJOR=189

                MINOR=4

                PRODUCT=16d0/6a7/0

                SUBSYSTEM=usb

                TYPE=2/0/0

                 

                Now if I look at another one of these devices on my Edison board, Dmesg shows:

                [ 1559.764970] usb 1-1: new full-speed USB device number 3 using dwc3-host

                [ 1559.789084] usb 1-1: New USB device found, idVendor=16d0, idProduct=06a7

                [ 1559.789114] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220

                [ 1559.789135] usb 1-1: Product: USB2AX

                [ 1559.789154] usb 1-1: Manufacturer: Xevelabs

                [ 1559.789172] usb 1-1: SerialNumber: 74031303437351D02210

                [ 1559.790054] usb 1-1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes

                [ 1559.797605] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

                When I look at the udevadm stuff I get:

                root@Edison:~# udevadm info --query=property --name ttyACM0

                DEVLINKS=/dev/serial/by-id/usb-Xevelabs_USB2AX_74031303437351D02210-if00 /dev/serial/by-path/pci-0000:00:11.0-platform-dwc3-host.2-usb-0:1:1.0 /dev/ttyUSB2AX

                DEVNAME=/dev/ttyACM0

                DEVPATH=/devices/pci0000:00/0000:00:11.0/dwc3-host.2/usb1/1-1/1-1:1.0/tty/ttyACM0

                ID_BUS=usb

                ID_MODEL=USB2AX

                ID_MODEL_ENC=USB2AX

                ID_MODEL_ID=06a7

                ID_PATH=pci-0000:00:11.0-platform-dwc3-host.2-usb-0:1:1.0

                ID_PATH_TAG=pci-0000_00_11_0-platform-dwc3-host_2-usb-0_1_1_0

                ID_REVISION=0001

                ID_SERIAL=Xevelabs_USB2AX_74031303437351D02210

                ID_SERIAL_SHORT=74031303437351D02210

                ID_TYPE=generic

                ID_USB_CLASS_FROM_DATABASE=Communications

                ID_USB_DRIVER=cdc_acm

                ID_USB_INTERFACES=:020201:0a0000:

                ID_USB_INTERFACE_NUM=00

                ID_VENDOR=Xevelabs

                ID_VENDOR_ENC=Xevelabs

                ID_VENDOR_FROM_DATABASE=MCS

                ID_VENDOR_ID=16d0

                MAJOR=166

                MINOR=0

                SUBSYSTEM=tty

                TAGS=:systemd:

                USEC_INITIALIZED=86775

                Again unfortunately I don't know enough on why the Galileo is not trying to assign the device to use the cdc_acm driver...

                • 5. Re: Use an USB2AX on Galileo G2 (ttyACMx) device?
                  KurtE

                  again I don't know what i am doing, but for the fun of it I tried: modprobe on the Galileo and it did:

                  root@clanton:~# modprobe cdc-acm

                  [ 4201.452920] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

                  [ 4201.476560] usbcore: registered new interface driver cdc_acm

                  [ 4201.482361] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

                   

                  and when I tried the udevadm It showed:

                  root@clanton:~# udevadm info --query=property --name=ttyACM0

                  DEVNAME=/dev/ttyACM0

                  DEVPATH=/devices/pci0000:00/0000:00:14.4/usb1/1-1/1-1:1.0/tty/ttyACM0

                  MAJOR=166

                  MINOR=0

                  SUBSYSTEM=tty

                   

                  Which looks closer.  If I now unplug it and replug it in, it again shows ttyACM0...  So I think that is one hint... Not sure yet what modprobe does...

                  • 6. Re: Use an USB2AX on Galileo G2 (ttyACMx) device?
                    KurtE

                    Today I finally tried running something on the Galileo G2 with the USB2AX in it.  So I tried out my Edison PhantomX Arm program that uses the Arbotix Commander and it works

                    If I play around more with it, I may figure out if I am compiling for Edison or Galileo and change where debug outputs go...  Right now on both I output to Serial2, which is great, but may want to make that conditional as it eats the debug terminal.  Normally to clear I run a simple arduino program that does Serial2.begin(...) followed by Serial2.end(), which frees up the debug terminal...

                     

                    Next up get the PhantomX Hexapod with both boards/