**** BEGIN LOGGING AT Thu Nov 07 02:59:57 2019 Nov 07 08:57:16 Good morning, I have a question regarding the new beagle bone ai. When I run htop, I see "only" 611MB of RAM and not 1GB. Why is that? Nov 07 09:33:09 Good morning all! Nov 07 09:33:57 Is this an active channel? Nov 07 09:34:12 no Nov 07 09:34:17 we are totally inactive Nov 07 09:34:39 in fact the channel is just entirely filled with bots Nov 07 09:34:55 sometimes even with böts Nov 07 09:34:58 beep boop Nov 07 09:35:46 looool Nov 07 09:35:56 I havent actually worked with beagles in like 4 years Nov 07 09:36:16 but our system is trying to integrate electronics and computing into our sensor Nov 07 09:36:29 Was just curious as to the state of beagles Nov 07 09:36:37 i still have a BBB at home somewhere Nov 07 09:37:11 the BBB and its variants are alive and well Nov 07 09:37:37 Nice! Nov 07 09:37:50 Yeah i saw the blue came out awhile ago Nov 07 09:37:57 pretty awesome if you ask me Nov 07 09:38:04 there's also a new BeagleBone AI which uses the AM5729 SoC that's also on the beagleboard x15, for applications that need more computational power Nov 07 09:39:23 wow it looks pretty awesome Nov 07 09:39:37 I did find back then that there was limitted python support for the hardware Nov 07 09:39:56 and stuff like the gpu and the pru's were not quite accesible or figured out yet Nov 07 09:40:04 what is the state of that? Nov 07 09:40:21 ehm, what? Nov 07 09:40:34 I'm not sure what you mean by "python support for the hardware" Nov 07 09:40:58 you know, like... import pru, gpu Nov 07 09:41:03 though for interacting with pruss from python, I've made a library py-uio: https://github.com/mvduin/py-uio Nov 07 09:41:12 Awesome bro Nov 07 09:41:27 the gpu's APIs are OpenGL ES and OpenGL ES2 Nov 07 09:41:41 I have no idea whether or not there are python bindings for that Nov 07 09:41:50 but they wouldn't be beaglebone-specific regardless Nov 07 09:42:15 yeah python has plenty of opengl libs, not sure if they are supported on the BBB though Nov 07 09:42:48 but yeah, support for all the computation stuff like numpy, pandas, etc Nov 07 09:42:57 Would be nice if i had a minimal rewrite of code Nov 07 09:43:22 the gpu can't be used (easily) for general computation Nov 07 09:43:31 @zmatt are you working for the beagle foundation or so? Nov 07 09:43:35 nope Nov 07 09:43:44 I've just a beaglebone user Nov 07 09:43:47 *I'm Nov 07 09:43:54 @zmatt the sensor is a stereo-vision machine Nov 07 09:44:13 so that is why i'm asking about the gpu support Nov 07 09:44:42 if you want computational power, especially for vision, you may want the BeagleBone AI... it has a bunch of cores that support OpenCL Nov 07 09:44:50 I mean, i am also versed in c/c++, but just curious as the the power of python on the bbb for actual projects Nov 07 09:45:08 yeah i will probably go for that one Nov 07 09:46:11 Do they have mac support? Nov 07 09:46:24 I remember under linux it was quite easy to set up and start working Nov 07 09:47:22 on current images usb networking should work plug&play on linux and mac, and sometimes on windows if microsoft hasn't broken stuff yet again Nov 07 09:48:48 if course if you connect via ethernet or wifi (whichever is applicable) then there's no specific requirements on the host other than needing an ssh client (or even just a webbrowser if you use the cloud9 ide) Nov 07 09:48:53 *of course Nov 07 09:50:13 Yeah the cloud9 ide was pretty cool, but i always found it a bit slow and buggy on the BBB Nov 07 09:50:27 yeah well cloud9 isn't maintained anymore Nov 07 09:50:38 so that isn't helping Nov 07 09:50:54 Would probably just develop directly one the BB by connecting some periphs Nov 07 09:51:04 is the USB-C on the AI the same as the mac? Nov 07 09:51:19 I have no idea what you mean by that Nov 07 09:51:37 the USB-C on the AI is USB-C Nov 07 09:51:51 Well my mac has usb-c only connections Nov 07 09:52:03 but the iphones usb-c is slightly smaller thanthe macs Nov 07 09:52:27 there's only one USB-C... if it's a different connector then it's not USB-C Nov 07 09:53:18 "type C" solely refers to the specific connector used in fact Nov 07 10:15:54 oh ok Nov 07 10:16:02 I think I'm gonna order one just in case Nov 07 10:16:06 BB AI Nov 07 10:22:42 I just got mine, haven't played with it yet Nov 07 10:30:28 lol you are a dutchie Nov 07 10:30:31 I live in rotterdam myself Nov 07 13:16:50 Ahh, I think I'm in trouble. I made an ADC cape that worked with the BBB, however I don't think that it will be possible to use it with the BBAI as I had hoped ☹️. Nov 07 13:17:15 how so? Nov 07 13:17:49 With the BBB the PRU accesses the ADC over the pins P8.39->P8.46. These are all accessible by pru1. Nov 07 13:18:35 However, with the BBAI P8.44 is mapped to pr 1 pru0 while p8.43 is mapped to pr 1 pru1 Nov 07 13:19:02 Code running on only one PRU can't access both P8.44 and P8.43 as far as I can tell... Nov 07 13:19:20 oof, so you'd need to write code that relies on running both cores in sync Nov 07 13:21:22 That sounds like a nightmare, so my options are a. redesign the board, b. see if I can jumper some of the pins mapped to pru1 to pru0 on the header for now Nov 07 13:22:50 hmm, this could have been fixed by tying some of the unused am5729 pru 1.0 pins (there are still enough of those) in parallel to the pru 1.1 pins in that range Nov 07 13:25:12 hunter2018[m]: it might not be a "nightmare" to make a dual-core solution though, but it depends a bit on what the code looks like and whether or not you have some spare cycles available Nov 07 13:26:34 the pru cores can simultaneously synchronize and send over any contiguous byte-range of r0-r29 using a core-to-core XFR Nov 07 13:29:00 Interesting, I didn't know that. Nov 07 13:38:06 Starting on the device tree setup for my ADC board, I have the following: https://pastebin.com/raw/S1UUhUQG Nov 07 13:38:36 This is pretty close I think, but I need to be able to also toggle P9.18a between low and high during runtime. Nov 07 13:45:39 P9.18a doesn't have a pru mode, P9.18b does Nov 07 13:46:35 Oh yeah, so I'm just using the SPI controller to talk over this SPI bus, not the PRU Nov 07 13:47:18 There is a SPI bus and a SPI like databus for my adc, the PRU does the databus and the SPI bus was just handled by the kernel's spi controller Nov 07 13:47:24 Because if I recall correctly from the BBB, when nothing is being sent over the SPI bus P9.18 (mosi) it idles high. Nov 07 13:47:26 then I'm not sure what you meant by "toggle P9.18a between low and high during runtime" ... miso is an input Nov 07 13:48:34 your comments claim P9.18 is miso, not mosi, hence is never driven by the BBAI and its level is entirely dependent on external hardware Nov 07 14:01:32 anyone have any experience with the 4dsystems 7" display cape for the BBB? Nov 07 14:06:10 Sorry, my comment is wrong. It connects to the ADCs SDI so it should be MOSI. Nov 07 14:06:53 I believe that you can swap d1 and d0 between mosi and miso right? Nov 07 14:07:08 yes Nov 07 14:08:56 So P9.18 is a MOSI and it can't be high while I startup the ADC. There is nothing in the ADC's datasheet about this, but I learned the hard way that if the ADC's SDI line is held high during power up that it doesn't start up correctly. Nov 07 14:09:45 so pull it down instead of up Nov 07 14:10:59 Gotcha, I thought the SPI driver setup the MOSI line as an output and so it was the SPI driver that was driving this pin to a high output level while it's not transferring data. Nov 07 14:11:12 the default pull of P9.18a/b is pull-down after reset Nov 07 14:11:17 mosi is not driven outside transfers Nov 07 14:11:57 That's good to know! I thought once you set it up as MOSI the driver took control and it was always being driven. Nov 07 14:12:28 no since the d1/d0 swap can vary per spi slave, so if no slave is selected it can't safely drive either of them Nov 07 14:13:02 So I'll set it to pulldown, but just out of curiosity how could I swap it between MOSI and a GPIO during runtime? Nov 07 14:13:22 Can the bone pinmux helper do this? Nov 07 14:13:56 it could yes Nov 07 14:14:08 sounds like a somewhat odd thing to want though :P Nov 07 14:15:07 note that P9.18a/b are both pull-down by default after reset, though I'm not sure how they're configured by u-boot (before they're reconfigured by the kernel based on DT) Nov 07 14:16:03 Cool! I also need 3 GPIO pins for my cape that I can toggle low/high from my python script. Someone told me that instead of setting them up as GPIOs I should set them up as LED pins because the GPIO driver is buggy or something? Nov 07 14:16:03 if necessary you could always override internal pull using an external pull-down Nov 07 14:16:16 that sounds like complete nonsense Nov 07 14:16:26 I would not use the led driver for gpios, the led interface sucks Nov 07 14:16:37 I'd just use a gpio-of-helper, same as on the BBB Nov 07 14:16:51 (see e.g. https://github.com/mvduin/overlay-utils/blob/master/gpio-demo.dtsi ) Nov 07 14:18:02 I'm not aware of any bugs in the gpio sysfs interface Nov 07 14:18:09 we use it extensively Nov 07 14:18:55 note that the ACTIVE_LOW and ACTIVE_HIGH constants I use in my example are called GPIO_ACTIVE_LOW and GPIO_ACTIVE_HIGH in mainline linux if I remember correctly Nov 07 14:31:07 Cool, that's what I thought. I think my confusion was because people were saying that gpio-of-helper is old and being replaced by GPIO character device. But I see your rebuttal to this in the logs... Nov 07 14:31:46 yeah the gpio chardev is not a useful replacement for gpio-of-helper *at all* in my opinion Nov 07 14:32:19 the driver itself could use a bit of polishing I guess, but for now it works fine Nov 07 14:33:34 Where can I find the source code that implements the bone pinmux-helper-driver? I think you sent me a link to it once... Nov 07 14:34:13 It was some kind of linux kernel source code listing website or something... Nov 07 14:36:00 rcn has a repo containing snapshots of the linux kernel tree (with patches applied) for every kernel he releases, e.g. https://github.com/RobertCNelson/linux-stable-rcn-ee/blob/4.14.108-ti-r120/drivers/misc/cape/beaglebone/bone-pinmux-helper.c (replace version tag in the url by the desired kernel release) Nov 07 14:36:26 Wait, I found it: https://elixir.bootlin.com/linux/latest/source/include/linux/pinctrl/pinctrl-state.h Nov 07 14:37:17 that's just some header related to the pinctrl framework, it's not part of bone-pinmux-helper Nov 07 14:37:48 Oh yeah, my bad Nov 07 14:56:13 How much of this linux kernel tree is beaglebone specific and how much is just the "standard" linux kernel? Nov 07 14:57:02 well the -ti trees are based on TI's kernel trees, dunno how many patches it has currently but afaik TI does try to actively get their stuff upstream Nov 07 14:57:20 plus some patches on top of that, e.g. bone-pinmux-helper and gpio-of-helper Nov 07 14:57:55 (the sysfs gpio interface is mainline, but rcn's kernels enhance it and introduce gpio-of-helper to allow DT configuration of gpios) Nov 07 14:58:15 So by upstream do you mean they get pushed here: https://github.com/torvalds/linux/tree/master/drivers ? Nov 07 14:58:24 Sorry if it Nov 07 14:58:32 by upstream I mean mainline yes Nov 07 14:59:06 *Sorry if that's a dumb question, I am just beginning to understand what the Linux kernel actually is. Nov 07 15:26:26 offtopic but how does one respond to someone with the psuedonym scruloose? Nov 07 15:28:21 regarding the linux kernel I am SO glad it no longer requires you to compile the drivers into the kernel that was such a pain. I remember I had these hitachi SCSI CDROMS and I had to clone the drivers then modify then to work with the CD-ROM. Nov 07 16:44:10 So where would I modify my .dtsi file: https://pastebin.com/raw/YAPJfePd to make P8.17, P8.18, P8.19 GPIOs? Is this at all correct (ignoring that the pins are wrong) https://pastebin.com/raw/WKBtywKq ? Nov 07 16:44:51 *I this device tree would only setup P8.08 as a GPIO. Nov 07 16:45:52 But, I'm just wondering if I stuck the nodes in the correct places in the .dtsi file. Nov 07 16:47:44 the gpio-demo node is wrong, a top-level node block must reference an existing node, see examples in https://pastebin.com/XC8vB33d Nov 07 16:48:19 in this case you want gpio-demo (maybe choose a better name like "gpio") to be a child node of / since there's not a more suitable a place to put it Nov 07 16:49:32 so top-level blocks can only be / { ... }; &label { ... }; and &{/absolute/path} { ... }; Nov 07 16:50:59 in all three cases specifying the node to be modified Nov 07 16:51:36 Ok, so is this better: https://pastebin.com//WKBtywKq ? Nov 07 16:52:17 I mean this: https://pastebin.com/jBg8ayet Nov 07 16:52:58 nothing changed? Nov 07 16:54:24 also you're only configuring a single gpio (with invalid pinmux declaration) Nov 07 16:59:43 hunter2018[m]: https://pastebin.com/raw/eJdeX6RS Nov 07 16:59:48 something like that maybe (for a single pin) Nov 07 17:01:56 (note &gpio4 rather than &gpio3 due to 1-based numbering) Nov 07 17:06:51 Ok, thanks! So does the way I included it in my .dtsi look correct? https://pastebin.com/raw/jBg8ayet Nov 07 17:07:21 uhh, this is still your old paste Nov 07 17:08:07 (and you can include it into your dts by copying it and pasting it basically anywhere that's not in the middle of another block :P ) Nov 07 17:08:50 Ok, cool! Nov 07 17:11:51 oh sorry, like I said the "ACTIVE_LOW" constant should be GPIO_ACTIVE_LOW: https://elixir.bootlin.com/linux/latest/source/include/dt-bindings/gpio/gpio.h#L15 Nov 07 17:15:13 Great! So one question, this looks very similar to the bone-pinmux-helper. Can you have multiple pinctrl-names with the gpio-of-helper too like this? https://pastebin.com/raw/GPAcEzJP Nov 07 17:16:32 the two have absolutely nothing in common Nov 07 17:17:55 gpio-of-helper does not have any mechanism for selecting pinmux state (hence only the "default" state is of any use, and *maybe* the sleep state) while pinmux-helper does nothing with gpios Nov 07 17:18:06 so there's zero overlap in functionality Nov 07 17:18:40 Why do they both have the pinctrl-names attribute? Nov 07 17:18:45 every device has it Nov 07 17:18:49 (can have it) Nov 07 17:19:24 But it is always default or sleep except for the pinmux-helper node which can be any arbitrary thing? Nov 07 17:20:18 most devices never explicitly select a pinmux state, hence for those devices only the built-in pinmux states defined by the linux kernel (which are automatically selected under specific circumstances) make any sense Nov 07 17:20:29 while pinmux-helper allows userspace to select an arbitrary pinmux state Nov 07 17:20:39 (which is its entire function and reason for existence) Nov 07 17:21:37 there are some other drivers which do use custom pinmux states Nov 07 17:21:58 iirc the dcan driver does Nov 07 17:27:20 So what would the result of doing something like echo foo > /sys/bus/platform/devices/adc-gpio/state be? Nov 07 17:27:40 Would it just say that you can't modify the adc-gpio state? Nov 07 17:27:40 an error since no such attribute exists Nov 07 17:28:05 not even that you can't modify it, it literally doesn't exist Nov 07 17:28:24 it's an attribute explicitly created by the bone-pinmux-helper driver Nov 07 17:29:38 https://github.com/RobertCNelson/linux-stable-rcn-ee/blob/4.14.108-ti-r120/drivers/misc/cape/beaglebone/bone-pinmux-helper.c#L47-L112 Nov 07 17:30:08 Ok cool! That makes sense. It just seems strange that most nodes have a pinctrl-names attribute if it is hardly ever used. I guess for the adc-gpio node you could have "default" and "sleep" to define the pin states when the processor goes to sleep. Nov 07 17:30:10 that declares the attribute along with functions invoked for reading and writing the attribute respectively Nov 07 17:31:03 I mean, it's used all the time, it's just that usually only the "default" state is used... but the flexibility is still needed since sometimes more pinmux states are needed Nov 08 01:07:26 Is there a way w/ the BBBW to plot graphs while using a VNC? Nov 08 01:07:56 Oh and I am using matplotlib, numpy, and some libraries from those sources. Nov 08 01:10:02 I tried. See here: https://pastebin.com/AqRjV5zz. Nov 08 01:10:40 That is the error w/ the VNC and w/ the bash console during a PuTTY session and a vncserver/VNC Viewer combo. Nov 08 01:11:38 The idea of 20 pages opening in my VNC on the BBBW would cause me alarm but it states 20 figures and not pages. Nov 08 01:15:08 I guess writing the image to file would be smarter. I will check that out instead. Nov 08 01:20:07 plot graphs? Nov 08 01:20:08 what kind? Nov 08 01:20:18 and why are you using vnc? why not just make HTML pages and serve that up Nov 08 01:22:04 Oh! Nov 08 01:22:05 Good idea. Nov 08 01:22:12 I just wanted to get a quick view. Nov 08 01:22:32 I did not want to preview on my site the graphs but I guess i can. Nov 08 01:23:11 I guess I could try w/ an image viewer too, i.e. after transferring the data. Nov 08 01:23:44 3D Plot graphs are what I was trying to make to start out. Nov 08 01:23:53 scatter plot, that is. Nov 08 01:24:42 I have unlimited, well 21, graphs now. Odd days! Nov 08 01:26:22 I am learning by copying and pasting for now. I will delve into it later. Nov 08 02:07:04 is it a static plot? Nov 08 02:07:21 if so, gnuplot, output to a JPEG, serve with it over HTTP Nov 08 02:07:54 serve it from the http server on the BBBW Nov 08 02:11:22 Okay. Nov 08 02:11:39 I am sure I do not know how to do that... Nov 08 02:11:58 Oh wait. Nov 08 02:12:02 I might. Nov 08 02:17:58 which part? Nov 08 02:23:43 Oh...I figured I did not understand but I can do it. I do not use gnuPlot. Nov 08 02:33:17 I think their is a plot interface for python so using gnuplot may not be a necessity for you. Nov 08 02:34:51 well actually their are a bunch of plot interfaces. Great for all sorts of plotting :D Nov 08 02:35:47 plotting... to take over... THE WORLD Nov 08 02:36:02 oh wait, that kind of plotting Nov 08 02:38:23 Yeppers...just some dots and lines. Nov 08 02:42:17 GenTooMan: Yea...they have many for python. Nov 08 02:42:31 set_ I would suggest using https://pypi.org/project/plotly-scientific-plots/ plotly Nov 08 02:42:41 I picked matplotlib. It took forever to install but I got it to work. Nov 08 02:42:43 zmatt it's still plotting so I guess so .. Nov 08 02:42:58 Plotly? Okay. I will look at it. Nov 08 02:45:40 Ya...it seems simple enough w/ "one line commands!" Nov 08 02:47:13 This, the data of statistics, is what I failed at the old school. Nov 08 02:47:31 I was p-o'd and refused to retake it. Nov 08 02:47:57 I think that person at the podium hated my desk location. Loose bolts! Nov 08 02:48:31 All you could hear at test time was, "Bank, Clank, Slam, Smash!" Nov 08 02:50:04 A pencil never made so much noise...Boy! **** ENDING LOGGING AT Fri Nov 08 02:59:57 2019