Pokeys_homecomp EncoderSearch / Encoder Arm Topic: Pos_Fb Following errors

More
6 years 2 months ago #178890 by JR1050
A couple years ago I intalled this Pokeys patch and it all worked. When attemping to do it tonite, I got the following


zoey@zoey:~$ sudo apt-get install libusb-1.0-0-dev
[sudo] password for zoey:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libusb-1.0-0-dev
E: Couldn't find any package by regex 'libusb-1.0-0-dev'
zoey@zoey:~$

I changed the stanzas in the apt file to reflect the archives, like so

deb http.archive.debian.org/debian/ wheezy main contrib non-free
deb-src archive.debian.org/debian/ wheezy main contrib non-free
deb http.archive.debian.org/debian/ wheezy-updates main contrib non-free
deb-src archive.debian.org/debian/ wheezy-updates main contrib non-free

Is there anyway to install the libusb dev file? It appears to be unavilable. It seems available as a tarball, how would one install it and does it have to be ver 1.0-0-dev or can it be a later version? At this point with Wheezy being depreciated, what is the next best option? Thanks

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

More
5 years 6 months ago #207397 by MATZE-ATZE-SCH
Replied by MATZE-ATZE-SCH on topic Pokeys
Hello,

I have LinuxCNC 2.8.0 on Debian 10 and try to install the Pokey57U.

I have followed the steps from Andy on page 10.
In the Halshow I see the Pins, but the pokey.0.alive isn´t blinking and the IN0 isn´t respnse to a switch I connected to the Pokey for testing.

Is this a error because LinuxCNC 2.8, or Debian 10?
In the Terminal with "lsusb" I see the connected Pokey.
Also the compile of pokey.comp seems correct...

Maybe an error with RW permission for the Pokey caused by Debian10?

Best regards
Marcel

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

More
5 years 6 months ago - 5 years 6 months ago #207473 by MATZE-ATZE-SCH
Replied by MATZE-ATZE-SCH on topic Pokeys
Ok,

have tried the steps again,
now I get an error message when try to compile the pokeys.comp with "sudo halcompile --install pokeys.comp":

gcc -I/usr/include -I/usr/include/linuxcnc -URTAPI -U__MODULE__ -DULAPI -Os -o pokeys /tmp/tmpSkpKFD/pokeys.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
/usr/bin/ld: /tmp/ccUQNzda.o: in function `writeI2C':
pokeys.c:(.text+0x436): undefined reference to `PK_I2CWriteStart'
/usr/bin/ld: pokeys.c:(.text+0x44d): undefined reference to `PK_I2CWriteStatusGet'
/usr/bin/ld: /tmp/ccUQNzda.o: in function `readI2C':
pokeys.c:(.text+0x49b): undefined reference to `PK_I2CWriteStart'
/usr/bin/ld: pokeys.c:(.text+0x4ab): undefined reference to `PK_I2CReadStart'
/usr/bin/ld: pokeys.c:(.text+0x4ce): undefined reference to `PK_I2CReadStatusGet'
/usr/bin/ld: /tmp/ccUQNzda.o: in function `main':
pokeys.c:(.text.startup+0x89): undefined reference to `PK_ConnectToDeviceWSerial'
/usr/bin/ld: pokeys.c:(.text.startup+0xa1): undefined reference to `PK_DigitalIOGet'
/usr/bin/ld: pokeys.c:(.text.startup+0xb5): undefined reference to `PK_AnalogIOGet'
/usr/bin/ld: pokeys.c:(.text.startup+0x275): undefined reference to `PK_DisconnectDevice'
collect2: error: ld returned 1 exit status
make: *** [Makefile:2: pokeys] Fehler 1

Any sugestions?

EDIT: Sorry, my fault, have used the wrong .comp...
But still unable to get it to work
Last edit: 5 years 6 months ago by MATZE-ATZE-SCH.

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

More
5 years 6 months ago #207482 by MATZE-ATZE-SCH
Replied by MATZE-ATZE-SCH on topic Pokeys
Hello,

I have now try a few thinks:
On a different HDD I have installed Debian 9 with Linuxcnc 2.7,
there it works.
Then I have upgrad LinuxCNC to 2.8,
there it worked also, the alive pin is blinking and the switch on in 1 is toggeling.

So I think it is no issue of Linuxcnc or the version of it,
I think it is an issue with the Debian 10?

Best regards
Marcel

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

More
5 years 6 months ago #207506 by MATZE-ATZE-SCH
Replied by MATZE-ATZE-SCH on topic Pokeys
OK, finally I have got it to work!
I have set in the
90-usb-pokeys.rules
the Mode to 666
SUBSYSTEM=="usb", ATTRS{idVendor}=="1dc3", ATTRS{idProduct}=="1001", GROUP="plugdev", MODE="666"

Then, while LinuxCNC is running, I have unpluged and replugged the Pokey, and then it works, even when I replug it or restart the PC...
The following user(s) said Thank You: andypugh, robins, LAUSCH

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

More
4 years 9 months ago - 4 years 9 months ago #231707 by mechoil
Replied by mechoil on topic Pokeys ethernet
Finally was able to make it work through ethernet (not tested with real hardware!)

Need to change line in pokeys.comp:
Code:
while(dev == NULL)dev = PK_ConnectToDeviceWSerial(12345, 5000);  //waits for usb device to while(dev == NULL)dev = PK_ConnectToDeviceWSerial_UDP(12345, 5000);  //waits for usb device

In my case network discovery didn't work, so i've changed this file:
Code:
diff --git a/PoKeysLibCoreSockets.c b/PoKeysLibCoreSockets.c index 61f68fd..f6561eb 100644 --- a/PoKeysLibCoreSockets.c +++ b/PoKeysLibCoreSockets.c @@ -287,7 +287,7 @@ int32_t PK_SearchNetworkDevices(sPoKeysNetworkDeviceSummary * devices, uint32_t          // Send discovery request...          remoteEP.sin_family = AF_INET;          remoteEP.sin_port = htons(20055); -        remoteEP.sin_addr.s_addr = a; // inet_addr("255.255.255.255"); +        remoteEP.sin_addr.s_addr = inet_addr("255.255.255.255");            if (sendto(txSocket, SendBuf, BufLen, 0, (SOCKADDR *)&remoteEP, sizeof(remoteEP)) == -1)          {
Last edit: 4 years 9 months ago by mechoil. Reason: fix format
The following user(s) said Thank You: LAUSCH

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

Time to create page: 0.521 seconds
Powered by Kunena Forum