**** BEGIN LOGGING AT Fri Mar 25 02:59:56 2022 Mar 25 03:00:42 I'm not upset "for using libgpiod", I'm annoying because you keep discarding things that work in favor of things that don't, then ask for help, and then discard the advice Mar 25 03:01:00 Oh. Mar 25 03:01:04 I understand now. Mar 25 03:01:43 Okay. Mar 25 03:02:08 I will try to narrow my sights on what works instead of reinventing ideas into new ways of doing things. Mar 25 03:02:20 Can we agree yet? Mar 25 07:20:40 Hello, Looking for Beagle bone black ver2.1 Mar 25 07:20:55 anybody can suggest where i can get it? Mar 25 20:13:14 set_: oh I just realized yet another reason you shouldn't use libgpiod ... a program that uses libgpiod to control relay-jp1 or relay-jp2 that "works" (ignoring that it breaks the sysfs gpios) when the overlay-utils version of the BBORG_RELAY-00A2 overlay is installed will cause a short-circuit (and potentially destroy the BBB) when the bb.org-overlays version of the BBORG_RELAY-00A2 is used, and ... Mar 25 20:13:20 ...conversely if the libgpiod code "works" with the bb.org-overlays version of the overlay then it'll fry the hardware when used with the overlay-utils version of the overlay Mar 25 20:14:22 Oh. Mar 25 20:14:25 That is not good. Mar 25 20:15:06 Why would the /dev/gpio/relay-jp3/value file cause such an issue? Mar 25 20:15:22 it doesn't Mar 25 20:15:29 I am not using the .dtsi file now. Mar 25 20:15:38 But...the files are still there at that location. Mar 25 20:15:59 Oh. I see what you typed now. Mar 25 20:16:07 relay-jp1/2. Mar 25 20:17:51 So, is there a way around such an issue or since it is libgpiod, you are against using your time to tell me? Mar 25 20:17:52 normally the kernel would prevent libgpiod from using gpiod that are already in use, that but that's been patched out in rcn's kernels (an action I do not agree with, even though I know why it was done) Mar 25 20:18:06 set_: easy workaround: DON'T USE LIBGPIOD Mar 25 20:18:50 I know, I know how you feel. Okay, so, there are still issues w/ it and for the am335x w/ what has been produced in .dtsi/.dtbo files. Mar 25 20:19:54 I will stop using it in case the rcn kernels get altered. Mar 25 20:20:28 I should make myself more aware of the issue pertaining to the source and how it can conflict w/ the images/boards/BBBWs. Mar 25 20:21:13 I need to alter the lib. now on github. Did you see the update for pathlib yet? Mar 25 20:21:16 set_: btw, in C_SRC/MyFirst.c you're trying to write to /dev/gpio/relay-jp3/direction .. don't do that, it's read-only Mar 25 20:21:22 https://pastebin.com/HdJdnuDD this suffices Mar 25 20:21:24 Oh. Mar 25 20:21:34 Right. I noticed that. It is already an out. Mar 25 20:21:50 (or use my sysfs-gpio library) Mar 25 20:21:50 I will change that too. Mar 25 20:21:54 Okay! Mar 25 20:22:15 but using open() and write() directly is fine too Mar 25 20:22:25 Oh. Okay. Mar 25 20:22:44 which shows the simplicity of using sysfs gpio when the gpio has already been setup by DT (which my overlay does) Mar 25 20:23:06 have you installed buster yet or are you still messing with bullseye? Mar 25 20:23:23 Bullseye on this board is staying for now. Mar 25 20:23:28 I have not changed it yet. Mar 25 20:24:11 then you'll at least need to install https://github.com/rcn-ee/repos/blob/master/bb-customizations/suite/buster/debian/80-gpio-noroot.rules since we've observed it's missing in bullseye Mar 25 20:24:18 to set the permissions right Mar 25 20:24:23 Right. Mar 25 20:24:27 I did it. Mar 25 20:24:48 I think this is where I am able to use your lib. w/out issues, i.e. well that plus the udev rule. Mar 25 20:24:59 You udev rule. Mar 25 20:25:05 your == You Mar 25 20:25:34 That one you showed me in the posts on pastebin. Mar 25 20:25:39 yep, my rule creates the symlinks in /dev/gpio/, while the 80-gpio-noroot.rules fixes the permission errors Mar 25 20:25:45 Aw. Mar 25 20:26:04 Okay. See, I knew this was the reason I was able to use this source the way it was used. Mar 25 20:26:49 The symlinks in /dev/gpio/ is how I found out about how to use it in that .C file. Mar 25 20:27:09 I was unaware of active_low at first. Now, I know! Mar 25 20:27:53 I kept reading things. None of it made since. Then, all of a sudden, it hit me. I already read about this once a long time ago. Mar 25 20:27:59 Bam! Mar 25 20:28:22 I like to joke about epiphanies. There was one w/ active_low and value. Mar 25 20:29:15 ignore active_low Mar 25 20:29:17 you don't need it Mar 25 20:29:26 Okay. So, I will just take out direction and know that using it in MyFirst.c...Oh. Mar 25 20:29:31 Oh. Mar 25 20:29:52 like I said earlier, this suffices: https://pastebin.com/HdJdnuDD Mar 25 20:30:02 Now. Mar 25 20:30:05 Okay. Mar 25 20:31:03 (writing direction is not only unnecessary but doesn't, or shouldn't, work since this attribute is only writable for bidirectional gpios while the relays are output-only) Mar 25 20:31:58 also beware that if you used libgpiod on any of these gpios even once, it'll break them for sysfs access until you reboot Mar 25 20:32:12 okay, that bb-customizations package for bullseye is now fixed.. Had the flu for this week, so i've not really been aroudn.. Mar 25 20:32:15 Oh. Mar 25 20:32:23 No! Mar 25 20:32:30 The flu. Yikes. It is march. Mar 25 20:32:42 Get well soon. Mar 25 20:32:56 and the snow is melting... i'm allergic to allergies.. ;) i'm good now.. Mar 25 20:33:52 Yikes. Allergies. oh. good. Pulling through the sickness is half the battle. Mar 25 20:34:06 I say stop eating out. Those people are sickos. Mar 25 20:34:56 No offense to people doing well in the food industry. Mar 25 20:35:20 rcn-ee: any idea why the official BBORG_RELAY-00A2 overlay is so weird? it declares the relays as leds instead of just exporting them as gpios... Mar 25 20:35:50 yeah, i did that few years ago... led's are one echo off/on.. Mar 25 20:36:06 vs, 3 lines for export, echo, echo.. Mar 25 20:36:29 brb Mar 25 20:36:35 i know we have a udev rule that takes care of the export.. so it's 2 echo's vs 1. ;) Mar 25 20:36:36 rcn-ee: gpios are exported automatically if you use gpio-of-helper Mar 25 20:36:49 rcn-ee: no you're confusing gpio with pwm maybe Mar 25 20:37:05 gpios are automatically exported by the kernel if setup appropriately, and gpio-of-helper takes care of that setup Mar 25 20:37:13 e.g. this is my version: https://github.com/mvduin/overlay-utils/blob/master/BBORG_RELAY-00A2.dtsi Mar 25 20:37:58 (I've now also tweaked my USES_PIN macro to disable the gpio exported by cape-universal in addition to disabling the bone-pinmux-helper, but of course that needs a fairly recent kernel) Mar 25 20:38:22 at the time it was quick, and everything was mainline to make it work.. Mar 25 20:38:37 your version would also work well.. Mar 25 20:41:44 You guys... Mar 25 20:42:01 gpio-of-helper really ought to be mainline... unfortunately mainline has the delusion that the new gpiod is actually a good thing :P Mar 25 20:43:06 what is gpio-of-helper and bone-pinmux-helper and how can I use them to alter pin config(s)? Mar 25 20:43:21 gpiod is great... till the application stops/exits... and then your pin's return to default state.... and the laser cutter burns the house down.... ;) Mar 25 20:43:25 rcn-ee: btw, that udev rule I show in the comments of my overlay is pretty nice too, for using sysfs gpio without hardcoding gpio numbers: https://pastebin.com/raw/TukGTYWD Mar 25 20:43:33 rcn-ee: yes, fucking rude Mar 25 20:43:44 kernel shouldn't touch my gpio unless I ask it to Mar 25 20:44:28 it needs to be fixed, so that when the ioctrl is closed, the state it in, DOES NOT change... till then /sys/class/gpio can never be removed, as it doesn't actually replace it.. Mar 25 20:44:46 that's just one of many problems Mar 25 20:45:01 access control granularity is another (sysfs gpio is per-pin) Mar 25 20:46:11 zmatt: what do you want to do with am6x.. same issue... (but unlike am57xx) it has a working gpio pinctrl... Mar 25 20:46:31 ah crap... gotta run... (picking up parts for thing this weekend..) back tomorow... Mar 25 20:47:05 rcn-ee: here's another reason I don't want to know about gpio numbers: https://pastebin.com/raw/wGBVGNXr Mar 25 20:47:37 rcn-ee: what do you mean, what issue? sysfs gpio should work fine on any linux system that has gpios Mar 25 20:47:57 the best way to deal with gpiod is by ignoring it exists Mar 25 20:50:52 You guys, I am going to look up gpio-of-helper and bone-pinmux-helper. Sheesh. If anyone has time to make me understand, please try to let me know about these libs. Mar 25 21:08:26 set_: they're not libs, they're drivers. don't worry about it Mar 25 21:17:37 Okay. Mar 26 00:26:22 jkridner: there's something strangely satisfying about the am64xx pru pinout... https://docs.google.com/spreadsheets/d/1yGAql1e6KT04BBXlQdE9IXyrvm-3LjirxL1EKgcID04/edit?usp=sharing Mar 26 00:26:26 it's so symmetrical Mar 26 00:26:49 (although really it's just rather inflexible, with almost every signal having only one mux option) Mar 26 00:45:17 mux it! Mar 26 01:28:53 That is how I like it. Mar 26 01:29:00 one mux option! Mar 26 01:29:16 simple methods for simple folk here. Mar 26 01:31:27 @zmatt: Did you see my updated pathlib thing? Mar 26 01:31:38 that's probably because you've never been tasked to figure out how to get , , , and functionality pinned out of some SoC or microcontroller and having to figure out how to get all of that using the obnoxiously constrained pinmux options of that SoC/microcontroller Mar 26 01:31:47 what updated pathlib thing? Mar 26 01:31:53 Oh. Mar 26 01:31:57 Please hold. Mar 26 01:32:51 Here: https://github.com/silver2row/BBBW_RELAYCAPE/tree/main/Python3_SRC w/ MySecond.py and MySecond_Test.py being the files in question. Mar 26 01:32:59 I updated them! Mar 26 01:33:16 Slowly will a man learn to be a boy and grow again? Mar 26 01:33:58 I have not used the other available functions yet but I will/might learn how to use them soon. Mar 26 01:34:12 it looks like it makes no sense whatsoever and you've just copy-pasted some random bits of totally unrelated python code and put them into a blender to create some kind of disgusting smoothie Mar 26 01:34:25 Smooth! Gotcha. Mar 26 01:34:33 hhahah. I know. Mar 26 01:34:48 basically, these are the lines that make sense: https://github.com/silver2row/BBBW_RELAYCAPE/blob/main/Python3_SRC/MySecond.py#L4-L8 Mar 26 01:35:24 Why do those lines make no sense? Mar 26 01:35:38 no, those are the lines that *do* make sense Mar 26 01:35:41 the rest doesn't Mar 26 01:35:47 Oh. Mar 26 01:35:53 Dang. Mar 26 01:36:07 although I'd disagree with the aesthetic choice of using an all-uppercase name (GPIO) for that variable Mar 26 01:36:15 pathlib.py has many functions to use. Mar 26 01:36:16 Oh. Mar 26 01:36:24 So, now, nothing I do is good. Blah. Mar 26 01:36:25 it does, none of which you need Mar 26 01:36:32 Right, but... Mar 26 01:36:34 apart from the ones in those two lines Mar 26 01:36:47 I can try to use them in time to learn more, right? Mar 26 01:36:54 I mean... Mar 26 01:37:01 What else is there to do? Mar 26 01:37:35 For instance, using pathlib is one way to decry variables out of classes and functions but what else is available for I/O? Mar 26 01:38:08 pathlib really makes it very easy to do so. So easy in fact, it should not be done. Mar 26 01:38:17 Right? Mar 26 01:39:16 I tried the MyFirst.py w/ I/O and threading. I do not think threading is a route I should take for now. Mar 26 01:39:27 https://pastebin.com/L54bD4ix Mar 26 01:40:19 Well, w/ your education in this dept, yes. You make more since and can articulate things better in source. Mar 26 01:40:27 since = sense Mar 26 01:41:29 I am still just a learner thinkin' of ways to handle source that is already available. Mar 26 01:42:11 Speakin' of learnin'. My hard drive crashed. Mar 26 01:42:13 Boo. Mar 26 01:42:30 it is basically new and under warranty. Mar 26 01:42:33 Phew. Mar 26 01:42:37 Anyway... Mar 26 01:43:02 @zmatt: Are you saying do not add the functions from pathlib for use in case I want to use them? Mar 26 01:43:40 but you weren't "using source already available", even if perhaps you copied bits of code from random sources (evidently unrelated to task at hand), the resulting nonsense in your files is genuinely all your own :P Mar 26 01:43:48 I have no idea what you're even saying Mar 26 01:44:21 Okay. in pathlib.py, there are classes and functions that are available for use in source. Mar 26 01:44:33 Why not use more than just write_text? Mar 26 01:44:43 because none of those functions are useful in this situation? Mar 26 01:44:50 oh. Mar 26 01:45:09 Right, but I can learn new things that may be useful in different situations. Mar 26 01:46:05 like globbing in Linux, glob is a file in python3. Mar 26 01:46:09 sure, but that requires that the functionality is actually useful in the situation you're applying it Mar 26 01:46:24 otherwise nothing is achieved and nothing is learned Mar 26 01:46:48 Oh. Right...my query is this idea: Should I make things easy to understand or harder to grasp in case random people view my work? Mar 26 01:47:03 nobody who reads your code has any idea what it does Mar 26 01:47:19 at least this particular python code (and most python code I've seen from you) Mar 26 01:47:27 Hhaha. You are probably right. Mar 26 01:47:41 So, what if one day, ONE DAY, I come up w/ something of use? Mar 26 01:48:32 like, your MySecond.py and MySecond_Test.py ... like 90% of it I have not the slightest clue what it could possibly be trying to achieve Mar 26 01:48:53 Oh. It has to do w/ unfinished business or WIP. Mar 26 01:49:08 So, I am building the flow slowly. Mar 26 01:49:10 no, that's not the problem Mar 26 01:49:15 Oh. Mar 26 01:49:37 What is the problem? Mar 26 01:51:10 I honestly can't tell, other than "you" ... it just doesn't seem like, even after all this time, you have any sort of mental model of what a line of python code actually does Mar 26 01:51:26 I guess Mar 26 01:51:49 No issue. If you cannot be more hateful in your journey in life as it pertains to me and my source, sobeit. Mar 26 01:52:00 I accept the niceness. Mar 26 01:52:58 jp1 heh? Mar 26 01:53:09 or whatever relay Mar 26 01:53:12 I know. Mar 26 01:53:25 You just mentioned something earlier that made me think. Mar 26 01:53:41 this isn't using gpiod so that concern doesn't exist Mar 26 01:53:47 Oh. Mar 26 01:53:51 Okay. Mar 26 01:54:03 So, the issue w/ the jp1/2 is only for libgpiod. Mar 26 01:54:07 Which you utterly hate. Mar 26 01:55:10 I think hate is a strong word, but it's just in many ways worse than sysfs gpio Mar 26 01:55:38 Okay. No hating. Just disliking. It has so many more functions! Mar 26 01:55:46 I mostly just don't want *you* messing with it since that's just asking for trouble Mar 26 01:55:55 Okay. Mar 26 01:55:56 Fine. Mar 26 01:56:52 I know people in the community of Open Source dislike me. I am okay w/ this idea. But, this does not mean I should stop, cease, halt, shutdown, or zilch my understandings of code, hardware, and the combination of the two. Mar 26 01:57:33 certainly not, but maybe try to focus a bit more Mar 26 01:58:10 Forget focusing. I need a real education in this matter "a bit more." Mar 26 01:58:19 I am old now. Mar 26 01:58:34 I mean, literally, does PWM on the BBB still work? Mar 26 01:58:39 yes Mar 26 01:58:41 Oh. Mar 26 01:59:15 Hmm. This one person from github and forums says that the newer kernels take the path of pwm away from his boards. Mar 26 01:59:17 though some versions of the bb-customizations package have a broken udev rule that neglects to export the pwms Mar 26 01:59:21 Aw. Mar 26 01:59:25 I remember why now. Mar 26 01:59:30 It is for a backlight. Mar 26 01:59:36 Right. Mar 26 01:59:39 (because of compatibility issues.. for which I've proposed a solution but it hasn't been implemented yet) Mar 26 01:59:47 Oh. Mar 26 01:59:59 what person on the forums? Mar 26 02:00:11 Hmm. I think kiosk mode is neat but...oh. Hold on. Mar 26 02:00:14 I will show you. Mar 26 02:01:22 Here: https://forum.beagleboard.org/t/pwm-subdirectories-dissapeared-after-debian-update/31565/2 Mar 26 02:01:47 He is using older kernels still and I followed a repo. of his to test things. Mar 26 02:04:34 set_: nothing in your long ramble is relevant, the correct answer comes (of course) from rcn at the end of the thread Mar 26 02:04:51 Right. I thought I could help w/ some ramble. Mar 26 02:05:19 @zmatt: If you have a damn heartache due to being so technical, I am going to get angry. Mar 26 02:05:35 I will tell my granny about your behavior. Ha. Mar 26 02:07:00 All jokes aside, there is no way i could have known about the pwm instances being hidden due to a package I never knew existed. Mar 26 02:28:08 or something. **** ENDING LOGGING AT Sat Mar 26 02:59:56 2022