02 Jan 2016 15:11 #67709 by REEEN
REEEN replied the 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 ?
02 Jan 2016 17:03 #67713 by andypugh
andypugh replied the 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
02 Jan 2016 17:14 #67714 by REEEN
REEEN replied the 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 ...
02 Jan 2016 17:57 #67716 by andypugh
andypugh replied the 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"
02 Jan 2016 18:05 #67717 by fixer
fixer replied the 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.
02 Jan 2016 18:21 #67719 by REEEN
REEEN replied the 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 ...
02 Jan 2016 18:30 #67720 by fixer
fixer replied the 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.
10 Jan 2016 12:30 #68154 by REEEN
REEEN replied the topic: Pokeys
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
11 Jan 2016 17:20 #68185 by REEEN
REEEN replied the 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!
13 Jan 2016 17:03 #68326 by fixer
fixer replied the 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!
Time to create page: 0.080 seconds
Powered by Kunena Forum