Arduino Leonardo and linears encoders.

More
29 Jan 2013 23:09 #29264 by casetero
Ok, Andy i think with this two PINs:

axis.N.jog-counts pin
shuttlexpress.0.counts

May work as a train of pulses.

ArcEye, before just have one file.rules with all the devices, i have change it and put the etc/udev/rules.d/99-shuttlexpress.rules file with just one entry like the letter says. Nothing change, it continues without permissions, i copy to you what it says:

halcmd: loadusr shuttlexpress
halcmd: shuttlexpress: checking /dev/hidraw0
shuttlexpress: dev /dev/hidraw0 has unexpected Vendor ID 0x04f2 (expected Contour Design, 0x0b33)
shuttlexpress: checking /dev/hidraw1
shuttlexpress: dev /dev/hidraw1 has unexpected Vendor ID 0x04f2 (expected Contour Design, 0x0b33)
shuttlexpress: checking /dev/hidraw2
shuttlexpress: dev /dev/hidraw2 has unexpected Vendor ID 0x04f2 (expected Contour Design, 0x0b33)
shuttlexpress: checking /dev/hidraw3
shuttlexpress: dev /dev/hidraw3 has unexpected Vendor ID 0x10ce (expected Contour Design, 0x0b33)
shuttlexpress: no devices found


and when i type lsusb it says:

pablo@Pablo-cnc:~$ lsusb
Bus 005 Device 002: ID 10ce:eb70 Silicon Labs
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 04f2:0200 Chicony Electronics Co., Ltd
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0dda:2026 Integrated Circuit Solution, Inc. USB2.0 Card Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Maybe is not a permissions problem and i´m doing anythingelse bad, i don´t know.

Thank you!

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

More
29 Jan 2013 23:39 - 29 Jan 2013 23:41 #29266 by BigJohnT
I assume you read the shuttlexpress man page ...

Edit: I see ArcEye is way ahead of me...

John
Last edit: 29 Jan 2013 23:41 by BigJohnT.
The following user(s) said Thank You: casetero

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

More
29 Jan 2013 23:49 - 30 Jan 2013 00:10 #29267 by ArcEye

halcmd: shuttlexpress: checking /dev/hidraw0
shuttlexpress: dev /dev/hidraw0 has unexpected Vendor ID 0x04f2 (expected Contour Design, 0x0b33)

This is your Chicony USB keyboard

Bus 002 Device 002: ID 04f2:0200 Chicony Electronics Co., Ltd

shuttlexpress: checking /dev/hidraw3
shuttlexpress: dev /dev/hidraw3 has unexpected Vendor ID 0x10ce (expected Contour Design, 0x0b33)

This is the Silicon Labs device

Bus 005 Device 002: ID 10ce:eb70 Silicon Labs


I have done a .rules files wich includes these lines:

# Generic HID device
SYSFS{idProduct}=="04d9", SYSFS{idVendor}=="1c40", MODE="0660", GROUP="plugdev"
# Contour design, shuttle pro
SYSFS{idProduct}=="0030", SYSFS{idVendor}=="0b33", MODE="0660", GROUP="plugdev",
# Mando chino
SYSFS{idProduct}=="eb70", SYSFS{idVendor}=="10ce", MODE="0660", GROUP="plugdev"
#El 002/002
SYSFS{idProduct}=="0200", SYSFS{idVendor}=="04f2", MODE="0660", GROUP="plugdev"
#Input
SUBSYSTEM=="input", mode=="0660", group=="plugdev"


