XHC-WHB04B-6 LinuxCNC not working

More
7 years 2 weeks ago - 7 years 2 weeks ago #148045 by randypetersen
Awesome!

Getting closer got that xhc-hb04 copied in and now when I run it I get some hex displaying when i do things to on the MPG so the connection has succeeded. I did have to "sudo xhc-hb04" to get it to run.

Checked the USB info looks like the right vendor/product info:
Code:
Unknown Device Manufacturer: KTURT.LTD Speed: 12Mb/s (full) USB Version: 1.10 Device Class: 00(>ifc ) Device Subclass: 00 Device Protocol: 00 Maximum Default Endpoint Size: 64 Number of Configurations: 1 Vendor Id: 10ce Product Id: eb93 Revision Number: 0.00 Config Number: 1 Number of Interfaces: 1 Attributes: 80 MaxPower Needed: 100mA Interface Number: 0 Name: (none) Alternate Number: 0 Class: 03(HID ) Sub Class: 00 Protocol: 00 Number of Endpoints: 1 Endpoint Address: 81 Direction: in Attribute: 3 Type: Int. Max Packet Size: 64 Interval: 2ms

Changed this:
loadusr -W xhc-hb04 -I sim-mammoth-rtr.ini -H
to
loadusr -W xhc-hb04 -I xhc-hb04-layout1.ini -H

and put what you said into the xhc-hb04-layout1.ini file.
Code:
[XHC-HB04] BUTTON=01:button-reset BUTTON=02:button-stop BUTTON=03:button-start-pause BUTTON=04:button-feed_up # Macro 1 BUTTON=05:button-feed_down # Macro 2 BUTTON=06:button-spindle_up # Macro 3 BUTTON=07:button-spindle_down # Macro 4 BUTTON=08:button-machine-home # Macro 5 BUTTON=09:button-safe-z #?? # Macro 6 BUTTON=0A:button-work-home # Macro 7 BUTTON=0B:button-spindle # Macro 8 BUTTON=0C:button-fn BUTTON=0D:button-probe-z # Macro 9 BUTTON=0E:button-continous BUTTON=0F:button-step BUTTON=10:button-macro-10

Tried this:
ATTR{idProduct}=="EB93", ATTR{idVendor}=="10ce", MODE="0666", OWNER="root", GROUP="plugdev"
and
SUBSYSTEM=="usb",ATTR{idProduct=="EB93"},ATTR{idVendor=="10CE"}, MODE="666"
in the
/etc/udev/rules.d/99-xhc.rules file

Getting this:
Code:
Debug file information: Note: Using POSIX realtime libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/008/004: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. ./xhc-hb04.hal:91: Pin 'halui.spindle.0.override.increase' does not exist

which leads me to think it's a rules / permission problem?

I did:
sudo chmod o+w /dev/bus/usb/008/004 to see if I can get past that, and am left with:
Debug file information:
Note: Using POSIX realtime
libusb_claim_interface: Device or resource busy
./xhc-hb04.hal:91: Pin 'halui.spindle.0.override.increase' does not exist

Commented the next few lines that gave me errors out, and I am at:
Debug file information:
Note: Using POSIX realtime
libusb_claim_interface: Device or resource busy
./xhc-hb04.hal:35: waitpid failed xhc-hb04 xhc-hb04
./xhc-hb04.hal:35: xhc-hb04 exited without becoming ready
16326
Last edit: 7 years 2 weeks ago by randypetersen. Reason: kept working on it... added more info...

Please Log in or Create an account to join the conversation.

More
7 years 2 weeks ago - 7 years 2 weeks ago #148052 by satiowadahc
I had the [XHC-HB04] in my main ini, although the way you have it should work


Ah I see the typo:
SUBSYSTEM=="usb",ATTR{idProduct}=="eb93",ATTR{idVendor}=="10ce", MODE="0666"

If you need sudo the device won't become ready
Last edit: 7 years 2 weeks ago by satiowadahc. Reason: Clarity

Please Log in or Create an account to join the conversation.

More
7 years 2 weeks ago #148054 by randypetersen
Hey I got LinuxCNC to start!!!

The stop button works, but can't seem to get anything else working at the moment, probably cause I kept commenting out lines to get it to start up.

I think I missing something on why it kept saying PIn doensn't exist... For the moment I was just commenting them out to see if I could get anywhere. Any guesses on what I am missing?
Mostly in the XHC-HB04.HAL file...

Do you think I need to move those INI lines you mentioned?

Please Log in or Create an account to join the conversation.

More
7 years 2 weeks ago #148059 by tommylight
Not my forte but, did you add your user the the dialout group ?
Without it you will not have full access to USB ports. Learned that from using arduinos.

Please Log in or Create an account to join the conversation.

More
7 years 2 weeks ago #148067 by randypetersen
Thanks tommylight,

gave this a shot:
user@precix510:~$ sudo usermod -a -G dialout user
still wasn't functioning, but I think I am connected properly since I the stop button works! :)

display isn't being updated, and other most other buttons aren't functioning.
Feed buttons are, but display and jogging isn't working. I think I am still missing a piece of the puzzle :)

When I enable this line:
# Jog wheel and axis selection button
net jog-x axis.x.jog-enable <= xhc-hb04.jog.enable-x
I get this:
Code:
Debug file information: Note: Using POSIX realtime ./xhc-hb04.hal:135: Pin 'axis.x.jog-enable' does not exist 4990 PID TTY STAT TIME COMMAND Stopping realtime threads Unloading hal components Note: Using POSIX realtime

Pins are defined in INI correct?

Thanks!!!
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
7 years 2 weeks ago #148125 by satiowadahc
Comment out the line, when you open linuxcnc, open the halmeter and look for a jog-enable pin. I'm thinking yours might be something like joint.0.jog-enable or axis.0.jog-enable

Please Log in or Create an account to join the conversation.

Time to create page: 0.212 seconds
Powered by Kunena Forum