**** BEGIN LOGGING AT Tue Jun 02 02:59:57 2020 Jun 02 03:00:11 btw to clarify what I did with the pins: the contents of &cape_pins_default has simply been copied from am5729-beagleboneai.dts and I've commented out any pins that are used by the other pinmux declarations in the file Jun 02 03:01:38 oh yah that works Jun 02 03:01:47 er crap failing on c compile Jun 02 03:01:55 ? Jun 02 03:02:18 it compiled for me Jun 02 03:02:41 i must be missing c++ Jun 02 03:02:45 what? Jun 02 03:02:48 oh Jun 02 03:02:59 sudo apt-get install cpp Jun 02 03:03:10 that's the c-preprocessor btw, not "c++" :P Jun 02 03:04:07 but... are you saying none of these are on the am572x-iot (non-tidl) image? this sounds more like the console image Jun 02 03:04:29 yah i think i grabed console Jun 02 03:04:32 missing everyt8ihng Jun 02 03:04:39 oh well no worries. will get Jun 02 03:04:51 k done Jun 02 03:04:52 ahh, yes console is minimalistic Jun 02 03:04:54 needed g++ Jun 02 03:05:23 that sounds unlikely, cpp should suffice Jun 02 03:05:44 time for reboot! Jun 02 03:05:51 yeah it just uses cpp and dtc Jun 02 03:06:14 but, you'll want g++ on your system anyway, and it'll indirectly install cpp :P Jun 02 03:06:21 yah adds anyway Jun 02 03:06:36 drum roll!!!!!!! Jun 02 03:06:39 ip link! Jun 02 03:06:48 also, show-pins ! Jun 02 03:06:56 2: can0: mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10 Jun 02 03:06:58 mauahahahahahahaa Jun 02 03:07:05 !!!!!!!!! you are the MAAAAAN! Jun 02 03:07:28 you could use an udev rule to change its name if you want Jun 02 03:07:33 since can0 may be a bit misleading :P Jun 02 03:07:47 then again, the bbai only has one can interface so *shrug* Jun 02 03:08:32 werid... Jun 02 03:08:32 debian@beaglebone:/usr/local/sbin$ sudo show-pins Jun 02 03:09:09 do you think it is just defaulting to enumerated can? Jun 02 03:09:25 ai may be 2 but defaults to enumeration? Jun 02 03:09:32 you don't have to do in /usr/local/sbin to execute it, /usr/local/sbin/ is in the command search path (and if it weren't when going there still doesn't do anything) Jun 02 03:09:45 oh no i know but i had to install Jun 02 03:09:55 and I'm not sure what you're trying to say.. did you try to paste something multi-line into chat? since that doesn't work Jun 02 03:10:17 ah ok Jun 02 03:10:38 you know, i mean some devices enumerate like hot-swappable devices Jun 02 03:10:41 https://pastebin.com/raw/mqTpdcyZ Jun 02 03:10:44 this is what I saw Jun 02 03:10:49 so if you plug a usb in, sdb1, then sdb2 etc. Jun 02 03:10:54 maybe can is enumerating at 0? Jun 02 03:10:56 yes Jun 02 03:10:57 i dunno Jun 02 03:11:00 correct Jun 02 03:11:28 since ai will only have 1 can bus, it will always be 0 Jun 02 03:11:31 that's the fallback for interface names if there's no udev rules or such that give it a better name Jun 02 03:11:40 oh i see Jun 02 03:11:54 man how long have you been doing this!? you are suuper good!' Jun 02 03:12:01 a while Jun 02 03:12:05 haha Jun 02 03:12:09 anyway, show-pins output? Jun 02 03:12:15 show pins failed Jun 02 03:12:19 failed how? Jun 02 03:12:24 Died at /usr/local/sbin/show-pins line 95, <> line 30. Jun 02 03:12:30 i must be missing something Jun 02 03:12:42 could easily be a bug in show-pins Jun 02 03:12:57 it's quite sensitive to changes in the format of the /sys/kernel/debug/ files it reads Jun 02 03:13:08 (I've chosen to parse very strictly since I prefer failures to silent misparsing) Jun 02 03:13:42 ok wait so we gotta test some basic can! Jun 02 03:13:58 lol wow console doesn't even have ifconfig Jun 02 03:14:17 ifconfig is a deprecated utility Jun 02 03:14:27 I don't have it installed on any systems here Jun 02 03:14:54 ah, I think I failed to apply the fix for https://github.com/mvduin/bbb-pin-utils/issues/3 to other branches such as bbai-experimental Jun 02 03:15:24 oh nevermind it does have ifconfig but u have to sudo Jun 02 03:15:48 wait no, I did port that patch Jun 02 03:16:05 weird, ifconfig is in /usr/sbin/ ? Jun 02 03:16:10 ip is in /usr/bin/ Jun 02 03:17:18 Heh? Did you guys figure out how to CAN bus the AI? Jun 02 03:17:23 yah lol Jun 02 03:17:34 omg set_ zmatt is a genious! seriously Jun 02 03:17:41 Okay. Jun 02 03:17:53 friggin seriously! Jun 02 03:17:56 Okay! Jun 02 03:18:00 he just got it up for me! haha Jun 02 03:18:08 What? Damn. Jun 02 03:18:09 canbus: can you: sudo pastebinit -b pastebin.com -i /sys/kernel/debug/gpio Jun 02 03:18:20 (you'll need to apt-get install pastebinit) Jun 02 03:18:28 i need to got to bathroom real quick but after ill add a quick python script to test Jun 02 03:18:49 Nice. Jun 02 03:18:51 then ill add everything to stack overflow so other people can benefit from zmatt's genious Jun 02 03:18:51 canbus: or otherwise share the contents of /sys/kernel/debug/gpio Jun 02 03:19:02 so I can check why show-pins is failing for you Jun 02 03:19:17 I found a pwm script for a .c file. It does not work like expected. Jun 02 03:19:19 Oh well. Jun 02 03:19:29 ok 1 sec installing pastebin Jun 02 03:19:45 Now, the gpio pins on the AI work promoting LED workings. Jun 02 03:19:49 er sec need to find what aptget for pastebin is Jun 02 03:19:56 apt-get install pastebinit Jun 02 03:20:17 same as the command name :P Jun 02 03:20:32 (as in, "pastebin it" without the space) Jun 02 03:21:21 er yah still not working tho Jun 02 03:21:35 ohhh right Jun 02 03:21:38 not bininit Jun 02 03:21:39 binit Jun 02 03:22:07 pasteb Jun 02 03:22:08 :P Jun 02 03:22:34 lol! :p Jun 02 03:23:28 https://pastebin.com/K3tCZyTr Jun 02 03:23:30 got it! Jun 02 03:23:39 ok i gotta go to the bathroom, 2 sec Jun 02 03:24:50 I just got what I did and what needs to happen. #define P9.14 (0x3400 + 4 * 107) needs to be addressed. Jun 02 03:25:10 This is so PWM can work on the AI. Yikes. Talk about a slow day. Jun 02 03:25:50 canbus: ok I see the problem Jun 02 03:25:57 set_: #define P9_14 not P9.14 Jun 02 03:26:06 Oh. Jun 02 03:26:09 Dang it. Jun 02 03:26:13 Okay. Jun 02 03:26:22 why are you typing over stuff like that instead of copy-pasting? :P Jun 02 03:26:49 B/c...I am old school, i.e. a.k.a Look and C & P. Jun 02 03:33:22 Heh? Jun 02 03:33:27 canbus: I've updated the bbai version of show-pins so hopefully it should work again Jun 02 03:39:27 ok sorry Jun 02 03:39:35 sorry? Jun 02 03:39:46 for taking a long time :) Jun 02 03:39:47 lol Jun 02 03:39:58 when nature calls. Jun 02 03:40:01 lol I don't care Jun 02 03:40:03 haha Jun 02 03:40:06 pwm duty? Jun 02 03:40:17 Sorry. Jun 02 03:41:04 wait what? you updated show-pins? Jun 02 03:41:18 that's what I said :P Jun 02 03:41:22 this is your utility!?!?! Jun 02 03:41:27 yes Jun 02 03:41:30 !!!!!!!! Jun 02 03:41:32 omg Jun 02 03:41:36 haha Jun 02 03:41:40 holy.. Jun 02 03:42:41 omg i am truely amazed Jun 02 03:43:10 https://pastebin.com/uwNEiar7 Jun 02 03:44:57 it's also funny, the device tree in that element14 "BBAI survival guide" article set_ linked, I recognize from the style and comments that I've written it as example for someone in the past Jun 02 03:45:14 uhhhh Jun 02 03:45:23 hahaha Jun 02 03:45:35 how did P9.26b end in mode 2 Jun 02 03:46:02 you know.... i am reallying thinking i'm going to post this can "guide" to stack overflow and basically the internet is just going to duplicate everything you have setup Jun 02 03:46:12 oh, a and b are swapped Jun 02 03:46:13 huh Jun 02 03:46:27 i will 100% mention your name on it for sure and link to this chat Jun 02 03:46:29 is that a bug in my spreadsheet or did I just fuck up Jun 02 03:46:42 er not mention... i mean say all of this is your brilliance Jun 02 03:46:44 I just fucked up Jun 02 03:47:02 kk time to test can Jun 02 03:47:15 it won't work Jun 02 03:47:25 !? Jun 02 03:47:27 no? Jun 02 03:47:43 did you not notice the all-uppercase INVALID in the show-pins output? :P Jun 02 03:47:58 and me saying 05:46 <@zmatt> I just fucked up Jun 02 03:48:02 is that a bug in show-pins i hope? Jun 02 03:48:06 not in actual Jun 02 03:48:10 no Jun 02 03:48:10 pretty please Jun 02 03:48:12 in the .dts Jun 02 03:48:18 crap! Jun 02 03:48:32 fixed I think Jun 02 03:48:44 the definitions of P9_26a and P9_26b were wrong Jun 02 03:48:51 oh Jun 02 03:48:55 what was wrong about them Jun 02 03:49:15 my eyes must have slipped while reading the spreadsheet and read the numbers for P9.26b and P9.27a instead Jun 02 03:49:44 oh they are backwards? Jun 02 03:50:01 no, shifted one line down in the table Jun 02 03:50:36 104 is P9.27a, not P9.26a Jun 02 03:50:52 oh yah i see Jun 02 03:50:57 P9.29a 182 fast down 14 gpio 4.11 Jun 02 03:51:17 ? Jun 02 03:51:39 anyway, I've updated https://pastebin.com/raw/qbEZXd3p Jun 02 03:52:00 I am using P9.14 and 16. Jun 02 03:52:02 wait what i dont get it Jun 02 03:52:08 For PWM! Jun 02 03:53:47 canbus: https://pastebin.com/2F2Tjxmv Jun 02 03:54:11 it'll be easier to see in show-pins if you pipe it through sort Jun 02 03:55:40 ohhh Jun 02 03:55:43 swapped ok Jun 02 03:55:52 not swapped Jun 02 03:55:55 er wll wrong val Jun 02 03:57:16 https://pastebin.com/DBqZbfb7 Jun 02 03:57:17 ! Jun 02 03:58:31 like I just said, it's easier to see if you pipe the output through sort ;) (sudo show-pins | sort | pastebinit -b pastebin.com) Jun 02 03:59:25 also your interface is still down Jun 02 03:59:30 but it already looks better Jun 02 04:01:39 god these defaults (of the remaining pins) make so little sense Jun 02 04:07:07 canbus: as a final suggestion I've replaced the contents of cape_pins_default by what's in the dts example in the element14 guide mentioned earlier, since I recognize that one as being one I've made for someone in the past as suggestion for sane defaults Jun 02 04:07:42 (except with different lines commented out of course) Jun 02 04:08:22 Hey! Jun 02 04:08:23 that will set pullup/down defaults to be more compatible with the BBB, configure gpio mode for all pins that have it and safe mode otherwise Jun 02 04:08:35 and enable input on gpios so you can actually use them :P Jun 02 04:11:34 oh was that in the latest>? Jun 02 04:11:41 i'm installing python and about to test Jun 02 04:12:40 uhh, 5 minutes ago Jun 02 04:12:48 oh yah Jun 02 04:13:02 sec lemme lok at diff Jun 02 04:13:56 this change is up to taste anyhow, it doesn't affect P9.24/26 but the remaining pins Jun 02 04:14:27 btw, now that you brought up the can interface, is show-pins showing the pins as being muxed to can? Jun 02 04:15:48 yes Jun 02 04:15:49 https://pastebin.com/DBqZbfb7 Jun 02 04:15:54 24 and 26a Jun 02 04:16:03 looking great man! Jun 02 04:16:35 just need to get them active and test these bad boys out i suppose Jun 02 04:16:52 no this is still showing "unused" (mode 15), which is the "sleep" pinmux state Jun 02 04:17:03 yah brining up now Jun 02 04:17:05 it should move to the "active" pinmux state when the interface goes up Jun 02 04:17:33 oh i can command it to test real quick. i was going to python it to do the same thing to test Jun 02 04:22:35 er shoot need to debug python a bit Jun 02 04:22:52 ok i can test the command line to make sure active is working anyhow Jun 02 04:24:31 wouldn't you normally do that anyway _before_ running any software that uses can? (typically by configuring your network manager to bring up the interface for you during boot) Jun 02 04:24:59 https://pastebin.com/Tx72A73P Jun 02 04:25:18 there ya go, "can 1 tx", "can 1 rx" Jun 02 04:25:27 yah i mean the python script i have turns it on, but it also shuts it back down when done Jun 02 04:25:38 so might as well just manually turn on so i can show-pins Jun 02 04:25:46 yah! active working Jun 02 04:25:48 you are the man! Jun 02 04:25:49 ew, but doesn't that mean it has to run as root? Jun 02 04:25:59 yah but just testing Jun 02 04:26:12 (or at least have CAP_NET_ADMIN) Jun 02 04:26:31 just simple tests at this point so no biggy Jun 02 04:26:36 ok Jun 02 04:27:14 man seriously you are amazing Jun 02 04:27:24 i seriously can't thank you so much for your time and help Jun 02 04:27:35 ***Bows down*** and worships!!!! Jun 02 04:27:37 :) :) Jun 02 04:27:38 easiest way to bring it up at boot would using /etc/network/interfaces (since I think ifupdown is installed and enabled by default). I personally use systemd-networkd (which also supports can afaik) instead of ifupdown and/or connman. Jun 02 04:29:11 yah setting up for boot is the easy stretch. you did all the hard work. I will try to betstow all of this information tomorrow into stack overflow for other people since there really are no resources out there for doing this on beaglebone ai Jun 02 04:29:14 at the moment Jun 02 04:29:33 hopefully this will get better... eventually... Jun 02 04:29:52 if you check the internet in about a month, there will be hopefully a million posts that are just copies of what you have done tongiht! hahahahaha Jun 02 04:31:37 OK thank you so much, seriously. ill get back at it tomorrow. I'm going to try to get back on this chat a bunch too because this community is awesome. hopefully, i can help other people in need to with what little knowledge i have & get better at the same time. Jun 02 04:32:17 c u later mr zmatt!!! one love! Jun 02 04:32:22 good luck! Jun 02 04:33:04 You? What about me? Jun 02 04:33:06 Ha. Jun 02 04:33:55 you too set_ you are awesome too! i hope you hit all 3 of the colors in your dreams hahahah! Jun 02 04:34:22 **bows down to set_** !!! :) Jun 02 04:42:23 I will try. Jun 02 04:42:39 Sleepster.io? Jun 02 04:43:27 Up, up, and Otay! Jun 02 10:09:42 test Jun 02 10:09:49 failed Jun 02 10:09:55 :( Jun 02 10:10:33 you know the "false" command, right Jun 02 10:10:52 the spec says it should "do nothing, unsuccessfully" Jun 02 14:44:23 where and when is used the symbol "_bss_start" from the linker script? Jun 02 14:44:57 kernel, u-boot, or what? Jun 02 14:46:16 a binary loaded from u-boot Jun 02 15:01:12 only the linker needs that symbol? Jun 02 15:01:28 inside that binary, somewhere in the assembler code that sets up the C runtime environemtn Jun 02 15:02:24 you'll find it involved in the equivalent of a memset(&_bss_start, 0, &_bss_end - &_bss_start); Jun 02 15:05:04 My uEnv.txt has no dtb specified that I can find. Does that mean it's not loading a dtb, or is there a default? My search foo has been lacking an answer. Jun 02 15:07:03 Ragnorok: if I'm not mistaken, the dtb name is constructed dynamically Jun 02 15:07:43 do a printenv dump and trace what 'bootcmd' does Jun 02 15:07:44 I thought it used uname -r to build a path, but the dtb itself was in uEnv. Jun 02 15:07:49 Roit toe. Jun 02 15:08:06 there's a command "findfdt" or "fdtname" or something in the u-boot env Jun 02 16:35:10 * jkridner can't find my mention in the scrollback, but will keep scrolling. Jun 02 16:35:41 zmatt: I thought we had sane BBAI defaults in u-boot. Jun 02 16:36:01 close to what is done for Robotics Cape. Jun 02 16:37:11 some of the gpio pins were set to avoid conflict where pins where shorted together. apparently the Off mode has a rather strong pull-up/down that could interfere with operation of the other signal. Jun 02 16:43:17 jkridner: is Rob still on the case for software .. I see he hasn't bumped uboot from 2019 release .. there's been 4 for 2020 already... Jun 02 16:43:56 usually he's pretty good Jun 02 16:44:24 I'll ping rcn-ee. Chatting w/ him on Slack now. Jun 02 17:10:39 what is the recommended JTAG probe for the BBB? Jun 02 17:10:44 veremitz: rcn-ee says it'll be updated for the August release. Jun 02 17:11:06 jkridner: cheers! :D Jun 02 17:11:18 CoffeeBreakfast: depends on what you want. XDS110 works fine. Lauterbach is really nice. Jun 02 17:11:35 I was going to say, lauterbach if you can afford it Jun 02 17:12:03 thankfully, you rarely need jtag these days Jun 02 17:13:43 I want to debug (and learn) a bare metal program Jun 02 17:20:47 XDS110 and the other one? Jun 02 19:03:32 I've managed to make my B'bone unbootable w/ my device tree. I'm at uBoot thinking I can make it load the original, but my search foo has been pretty horrid all day. Could someone toss me a clue? Jun 02 19:04:24 did you replace the devicetree it normally loads with a bad one? Jun 02 19:04:28 I did. Jun 02 19:04:32 and you still have the good one? Jun 02 19:04:36 I do. Jun 02 19:05:16 I pointed to the bad one in uEnv and kept the original thinking I could overide the file in uBoot. So far I haven't seen how. Jun 02 19:05:53 this is all on emmc, I guess Jun 02 19:05:57 Yup. Jun 02 19:06:14 you can fiddle with u-boot variables and commands to have it load the old one Jun 02 19:06:32 or you can boot from a uSD card and restore things Jun 02 19:08:25 I can reflash if that's what it takes. Maybe that is the simplest at this point, then undo the uEnv thing that makes that a flasher and use it to rescue. Jun 02 19:08:57 boot from sd card, mount the emmc, put the old dtb back, unmount Jun 02 19:11:08 This SD flashes directly w/o interaction. I know I can press the button to make it flash, but I don't see how to prevent it from flashing and boot normally if it's a flasher image. Jun 02 19:13:01 Maybe I'm mis-reading and the button does do that. I'll see what happens. Jun 02 19:13:30 the button probably changes the priority in the rom loader to favour the sd card over emmc Jun 02 19:17:27 someone help me install a linux due to the beaglebone from sd card Jun 02 22:11:13 lol... https://www.instagram.com/p/CA5loQBAX1o/ Jun 02 22:13:07 this is what you get if you force a python guy to code in c++ Jun 02 22:13:12 it's cruel... Jun 02 22:18:08 mru: that's exactly what it does, so really it's only useful when the u-boot on eMMC is incompatible with the linux system on sd card (or has a boot script that doesn't attempt to boot from sd card before eMMC) Jun 02 22:18:56 I'm not sure where this idea comes from that it triggers flashing, it has never worked like that afaik Jun 02 22:51:48 still, people are being told to press that button when flashing. Jun 02 22:52:16 it's part of the cult Jun 02 23:04:03 well yeah, because it's quite common when reflashing that the system on eMMC is ancient, so it's just to make sure it boots from sd card Jun 03 02:31:32 OK I was all on the C++ train but I have been reading Jun 03 02:31:51 and I guess it is really really hard to write effective C++ Jun 03 02:32:15 Also I should find a good code practice book Jun 03 02:32:24 looking for recommendations Jun 03 02:32:42 for i guess a c++ standard that makes you code like C Jun 03 02:32:54 or with discipline Jun 03 02:33:26 Oh! Jun 03 02:33:28 Oh! Jun 03 02:33:41 Me, me, me! Jun 03 02:33:45 Can I answer? Jun 03 02:34:24 Let me gather some requisites on literature. Jun 03 02:38:18 right now I am going to follow Google's C++ style guide Jun 03 02:38:25 unless there is a better suggestion Jun 03 02:38:36 Well, for C++, there are the regulars, i.e. "Programming: Principles and Practice using C++." Jun 03 02:38:51 That fellow that made the book made the language. Jun 03 02:39:19 I think in Bell Labs. Jun 03 02:39:35 Or was it Texas A&M. Oh well. Jun 03 02:39:58 Who knows? Anyway, I guess the book is neat, an easy read, and full of gotchas! Jun 03 02:42:10 Bell Labs unlikely more likely Texas A&M Jun 03 02:42:25 AT and T. Sorry. Jun 03 02:42:33 ATT. Jun 03 02:42:48 That sounds like a star wars weapon for some reason Jun 03 02:42:48 I get those locations confused to this day. Jun 03 02:42:54 Oh. Jun 03 02:43:12 GenTooMan: I know most people may not be happy to see you but I cannot see you. Jun 03 02:43:13 Ha. Jun 03 02:43:14 I think the funniest observation was "Why does the AT&T logo look like a death star?" Jun 03 02:43:31 Riddle me do? Jun 03 02:44:28 obviously you haven't seen the logo Jun 03 02:44:29 GenTooMan: I am currently working in the sysfs directory on the AI. Jun 03 02:44:39 NO, I have not seen it. NOt in many years. Jun 03 02:45:01 I am trying to get this bi-color LED working w/ pwm in .c files. Jun 03 02:45:11 Boo. I am such a lazy bass. Jun 03 02:45:15 I am currently making a simple process viewer using wxpython and python. Somehow things don't always go right. Jun 03 02:45:26 Right! Jun 03 02:45:31 wxpython on the BBB? Jun 03 02:45:38 Um no Jun 03 02:45:58 I know, tell me about it. I could not get that thing kickin' w/ the BBB and USB. Jun 03 02:46:07 IT was beating my bbb senseless. Jun 03 02:47:00 whats wxpython? Jun 03 02:47:03 I think my dtb file needs updating. Jun 03 02:47:06 backend! Jun 03 02:47:35 A very heavy backend from what I can tell. Jun 03 02:47:54 well, from the BBB view. Jun 03 02:48:25 wxpython is a wxwidgets Python library that implements much of the functionality in python. Jun 03 02:48:48 like a big cherrypy or a big microframework. Jun 03 02:50:13 MattB0ne: Do you know how to make a BBAI understand PWM for my precious LED project(s)? Jun 03 02:50:38 The AI seems to have two pwmchips but I only have one for now. Jun 03 02:50:55 no clue Jun 03 02:50:59 Dang. Jun 03 02:51:08 Okay. No issue. Jun 03 02:51:29 MattB0ne: Did you see that book I mentioned about c++? Jun 03 02:52:01 The fellow goes over I/O and mmap among other ideas. Jun 03 02:52:34 set_ you mean two pwm peripherals correct? Jun 03 02:52:59 chips, I am pretty sure. I have the peripherals set up already. I used npwm. Jun 03 02:53:08 It said two! Jun 03 02:54:10 blah. brb. **** ENDING LOGGING AT Wed Jun 03 02:59:57 2020