I think you need to get rid of all these rules. There should be no need for rules for generic keyboards, mice and USB to UART bridge controllers (or whatever the Silicon Labs device is, I can't find the device code easily)
I have only 3 rules in /etc/udev/rules.d (70-persistent-CD.rules 70-persistant-net.rules and 99-rtai.rules)

Somehow they are claiming hidraw.

Unfortunately I cannot test anything because I don't have your device

regards
Last edit: 30 Jan 2013 00:10 by ArcEye.
The following user(s) said Thank You: casetero

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

More
30 Jan 2013 00:17 #29268 by casetero
Ok, i gave permissions to Chicony electronics because it gave me a warning in the debug file of the start of linuxcnc.

The Silicon Labs device is the USB pendant, i don´t know if i understand you fully, but it should be the idVendor = 0b33 instead 10ce like it is??

I gave permissions to the Silicon Labs device because if not hidconfig wasn´t able to open the device. Maybe i should try to open it without hidcomp, just with

loadusr -W hal_input -KRAL Dual ??

So i have to desactivate all the rules?

So you don´t have the entry to give the permisions to shuttlexpress?

Thank you.

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

More
30 Jan 2013 00:28 #29269 by casetero
Do you think the problem could be that the pendant is not suitable for shuttlexpress since it has an idVendor = 10ce

And it should be 0b33 to be compatible??

The pendant came with a cd that had a ShuttlePro.dll in it, because of that i thought it was compatible, and the wheel has a similar signal to the signals described on the shuttlexpress page, the spring-wheel, maybe i´m wrong...

Thank you!

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

More
30 Jan 2013 00:39 - 30 Jan 2013 00:51 #29270 by ArcEye
Unfortunately I don't have your hardware so I cannot test anything.

All I can do is point out that hidraw0 appears to be linked to your keyboard, which should not require a rule at all
and your USB pendant also appears to be conflicting.

You are in rather uncharted seas, because you have a Windoze USB pendant which you are trying to interface with a component that is meant for use with a different piece of hardware you don't have :S

Do you think the problem could be that the pendant is not suitable for shuttlexpress since it has an idVendor = 10ce


Yes I suspect that is precisely the problem

If you look at shuttlexpress.c the vendor and device codes are hard coded into the component
that is where the error messages you are getting come from
Last edit: 30 Jan 2013 00:51 by ArcEye.
The following user(s) said Thank You: casetero

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

More
30 Jan 2013 00:50 #29271 by ArcEye
This goes back to exactly to what Andy was suggesting earlier, you probably need to write your own component.

The code for shuttlexpress.c will give you one off the shelf that you can change the defines to match your pendant IDs.
Then you can set up the udev rules for the vendor and device IDs of your pendant and see if it will all load.

After that it is just the small matter of whether component, as written, will do what you want, but at least you will have a base to start from.
The following user(s) said Thank You: casetero

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

More
30 Jan 2013 01:07 #29273 by casetero
I think the problem is that idVendor doesn´t mach. Not a permissions problem.

Shuttlexpress just works with idVendor´s 0b33 and the idVendor of my pendant is 10ce.

Is it possible, isnt it??

Ok, i´m going to try to modificate the component shuttlexpress to making it able to read devices with this idVendor.

Thank you again.

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

More
30 Jan 2013 01:31 - 30 Jan 2013 01:35 #29274 by ArcEye
OK

I have just changed the IDs in shuttlexpress.c to those of my Saitek games controller and recompiled

The component loads and recognises the controller, even without any udev rules (I am running as root)

So you should be able to progress from there
halcmd: loadusr shuttlexpress
halcmd: shuttlexpress: checking /dev/hidraw0
shuttlexpress: dev /dev/hidraw0 has unexpected Vendor ID 0x093a (expected Saitek, 0x06a3)
shuttlexpress: checking /dev/hidraw1
shuttlexpress: dev /dev/hidraw1 has unexpected Vendor ID 0x04b4 (expected Saitek, 0x06a3)
shuttlexpress: checking /dev/hidraw2
shuttlexpress: dev /dev/hidraw2 has unexpected Vendor ID 0x04b4 (expected Saitek, 0x06a3)
shuttlexpress: checking /dev/hidraw3
shuttlexpress: found Saitek P990 Dual Analog Pad on /dev/hidraw3
show all
Loaded HAL Components:
ID      Type  Name                                      PID   State
     5  User  shuttlexpress                             12349 ready
          3  User  halcmd12347                               12347 ready
          
          Component Pins:
          Owner   Type  Dir         Value  Name
           5  bit   OUT         FALSE  shuttlexpress.0.button-0
           5  bit   OUT          TRUE  shuttlexpress.0.button-0-not
           5  bit   OUT          TRUE  shuttlexpress.0.button-1
           5  bit   OUT         FALSE  shuttlexpress.0.button-1-not
           5  bit   OUT          TRUE  shuttlexpress.0.button-2
           5  bit   OUT         FALSE  shuttlexpress.0.button-2-not
           5  bit   OUT          TRUE  shuttlexpress.0.button-3
           5  bit   OUT         FALSE  shuttlexpress.0.button-3-not
           5  bit   OUT          TRUE  shuttlexpress.0.button-4
           5  bit   OUT         FALSE  shuttlexpress.0.button-4-not
           5  s32   OUT             0  shuttlexpress.0.counts
           5  float OUT    -0.1428571  shuttlexpress.0.spring-wheel-f
           5  s32   OUT            -1  shuttlexpress.0.spring-wheel-s32

Sorry I didn't grasp early enough what it was that you were actually doing, I was addressing the symptoms not the underlying problem

regards
Last edit: 30 Jan 2013 01:35 by ArcEye.
The following user(s) said Thank You: casetero

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

More
30 Jan 2013 02:47 #29278 by casetero
Ok, i´ve been searching the file shuttlexpress.c and i can´t locate it, can you say to me where it is?

Or i have to download it? I have found one here but i don´t know if it will fit with the 2.5 version:

www.gitorious.org/emc-rt-preempt/emc-rt-...omps/shuttlexpress.c

Thank you, i´m going now!

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

Time to create page: 0.133 seconds
Powered by Kunena Forum