Pokeys

More
02 Jan 2016 15:11 #67709 by REEEN
Replied by REEEN on topic Pokeys
Thank you !

I found out how to use the bus with the library, I only have one problem left, I can not connect to the device, the serial number is written on the board, i set the halpin devSerial to this number, but it won't connect ..... Any Ideas ?

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

More
02 Jan 2016 17:03 #67713 by andypugh
Replied by andypugh on topic Pokeys
I haven't tried this, but lsusb should list the info you need.

if you get "command not found" then sudo apt-get install usbutils
The following user(s) said Thank You: LAUSCH

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

More
02 Jan 2016 17:14 #67714 by REEEN
Replied by REEEN on topic Pokeys
Hello Andy,

I got the following information by using lsusb for the pokeys board:

Bus 001 Device 004: ID 1dc3:1001

I see ID 1dc3:1001 but pin devSerial from the component is s32 ...

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

More
02 Jan 2016 17:57 #67716 by andypugh
Replied by andypugh on topic Pokeys
I have no idea if this is the right thing to do, but you can use hex notation in a "setp" command.
For example "setp component.serial 0x1dc3"

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

More
02 Jan 2016 18:05 #67717 by fixer
Replied by fixer on topic Pokeys
Those are USB VID and PID,
Serial is shown in windows software, where you configure IO pins functions. Should be downloadable somwhere on the Polabs webpage.

Hal pins are always shown, even if board is not connected. There is "alive" pin, that blinks every time the communication with the board is ok. If it is not blinking, something is wrong. You should make some logic in HAL to use that pin and safely stop the machine if something goes wrong (USB gets disconected, ...)
set the device serial in "devSerial" pin with setp command. If you have multiple boards, then you can do multiple instances of HAL component, each conected to its own board by serial number.

Do you have libusb installed? Follow the installation procedure from the link in my firs post, if you dont have it,

Please post back if you will expand the functionality of this component, someone else might find it useful.

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

More
02 Jan 2016 18:21 #67719 by REEEN
Replied by REEEN on topic Pokeys
Hello fixer,
yes I found the serial in the software and it is also written on the usb board.

I have seen the alive pin, this pin is always on if I set serial to anything but 0.

I mada a "connected" pin that gets high if the pointer dev is not NULL.

Yes I have libusb installed if not there would be an error.

currently I use VMWARE virtual box to test the board, I captured the usb device in vmware.

I will post my changes when they are tested and working :) but I can't without connection ...

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

More
02 Jan 2016 18:30 #67720 by fixer
Replied by fixer on topic Pokeys
maybe the virtualization is the problem. Try it on real HW, or try to compile some examples for command line from PoLabs,...
If even the examples dont work try contacting Polabs, they usually answer fast and are willing to help.

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

More
10 Jan 2016 12:30 #68154 by REEEN
Replied by REEEN on topic Pokeys
Hello,
I just tried the board again on a real debian pc, with no luck...

I made sone test files in C to test whether the board is recognized.
I ran the test files and yes, the board could not be identified.
Then I ran the same testfile under root (sudo).
And now it works....

So this is the problem !

Any idea how to solve this ?


Greets REEEN

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

More
11 Jan 2016 17:20 #68185 by REEEN
Replied by REEEN on topic Pokeys
Finally I got it!

I needed to create a new udev rule:

Create a new file in the /etc/udev/rules.d named 90-usb-pokeys.rules with the following contents:

SUBSYSTEM=="usb", ATTRS{idVendor}=="1dc3", ATTRS{idProduct}=="1001", GROUP="plugdev", MODE="664"

Save the file, then execute

udevadm control --reload-rules

That's it!
The following user(s) said Thank You: LAUSCH

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

More
13 Jan 2016 17:03 #68326 by fixer
Replied by fixer on topic Pokeys
Great that you figured it out! I had udev set from before, when i was experimenting with Hidcomp, and totally forgot about it... sorry!

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

Time to create page: 0.095 seconds
Powered by Kunena Forum