586,915 active members*
2,362 visitors online*
Register for free
Login
Results 1 to 20 of 43

Hybrid View

  1. #1
    Join Date
    Apr 2017
    Posts
    158

    Re: Compatable USB relay i/o

    Quote Originally Posted by Steve303 View Post
    Bob, have you tried this in simulation? I think testing would be much easier in running PP in simulation than at the mill.

    I have Tormach's usb I/O and it works fine in sim.
    Thanks. I use simulation as much as I can, but I've somehow never succeeded in getting the simulator to see hardware USB devices. I can get stuff in and out using shared folders, but not thumb drives.

    My guess is that what I need to do in the simulator is the same as what I need to do on the mill. I believe that I'll be there with just a little help from @jwatte.

    What I really ought to do is to bite the bullet and acquire basic Unix competence. My ignorance of Unix is especially embarrassing in the light of the fact that long ago, I hired Dennis Ritchie for what I think was his first computer job. That was LONG ago.

  2. #2
    Join Date
    Apr 2017
    Posts
    158

    Re: Compatable USB relay i/o

    I still need help, but a little less than I needed earlier today. I successfully created a new RRF.rules file in the rules.d directory, with the content
    Code:
    SUBSYSTEMS=="usb",KERNEL=="ttyACM*",ATTRS{idVendor}=="0403",ATTRS{idProduct}=="6001",SYMLINK+="USBIO%n",GROUP="dialout",MODE="0666"
    but PathPilot still can't see the Arduino.

    Many months ago, I discovered that the Tormach touchscreen worked with some of the controller's USB ports, but not others. On the off chance that something similar might be happening here, I tried plugging the Arduino into each of the unused USB ports in turn. No luck.

    My guess is that either
    • contrary to the README file in rules.d, the ordering of rules, and naming of rules files, may make a difference here, or
    • the line shown above is wrong.

    All suggestions are welcome.

  3. #3
    Join Date
    Nov 2012
    Posts
    591

    Re: Compatable USB relay i/o

    You can tell whether the line works, by doing

    ls -l /dev/USBIO*

    If it shows something, then it probably worked. If not, you have to debug the udev rules.
    You may be able to find an error message by doing something like:

    sudo udevadm monitor

    and then plugging in the Arduino.

    For trouble-shooting, what does "lsusb" say when the Arduino is plugged in?
    What does "ls /dev/tty*" say ?
    It may be that the Arduino is a different kind of tty device than ttyACM, so you may need another KERNEL= match rule.

    Isn't hardware hacking fun? :-)

  4. #4
    Join Date
    Apr 2017
    Posts
    158

    Re: Compatable USB relay i/o

    Quote Originally Posted by jwatte View Post
    You can tell whether the line works, by doing
    Code:
    ls -l /dev/USBIO*
    If it shows something, then it probably worked. If not, you have to debug the udev rules.
    No joy. It can't find a directory.

    Quote Originally Posted by jwatte View Post
    You may be able to find an error message by doing something like:
    Code:
    sudo udevadm monitor
    and then plugging in the Arduino.
    I plugged in the Arduino, started sudo udevadm monitor, then unplugged & replugged the Arduino. The output was
    Code:
    [...]
    [unplug]
    KERNEL[793.200489] remove /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/ttyUSB0/tty/ttyUSB0 (tty)
    KERNEL[793.200552] remove /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/ttyUSB0 (usb-serial)
    KERNEL[793.200578] remove /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0 (usb)
    KERNEL[793.200603] remove /devices/pci0000:00/0000:00:14.0/usb3/3-8 (usb)
    UDEV  [793.201467] remove /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/ttyUSB0/tty/ttyUSB0 (tty)
    UDEV  [793.201527] remove /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/ttyUSB0 (usb-serial) 
    UDEV  [793.201664] remove /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0 (usb)
    UDEV  [793.202142] remove /devices/pci0000:00/0000:00:14.0/usb3/3-8 (usb)
    [replug]
    KERNEL[796.521561] add    /devices/pci0000:00/0000:00:14.0/usb3/3-8 (usb)
    KERNEL[796.523923] add    /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0 (usb)
    KERNEL[796.523961] add    /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/ttyUSB0 (usb-serial)
    KERNEL[796.524109] add    /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/ttyUSB0/tty/ttyUSB0 (tty)
    UDEV  [796.526428] add    /devices/pci0000:00/0000:00:14.0/usb3/3-8 (usb)
    UDEV  [796.531310] add    /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0 (usb)
    UDEV  [796.531754] add    /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0 /ttyUSB0  (usb-serial)
    UDEV  [796.534403] add    /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0 /ttyUSB0/tty/ttyUSB0  (tty)
    KERNEL [3287.284231] change /devices/platform/regulatory.0 (platform)
    UDEV   [3287.286474] change /devices/platform/regulatory.0 (platform)
    KERNEL [3288.363913] change /devices/platform/regulatory.0 (platform)
    UDEV   [3288.365871] change /devices/platform/regulatory.0 (platform)
    KERNEL [3288.512411] change /devices/platform/regulatory.0 (platform)
    UDEV   [3288.514591] change /devices/platform/regulatory.0 (platform)
    KERNEL [3288.616117] change /devices/platform/regulatory.0 (platform)
    UDEV   [3288.618175] change /devices/platform/regulatory.0 (platform)
    Quote Originally Posted by jwatte View Post
    For trouble-shooting, what does "lsusb" say when the Arduino is plugged in?
    It is the same output as when I first tried it. The pertinent line is
    Code:
    Bus 003 Device 008IC ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
    Quote Originally Posted by jwatte View Post
    What does "ls /dev/tty*" say ?
    Code:
      /dev/tty
      /dev/tty1, /dev/tty2, ..., /dev/tty 63
      /dev/ttyprintk
      /dev/ttyS0, /dev/ttyS1, ..., /dev/ttyS31
      /dev/ttyUSB0
    Quote Originally Posted by jwatte View Post
    Isn't hardware hacking fun? :-)
    It might be fun if I were working from documentation. Thrashing in ignorance is not fun.

  5. #5
    Join Date
    Nov 2012
    Posts
    591

    Re: Compatable USB relay i/o

    The murder mystery angle is what adds the spice!

    Anyway, the commands you ran show that it's a "ttyUSB*" not a "ttyACM*" device, and thus you need to change that bit in the KERNEL== in the udev.d rules file to make it recognized.

  6. #6
    Join Date
    Apr 2017
    Posts
    158

    Re: Compatable USB relay i/o

    Quote Originally Posted by jwatte View Post
    the commands you ran show that it's a "ttyUSB*" not a "ttyACM*" device, and thus you need to change that bit in the KERNEL== in the udev.d rules file to make it recognized.
    That change results in incomplete progress. The ls -l /dev/USBIO* command now returns
    Code:
    lrwxrwxrwx 1 root root 7 Jan 16 09:23 /dev/USBIO -> ttyUSB
    The result of sudo udevadm monitor is the same as it was yesterday, except for the bracketed timestamps or sequence numbers at the beginning of each line. The results of lsusb and ls /dev/tty* are also unchanged from yesterday.

    With the Arduino plugged in and the USB I/O box checked in PathPilot, the Arduino's LEDs show that its RX & TX lines are getting traffic; I don't think this was true yesterday. Unfortunately, PathPilot says
    Code:
    USBIO: Board malfunction.  Cannot connect to board.

  7. #7
    Join Date
    Nov 2012
    Posts
    591

    Re: Compatable USB relay i/o

    Great, now we know that PathPilot is trying to talk to it.
    The Arduino isn't responding as it wants, though, which is why it's saying it's "unusable."
    I can think of three possible causes for this:

    1) The Arduino bootloader might confuse the board detection.
    2) The Arduino sketch doesn't set the right baud rate on the serial port when it starts (I think it should be Serial.begin(38400))
    3) The sketch has some bug that doesn't parse the commands correctly

    If it's 1) I don't know how to solve that, other than replacing the Arduino with some board that uses "native" USB, such as the Arduino Leonardo, or the Teensy.
    If it's 2) then the fix should be making sure that the baud rate is right.
    If it's 3) then it should be possible to fix the sketch to talk the right protocol, but obviously this needs some way of debugging what's going on.

  8. #8
    Join Date
    May 2016
    Posts
    5

    Re: Compatable USB relay i/o

    released a working version for Arduino UNO limited to one input and one output
    https://jsea.tech.blog/arduino-uno-pathpilot-usb-i-o/

Similar Threads

  1. Mach 4 compatable Wireless pendent
    By divingdon in forum Mach 4
    Replies: 3
    Last Post: 05-28-2018, 05:16 PM
  2. 950 compatable with USB floppy emulator?
    By ifixcnc in forum Cincinnati CNC
    Replies: 1
    Last Post: 02-05-2016, 08:22 PM
  3. 4 Axis TB6560 (compatable)
    By Zygoat in forum Stepper Motors / Drives
    Replies: 3
    Last Post: 03-01-2010, 09:51 AM
  4. Alibre Design Now Vista Compatable!!!!!
    By tobyaxis in forum Uncategorised CAD Discussion
    Replies: 4
    Last Post: 03-16-2007, 06:54 PM
  5. Open Source Compatable PICstep
    By pminmo in forum Open Source Controller Boards
    Replies: 0
    Last Post: 06-11-2005, 05:04 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •