confirmed - fix works like a charm. And thanks for the new package, didn't have to setup a build env after all - not yet anyway.
Have fun, Markus On Tue, 21 May 2019 19:41:39 -0700 (PDT) Daren Schwenke <darenschwe...@gmail.com> wrote: > Thank you for the work here. I'm about to venture down this rabbit > hole myself and this is useful stuff. > > On Tuesday, May 21, 2019 at 3:24:44 PM UTC-4, mlampert wrote: > > > > wow - that was quick. I'll have to setup my box for compiling mk, > > haven't done that yet. > > > > For the record, if nobody noticed for two years I would call it a > > feature request, not a bug ;) > > > > Thanks a lot - I'll confirm once I manage to build it. > > Markus > > > > On Mon, 20 May 2019 22:12:24 -0700 (PDT) > > John Morris <jo...@dovetail-automata.com <javascript:>> wrote: > > > > > On Tuesday, May 21, 2019 at 6:30:32 AM UTC+8, mlampert wrote: > > > > > > > > I created an issue, hope I got the description right: > > > > https://github.com/machinekit/machinekit/issues/1481 > > > > > > > > > > Thanks, Markus and Charles. I put in a PR: > > > > > > https://github.com/machinekit/machinekit/pull/1482 > > > > > > Sorry I didn't test the original patch more rigorously. Seems my > > > super-simple Goldibox HAL config didn't use any GPIO inputs! > > > > > > John > > > > > > > > > > > > > > On Mon, 20 May 2019 14:39:49 -0700 > > > > markus <mar...@bibi.ca <javascript:>> wrote: > > > > > > > > > Yay - that does work, it is required to specify the board > > > > > though: > > > > > > > > > > markus@pocketbeagle:~/machinekit/configs/infinity$ halrun > > > > > msgd:0 stopped > > > > > rtapi:0 stopped > > > > > rtapi_msgd command: /usr/libexec/linuxcnc/rtapi_msgd > > > > > --instance=0 --rtmsglevel=1 --usrmsglevel=1 --halsize=524288 > > > > > rtapi_app > > > > > command: /usr/libexec/linuxcnc/rtapi_app_rt-preempt > > > > > --instance=0 halcmd: loadrt hal_bb_gpio output_pins=201 > > > > > <stdin>:1: insmod failed, returned -1: > > > > > rtapi_app_main(hal_bb_gpio): -1 Operation not permitted > > > > > > > > > > halcmd: loadrt hal_bb_gpio board=PocketBeagle output_pins=201 > > > > > halcmd: > > > > > > > > > > > > > > > > > > > > > > > > > On Mon, 20 May 2019 16:24:59 -0500 > > > > > Charles Steinkuehler <cha...@steinkuehler.net <javascript:>> > > > > > wrote: > > > > > > Hmm...looking at the code it appears the output pins have a > > > > > > conditional for the pin numbering fixup: > > > > > > > > > > > > > > > > > > https://github.com/machinekit/machinekit/blob/master/src/hal/drivers/hal_bb_gpio/hal_bb_gpio.c#L365-L370 > > > > > > > > > > > > > > > > ...that's missing for the input pins: > > > > > > > > > > > > > > > > > > https://github.com/machinekit/machinekit/blob/master/src/hal/drivers/hal_bb_gpio/hal_bb_gpio.c#L272-L275 > > > > > > > > > > > > > > > > Combined with the legacy use of 1xx and 2xx for the > > > > > > BeagleBone pin numbers (which is why the fixup exists in > > > > > > the first place) it looks like that's breaking you pin > > > > > > numbering scheme. > > > > > > > > > > > > Can you try with just output pins and see if that works? > > > > > > > > > > > > > > > > > > On 5/20/2019 4:06 PM, markus wrote: > > > > > > > That actually is the problem - the driver takes the p1 > > > > > > > and p2 pins and uses them as p8 and p9 pins, this is the > > > > > > > excerpt from the hal file that I used: > > > > > > > > > > > > > > # load low-level drivers > > > > > > > loadrt hal_bb_gpio board=PocketBeagle > > > > > > > input_pins=201,202,203,204 > > > > > > > output_pins=217,227,228,229,230,231,232 loadrt > > > > > > > [PRUCONF](DRIVER) > > > > > > > prucode=$(HAL_RTMOD_DIR)/[PRUCONF](PRUBIN) > > > > > > > [PRUCONF](CONFIG) > > > > > > > > > > > > > > Same thing happens if I do it manually with halrun - and > > > > > > > it complains about the first pin in the command line, so > > > > > > > if I remove 201 it complains about 902 not being valid. > > > > > > > > > > > > > > > > > > > > > On Mon, 20 May 2019 15:55:37 -0500 > > > > > > > Charles Steinkuehler <cha...@steinkuehler.net > > > > > > > <javascript:>> wrote: > > > > > > >> On 5/20/2019 3:36 PM, markus wrote: > > > > > > >>> Thanks for the clarification - much appreciated. > > > > > > >>> > > > > > > >>> It seems the driver is ignoring the parameter though. > > > > > > >>> And I get the same result. From linuxcnc.log: > > > > > > >> > > > > > > >> Look closer, it's not the same result. > > > > > > >> > > > > > > >>> May 20 00:07:37 pocketbeagle msgd:0: startup pid=1376 > > > > > > >>> flavor=rt-preempt rtlevel=1 usrlevel=1 halsize=524288 > > > > > > >>> shm=Posix cc=gcc 6.3.0 20170516 > > > > > > >>> version=v0.1~-----~355496b May 20 00:07:37 pocketbeagle > > > > > > >>> msgd:0: ØMQ=4.2.1 czmq=4.0.2 protobuf=3.0.0 > > > > > > >>> atomics=gcc intrinsics libwebsockets=2.0.3 May 20 > > > > > > >>> 00:07:37 pocketbeagle msgd:0: configured: sha=355496b > > > > > > >>> May 20 00:07:37 pocketbeagle msgd:0: built: Mar 14 > > > > > > >>> 2019 10:47:55 sha=355496b May 20 00:07:37 pocketbeagle > > > > > > >>> msgd:0: register_stuff: actual hostname as announced by > > > > > > >>> avahi='pocketbeagle.local' May 20 00:07:37 pocketbeagle > > > > > > >>> msgd:0: zeroconf: registering: 'Log service on > > > > > > >>> pocketbeagle.local pid 1376' May 20 00:07:38 > > > > > > >>> pocketbeagle msgd:0: zeroconf: registered 'Log service > > > > > > >>> on pocketbeagle.local pid 1376' _machinekit._tcp 49152 > > > > > > >>> TXT "uuid=4e7e123c-1726-4351-bdfc-eba93047fb35" > > > > > > >>> "instance=f2ce6258-7acd-11e9-aea4-606405e00475" > > > > > > >>> "service=log" "dsn=tcp://pocketbeagle.local:49152" May > > > > > > >>> 20 00:07:39 pocketbeagle rtapi:0: 1:rtapi_app:1381:user > > > > > > >>> hal_bb_gpio: ERROR: invalid pin number '901'. Valid > > > > > > >>> pins are 101-136 and 201-236. > > > > > > >> > > > > > > >> The P8/P9 headers do not exist on the PocketBone. Try > > > > > > >> using legal pin numbers: 101-136 and 201-236 > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. To view this discussion on the web visit https://groups.google.com/d/msgid/machinekit/20190521201819.6c0c14bf%40yolanda. For more options, visit https://groups.google.com/d/optout.