**** BEGIN LOGGING AT Sat Sep 28 02:59:59 2019 Sep 28 03:02:20 I think what needs to happen is that the src all goes in one function or I need to type up two different classes. Sep 28 03:02:42 But. I am most likely wrong. Do not fret. set is on the case. Sep 28 03:03:47 honestly you should probably have a separate route for each command... doing your own dispatching like you're doing right now is kinda redundantly doing the same thing as flask's routing, but less efficient Sep 28 03:03:59 Okay. Sep 28 03:04:27 Aw. I will keep reviewing Flask docs. Sep 28 03:06:35 what does your Boot.html look like? Sep 28 03:11:49 Please hold. Sep 28 03:11:52 I will show you. Sep 28 03:12:31 Dang it. My board died. Please hold. Sep 28 03:14:26 https://pastebin.com/Y5kc1BDX is the simple file from Prabakar's book. Sep 28 03:14:38 I need to find my file real quickly. Sep 28 03:19:04 https://pastebin.com/akSM1sgi I'm not sure I see the value of putting the last action in the title of the page, but I've just preserved that from your existing code Sep 28 03:21:46 Okay. Sep 28 03:21:48 Let me test it. Sep 28 03:22:11 I could not understand what you were describing earlier when you were describing this idea. Sep 28 03:22:24 obviously if you want a clickable link for your new "/distance" page then you need to add that link to your html Sep 28 03:22:25 I tested other ways of the two functions. Sep 28 03:22:32 Right. Sep 28 03:23:07 So, your source makes for two pages now or does it only make for the homepage .html file? Sep 28 03:23:47 I will just test it. Sep 28 03:23:50 Please hold. Sep 28 03:24:21 two pages? for what? why would I make another page? Sep 28 03:25:13 I was wondering if you had two pages for the three functions. That is all... Sep 28 03:25:15 I mean if you want /distance to render a different page then you obviously can, but I got the impression that was not desired Sep 28 03:25:23 right. Sep 28 03:25:24 It is not. Sep 28 03:29:39 where did you learn all that stuff? Sep 28 03:30:11 all what stuff? Sep 28 03:31:37 that source... Sep 28 03:31:53 How could you put something together that quickly? Sep 28 03:32:13 that little bit of refactoring? uhh, it's called "programming" Sep 28 03:32:19 dunno where I learned it Sep 28 03:32:22 :P Sep 28 03:32:25 Fine. Sep 28 03:33:04 You and I both do not know where you learned it but you know it. I will keep trying. Sheesh. Sep 28 03:36:34 https://pastebin.com/bkRaipsV are the errors i ran into. Sep 28 03:36:44 Let me try again. Sep 28 03:36:57 hmm Sep 28 03:37:00 maybe what I'm doing is not allowed Sep 28 03:37:07 weird Sep 28 03:37:09 Oh. Sep 28 03:37:14 Yep. Odd days. Sep 28 03:37:39 although I'm a bit confused about what flask is complaining about Sep 28 03:37:51 lemme google it Sep 28 03:37:51 assertion or something. Sep 28 03:37:57 Aw. I am doing the same. Sep 28 03:38:05 Hey, what are you going to google? Sep 28 03:39:33 oh ok, it's a flask quirk, lemme see how to work around it Sep 28 03:40:20 what I googled? uhh the error obviously Sep 28 03:40:47 I think there needs to be an @exception_handler in there. Sep 28 03:40:53 Do you want to see what I found? Sep 28 03:40:56 what? Sep 28 03:40:56 no Sep 28 03:41:00 Okay. Sep 28 03:42:41 try replacing @app.route( "/" + state ) on line 61 by: @app.route( "/" + state, endpoint=state ) Sep 28 03:43:34 I think something happened on my end. Sep 28 03:43:38 ? Sep 28 03:43:45 I need to go back to where you posted the link to the source. Sep 28 03:44:01 My dang BBBW keeps crashing. Sep 28 03:44:04 Please hold. Sep 28 03:44:06 https://pastebin.com/akSM1sgi Sep 28 03:44:16 crashing? wtf are you doing? Sep 28 03:44:28 Nothing. Sep 28 03:44:49 what do you mean by "crashing" ? Sep 28 03:44:49 It keeps saying on PuTTY that b/c of software, the connection has ended. Sep 28 03:45:01 I can sign in again, no issue. Sep 28 03:45:17 please don't try to paraphrase errors, always copy/paste them to pastebin Sep 28 03:46:45 Okay. Sep 28 03:47:25 I am back online and the software runs well but the ez2 does not stop the motors or at least the LEDs signaling that the motors have stopped are still lit. Sep 28 03:47:28 I should get some motors. Sep 28 03:47:52 I could have had something working the entire time and just messed up b/c of not having the motors attached. Sep 28 03:48:15 I just remembered that the PWM singals for the LEDs are for the LEDs. Sep 28 03:48:22 Sheesh. Sep 28 03:49:30 Oh...and about that last PuTTY connection issue. I tried to sign on and it was successful. The error was left behind. Sep 28 03:50:19 Hey. Sep 28 03:50:22 I think I know why. Sep 28 03:50:43 I forgot to use config-pin p9.22 uart when setting up after the failure and having to sign in again. Sep 28 03:52:14 I think the source is too complicated as is. I might have to bail. brb. Sep 28 03:53:05 Does this page stop supporting the older image? Should I update to the new image(s)? Sep 28 03:53:14 ?? Sep 28 03:53:50 Well. I saw online that beagleboard.org/latest-images had newer images. Sep 28 03:54:13 okay, so what? Sep 28 03:54:32 I doubt there's any change particularly relevant to you Sep 28 03:54:40 Okay. I did not know if the older images were obsolete or if I needed to update the image. Sep 28 03:54:41 Okay. Sep 28 03:54:59 You are right. I am just goofing to try new things in life. Sep 28 03:55:14 I am not making any money doing this (yet). Sep 28 03:55:39 I might be old and gray then but as long as I break even, I am good. Sep 28 03:57:12 Do you think that my LEDs on the MotorCape would stop being lit if the ez2 showed the stop on the source or would the LEDs be irrelevant and stay on? Sep 28 03:59:17 have you checked the log output of your service to see what distance it measured? Sep 28 04:00:36 (yes the leds should turn off) Sep 28 04:03:35 oh. Sep 28 04:03:44 No. I should check a log? Sep 28 04:03:47 Where? Sep 28 04:03:49 What log? Sep 28 04:04:18 the journal log of your service, come on this isn't the first time you've done that Sep 28 04:04:33 or, if you're running your application directly (as you should), simply its output Sep 28 04:04:42 I know but I figured there may be a running instance of this log somewhere. Sep 28 04:04:43 RIght. Sep 28 04:04:47 (by "as you should" I meant "as you should during development") Sep 28 04:04:52 That is where I was looking. Sep 28 04:05:01 No output. Sep 28 04:05:03 I have no idea what you mean by "a running instance of this log" Sep 28 04:05:23 Let me run the old source manually for the ez2. Sep 28 04:05:28 I can see if it is still working. Sep 28 04:05:56 That works. Sep 28 04:07:14 Do I need a "distance" button on my html src? Sep 28 04:08:14 if you want a button for it then yes Sep 28 04:08:42 Right but w/ that src you shared, I was thinking it needed it. No, I do not need it. Sep 28 04:09:16 the webpage is purely user interface, a way to more conveniently access the commands Sep 28 04:09:46 it could be a blank page. you'd just have to manually enter the URL for the command you want Sep 28 04:10:26 The board is up and running. I can show you the source of this .html file but it is just for an online button UI. Sep 28 04:10:40 I have no further need to see it Sep 28 04:10:45 Okay. Sep 28 04:12:22 Now, when I run the src, the log while the file is running is fine but does not show the height or beam activity from the ez2. Sep 28 04:16:40 I mean, you only perform a measurement when you perform a request to /distance Sep 28 04:18:23 So, in the source, distance under 8, which can be 8" right, is being called into action here. When anthing under 8" is noticed in the beam, the detection system goes off. Sep 28 04:18:45 This stops the motors. Sep 28 04:19:13 Oh. Sep 28 04:19:16 when you perform a request to /distance it performs a measurement and if it measures an object within 8 inches it stops the motors yes Sep 28 04:19:30 About the hardware... Sep 28 04:19:31 it also prints the measurement so you should be able to see what's going on Sep 28 04:19:36 Right. Sep 28 04:20:21 The motorCape needs vdd_5v going into the BBBW for communication and power. Sep 28 04:20:42 coming from the bbbw you mean? Sep 28 04:21:00 Right. Sep 28 04:21:01 Sorry. Sep 28 04:21:03 Aw. Sep 28 04:21:03 and it needs it just for the actual motor drivers, you don't need it as long as you're just using the leds as indicators Sep 28 04:21:05 Long day. Sep 28 04:21:06 iirc Sep 28 04:21:16 Okay. Sep 28 04:23:12 My LEDs do not turn off when the source is running nor does the log state anything like that my sensor, the ez2, has detected something. Sep 28 04:23:28 what do you mean by "when the source is running" Sep 28 04:23:39 I run the file from the command line. Sep 28 04:23:53 and then perform a request to /distance in your browser Sep 28 04:24:00 Oh! Sep 28 04:24:08 I did not understand. Sep 28 04:24:19 So, that is another page right? Sep 28 04:24:29 what do you mean by "page" Sep 28 04:25:00 I think this is why I was mistaken. Oh. page online, i.e. html page. Sep 28 04:25:37 it's a different url, it uses the same html page template as the previous 10 urls you already had Sep 28 04:26:01 So, I would type in /distance? Sep 28 04:26:02 Okay. Sep 28 04:26:18 yes Sep 28 04:26:35 I guess I am not understanding. So, the different url does not need another .html file? Sep 28 04:26:49 It just needs the source from the .py file? Sep 28 04:26:58 why would it need another .html file? Sep 28 04:27:18 when you so far you've been using the same html file for 10 different requests already Sep 28 04:27:40 I thought each page online needed more .html dedicated to them for it to run correctly. Sep 28 04:27:42 (/, /F, /L, /R, etc) Sep 28 04:27:48 Right. Sep 28 04:28:00 no, why would it? Sep 28 04:28:24 So, / and /F and /distance are all different locations on the html? Sep 28 04:28:31 Or on the .py? Sep 28 04:28:34 the html has nothing to do with anything Sep 28 04:28:38 Okay. Sep 28 04:28:41 Got it. Sep 28 04:28:55 This is why I think I coughed earlier. Sep 28 04:29:17 /F is a request path sent to your server, the flask router will find the appropriate route and call the corresponding function, it will then return a HTML page Sep 28 04:29:27 (after handling the command) Sep 28 04:29:33 Okay. Sep 28 04:29:42 in your case that HTML page is produced from a single template file Sep 28 04:30:08 replacing some title-variable in the template by a value provided by the script Sep 28 04:30:18 You rule! Sep 28 04:30:29 that's what the homepage function in my refactored version of the script does Sep 28 04:30:37 I am off to test. Please hold. This is so odd. Oh. Sep 28 04:31:25 (since everything seemed to be returning the same page, I just let all other handlers call homepage() instead of having the same code in multiple places) Sep 28 04:32:07 Okay. Sep 28 04:32:09 Nothing works. Sep 28 04:32:16 I was incorrect. Sep 28 04:33:12 So, I went to :port/distance. Sep 28 04:33:26 Nothing happened. Sep 28 04:33:40 I waved my hand numerous times, notta. Sep 28 04:33:45 Odd days. Sep 28 04:34:09 what do you mean by "nothing happened" ? blank page? no response from server? no errors in the log? Sep 28 04:34:35 Nothing. The server runs, everything is okay, and nothing happens. Sep 28 04:35:05 I can change the the LEDs by way of online buttons but I cannot stop the LEDs from being lit by way of waving in front of the ez2. Sep 28 04:35:44 what's the distance logged by the server when you perform the /distance request? Sep 28 04:36:04 You are right. I see it. Sep 28 04:36:10 60 Sep 28 04:36:24 and Sep 28 04:36:25 60 inches is more than 8 inches therefore the motors will not be stopped Sep 28 04:36:26 61 Sep 28 04:36:39 Right. I was waving my hand in front of the sensor. Sep 28 04:36:44 Two inches away. Sep 28 04:37:37 The set up of the BBBW, MotorCape, and ez2 are a foot away from me. It is easy to make sure the ez2 is accessible. Sep 28 04:37:39 make sure that there's nothing in front of the sensor the moment it powers on since that's when it performs calibration Sep 28 04:37:55 I recall the datasheet mentioning that Sep 28 04:38:12 Nope. I tested it w/ the source you provided that day. it works fine. Sep 28 04:38:23 I just tested it. Sep 28 04:38:30 In the last 15 minutes. Sep 28 04:39:41 Do you think that the server is in the way of the communication from the call of the ez2 to the am35x? Sep 28 04:39:56 ?? Sep 28 04:40:23 You had to name that "call" something in the source. Sep 28 04:40:55 you're holding your hand in front of the sensor while you're performing the request to /distance in the web browser yet it logs a distance of 60 inches? Sep 28 04:41:08 Odd? Sep 28 04:41:10 I know. Sep 28 04:41:12 Let me try again. Sep 28 04:41:13 can you double-check that? Sep 28 04:41:15 please do Sep 28 04:41:16 Sure. Sep 28 04:42:46 Yes. Sep 28 04:42:49 I am sure now. Sep 28 04:42:55 I type in /distance Sep 28 04:43:15 I wave my tiny hand in front of the ez2 Sep 28 04:43:34 it shows 60 or 61 inches and sometimes it shows nothing. Sep 28 04:43:45 what do you mean "it shows nothing" Sep 28 04:44:01 I must have waved my hand 15 times and it only shows 60 or 61 once. Sep 28 04:44:53 ehm, why exactly do you think it matters how often you wave your hand? how about just holding it still when it does the measurement Sep 28 04:45:12 (which is the moment you perform a request to /distance) Sep 28 04:45:25 It runs the measurement before I type in /distance. Sep 28 04:45:30 no it doesn't Sep 28 04:45:36 I am looking in my log. Sep 28 04:46:05 It shows that the ez2 took the detection before I typed in /distance. Sep 28 04:46:14 note that instead of typing it manually it's probably easier to add a link/button in your HTML Sep 28 04:46:21 same as for all the other commands Sep 28 04:46:26 That sounds better. Sep 28 04:46:34 I will do that really quick. Sep 28 04:49:09 I did not do it and I cannot figure out how to make a button right now. I am sorry. Sep 28 04:49:32 I understand, copy-pasting is hard Sep 28 04:49:38 Hahhaah. Sep 28 04:50:14 Hey. I am serious. Do I need to route my button to /distance by way of ="active"? Sep 28 04:50:25 ??? Sep 28 04:50:26 Never fret. Sep 28 04:50:29 I will do it. Sep 28 04:50:30 what? Sep 28 04:50:35 Please hold. Sep 28 04:50:35 what are you even talking about? Sep 28 04:50:39 I am sorry. Sep 28 04:50:53 you say such mysteriously bizarre things Sep 28 04:51:16 I know. I get these brain freezes and then blah happens. Sep 28 04:55:50 Okay. Sep 28 04:56:00 You win and I did not understand what you were describing to me. Sep 28 04:56:34 just add measure distance somewhere Sep 28 04:56:51 I hold my hand over the ez2, click the /distance button, and the power turns off. Sep 28 04:56:57 there we go Sep 28 04:57:01 so it does work Sep 28 04:57:01 Right. Sep 28 04:57:04 It works! Sep 28 04:57:57 Now, I need to figure out how to make it work like in any other circumstance. This will be the trick. Sep 28 04:58:05 Trickster at your service! Sep 28 04:58:24 in a flask app? you can't really, I already explained that earlier (or tried to anyway) Sep 28 04:58:33 Okay. Sep 28 04:58:35 No issue. Sep 28 04:58:52 I was wondering, "What in the hell is this person saying?" Sep 28 04:58:56 Now, I know. Sep 28 05:00:02 Well. Thank you thus far. I guess I will need another route of usage on this task. Off to find more things to do. Sep 28 05:00:14 ez2 and BBBW! Sep 28 05:04:58 How do I enable SPI on the latest debian IOT image? Sep 28 05:05:17 I've been trying to follow a bunch of guides but nothing seems to have worked Sep 28 05:05:20 should be enabled by default, you just need to configure the relevant pins using config-pin Sep 28 05:05:44 Where can I read about config-pin? Sep 28 05:05:48 (alternatively you can enable an overlay for it in /boot/uEnv.txt) Sep 28 05:06:04 not sure.. there's probably documentation somewhere (it's the config utility for "cape-universal") Sep 28 05:06:33 but it's basically just something like: config-pin P9_17 spi Sep 28 05:06:37 and similar for other pins Sep 28 05:06:50 (this configuration is not persistent across reboots) Sep 28 05:07:15 ah ok Sep 28 05:07:19 thanks for the tip Sep 28 05:07:29 alternatively the older method of using an overlay (e.g. the standard BB-SPIDEV0-00A0.dtbo) also still works, but you need to configure those in /boot/uEnv.txt Sep 28 05:08:30 into one of the uboot_overlay_addr4 .. uboot_overlay_addr7 variables or the dtb_overlay variable (doesn't matter which of those five you pick, they're equivalent) Sep 28 05:09:00 I tried editing /boot/uEnv.txt but it didn't seem to work. I must be not understanding something about the process Sep 28 05:09:13 Going to try config-pin now Sep 28 05:09:13 well what did you change there? Sep 28 05:12:42 I added 2 lines: Sep 28 05:12:42 uboot_overlay_addr4=/lib/firmware/BB-SPIDEV0-00A0.dtbo Sep 28 05:12:53 that definitely should have worked Sep 28 05:13:02 uboot_overlay_addr5=/lib/firmware/BB-SPIDEV1-00A0.dtbo Sep 28 05:13:31 wait, just to confirm, what hardware are you using? Sep 28 05:13:43 (as in, which beaglebone variant) Sep 28 05:13:57 beaglebone black wireless Sep 28 05:14:01 ok Sep 28 05:14:06 ``` Sep 28 05:14:11 debian@beaglebone:~$ cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups | grep spi Sep 28 05:14:12 group: pinmux_P9_19_spi_cs_pin Sep 28 05:14:13 group: pinmux_P9_20_spi_cs_pin Sep 28 05:14:29 This is all I see when looking at the pingroups Sep 28 05:14:29 I have a utility to double-check pinmux setup in a more convenient way than manually digging through debugfs: https://github.com/mvduin/bbb-pin-utils/#show-pins Sep 28 05:15:48 Ah Sep 28 05:15:49 I don't immediately remember what "pingroups" is or does Sep 28 05:15:53 my script doesn't seem to use it Sep 28 05:16:30 * desttinghim[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/kkFqcIiOeBaEvJpHDASEMbdM > Sep 28 05:16:44 Ok, looks like the spi is working Sep 28 05:16:54 looks like it isn't Sep 28 05:16:55 At least for your script Sep 28 05:16:57 weird Sep 28 05:17:11 wait, are you booting from eMMC or SD ? Sep 28 05:17:24 SD Sep 28 05:17:33 ah bingo, and you have an ancient bootloader on eMMC Sep 28 05:17:41 which doesn't understand modern /boot/uEnv.txt settings Sep 28 05:18:15 Is there a way to flash it? Sep 28 05:18:32 That was in the getting started material wasn't it? Sep 28 05:18:35 yeah you can download a flasher image or convert your existing image into one by uncommenting the appropriate line in /boot/uEnv.txt Sep 28 05:19:09 iirc it's the last line, something with "eMMC-flasher" in it Sep 28 05:19:54 with that change, when you reboot it'll start flashing eMMC Sep 28 05:20:19 (this has a recognizable back-and-forth ("cylon" / "knight rider") led pattern) Sep 28 05:20:46 when it's done it'll turn itself off. don't forget to remove the sd card before powering it back on, otherwise it would start to reflash again Sep 28 05:21:27 Ok, I'll give it a try. Thanks a bunch! Sep 28 05:22:01 btw as for your misinterpretation of my show-pins script: the leftmost column is purely a static description of the line, i.e. it's just indicating those pins are the ones used for spi boot when spi boot is used. the current mode is on the right side. (the explanation of the columns is in the README) Sep 28 05:22:35 I guess it would be a good idea to read the README :P Sep 28 05:23:01 :) Sep 28 05:23:08 anyone run AWS greengrass on a Beagle? I've got it half working Sep 28 05:23:17 yes Sep 28 05:23:38 jkridner[m], was that a yes to my question Sep 28 05:23:44 or the other question Sep 28 05:23:51 mrpackethead: yes Sep 28 05:24:08 I've run greengrass as have some Amazon folks, even on BeagleBone AI. Sep 28 05:24:32 At some point, I'll get around to filling out all of the marketing stuff needed to get it on their site. Sep 28 05:24:43 I worked through the tutorial, and the lambda runs, but ( i'm using beaglegreen but thats becuase i had one ) Sep 28 05:24:45 zmatt, I'm trying to get a adafruit 1.8" spi display working, as in this tutorial http://beagleboard.net/project/fbtft-linux-44-kernel/ Sep 28 05:25:12 desttinghim[m]: then you actually don't want to use an SPIDEV overlay Sep 28 05:25:26 Do I need to actually build the kernel to get this working? Sep 28 05:25:26 What i'm not getting, is MQTT being sent from the beagle back to AWS Sep 28 05:25:44 I'm kind of feeling like the tutorial is only telling me half the story Sep 28 05:25:45 desttinghim[m]: dunno, that depends on whether the drivers you want are already in the kernel config, check /boot/config-$(uname -r) Sep 28 05:26:11 Once the emmc is finished flashing Sep 28 05:26:51 CONFIG_FB_TFT_FBTFT_DEVICE=m Sep 28 05:27:42 The display uses a ST7735 as it's driver Sep 28 05:27:45 [2019-09-28T05:27:07.366Z][DEBUG]-Failed to get routes. Discarding message. {"src": "arn:aws:lambda:ap-southeast-2:160165******:function:greengrasshello:4", "subject": "hello/world"} Sep 28 05:28:34 desttinghim[m]: looks like the drivers are already compiled as modules, so you need to compile anything yourself Sep 28 05:28:42 *no need Sep 28 05:28:47 typing is hard evidently Sep 28 05:29:36 I'm puzzled by why this guide loads the BB-SPIDEV1 overlay, since I'd expect that to conflict with loading the fbtft driver Sep 28 05:31:06 A couple of other guides do it this way too Sep 28 05:31:06 I'd also be inclined to make an overlay for this rather than using module parameters Sep 28 05:33:55 Do you think this guide would work? https://elinux.org/Fbtft_with_Beaglebone_Black Sep 28 05:34:01 but you can just try following procedure first (even though it seems weird to have two drivers attached to one spi device) Sep 28 05:34:13 note I'm not saying the guide you linked doesn't work Sep 28 05:34:55 I'll report back if it does then Sep 28 05:35:22 using an overlay that enables just the bus seems sensible yes Sep 28 05:35:58 oh, but that would require disabling cape-universal -.- so you might as well first try to see if it works anyway Sep 28 05:36:19 (this is the reason it would require disabling cape-universal: https://github.com/mvduin/overlay-utils/blob/master/spi0.dtsi#L11-L16 ) Sep 28 05:37:42 I guess you could set the compatible="nonexistent-driver"; but that's not going to win any prize for elegance either Sep 28 05:39:11 a proper overlay for the panel would be best Sep 28 05:43:53 Looks like the pins are configured to spi now! Sep 28 05:47:07 I'm working on an overlay showing how I think it can be entirely configured via DT Sep 28 05:52:54 Alright, the first guide doesn't seem to have worked Sep 28 05:53:19 Going to try plugging the display into the other SPI pins Sep 28 05:55:09 checked kernel log for errors? Sep 28 05:56:46 that would have been a good idea if I had thought of it at the time Sep 28 05:57:29 I'm a little new to working with embedded linux if you couldn't tell Sep 28 05:57:29 I'm a little new to working with embedded linux if you couldn't tell :p Sep 28 05:58:04 :) Sep 28 05:58:53 Well changing SPI's did it! Sep 28 05:58:57 Woohoo! Sep 28 05:59:43 Course, it's a little small for displaying tty Sep 28 06:00:22 which spi device did you try first? Sep 28 06:00:32 spi1 requires disabling hdmi-audio Sep 28 06:00:39 (due to pin conflict) Sep 28 06:00:48 the hdmi 1 Sep 28 06:01:11 I spent quite a while trying to go through tutorials before coming here though Sep 28 06:01:21 I had started with the other SPI Sep 28 06:04:06 Now I can finally close all these tabs :D Sep 28 06:04:11 I think I'm almost done with my overlay Sep 28 06:10:42 desttinghim[m]: if you clone https://github.com/mvduin/overlay-utils , do "make fbtft-adafruit18.dtbo", optionally copy that to /lib/firmware, and configure the patch in /boot/uEnv.txt (instead of any SPIDEV) then it might work directly from boot! :D either that or your system may fail to boot entirely :D Sep 28 06:11:10 I've used the same choice of gpios as the guide you linked Sep 28 06:11:28 zmatt: Sounds good, I'll give it a try Sep 28 06:15:41 unfortunately boot failure is the typical way in which u-boot indicates failure to apply an overlay -.- Sep 28 06:15:51 oh wait, I spot a typo Sep 28 06:15:56 All the LEDs staying solid means we got the fail to boot doesn't it Sep 28 06:16:00 ah Sep 28 06:16:04 sorry :/ Sep 28 06:16:27 may want to keep a bootable sd card handy when messing with overlays I guess Sep 28 06:16:29 No problem Sep 28 06:16:43 I have the sd card still handy Sep 28 06:16:51 just had to change the one line in the flasher Sep 28 06:16:59 yeah but that's still a flasher Sep 28 06:17:05 *to keep it from flashing on boot Sep 28 06:17:06 ah if you have a linux host where you can fix that line Sep 28 06:17:07 yeah Sep 28 06:17:43 I use linux for my day-to-day computing Sep 28 06:18:10 typo fixed, committed and pushed Sep 28 06:18:27 so that's another annoying thing about overlays: dtc can't complain about undefined references Sep 28 06:18:34 so it won't catch typos generally Sep 28 06:18:54 (since any undefined reference is assumed to reference a node in the base DT) Sep 28 06:19:22 Yeah, that's sucky Sep 28 06:19:55 Now I've got to figure out how to mount the eMMC so I can fix that without reflashing Sep 28 06:19:55 and when u-boot discovers the undefined reference, it just prints a (generally unintelligible) error and fails Sep 28 06:20:09 eMMC is /dev/mmcblk1p1 Sep 28 06:20:53 so just (as root) mkdir -p /mnt/tmp && mount /dev/mmcblk1p1 /mnt/tmp && vi /mnt/tmp/boot/uEnv.txt && umount /mnt/tmp && sync Sep 28 06:20:54 thanks Sep 28 06:21:51 sorry I need to remind myself you're just new to embedded linux, not to linux in general... I do get a fair share of windows users here Sep 28 06:24:55 I just built the new version of the .dtbo and replaced the old one Sep 28 06:25:01 Works like a charm! Sep 28 06:25:20 like... it worked on the first try? Sep 28 06:25:22 that's scary Sep 28 06:25:30 (ignoring the typo :P ) Sep 28 06:25:38 yes Sep 28 06:26:01 It is a little scary Sep 28 06:26:33 I'm going to have to figure out how device trees work better. So far they look like a pain to read and write Sep 28 06:27:23 they're not that bad... but it can be annoying to figure out what properties a driver expects when the devicetree binding documentation is missing, incomplete, or out of touch with reality Sep 28 06:27:39 I have some notes here => https://pastebin.com/XC8vB33d Sep 28 06:29:37 note that overlays normally require a specific (rather ugly) structure, which you'll see e.g. if you examine the ones in bb.org-overlays, whereas my overlay-utils hides that by preprocessing using a perl script (I really don't understand why dtc doesn't do that job for us).. if you're curious about the details: https://pastebin.com/b8kZfhRG Sep 28 06:30:33 (my perl script does require the input to be at least somewhat sanely indented since it doesn't attempt to fully parse DT source) Sep 28 06:32:52 cool Sep 28 06:33:01 You seem like you know a lot Sep 28 06:33:15 Are you a part of the beaglebone org? Sep 28 06:34:02 nope, just a beaglebone user Sep 28 06:34:27 (for work) Sep 28 06:39:28 The world's a more awesome place with people like you! thanks for the help Sep 28 06:39:54 :D Sep 28 06:40:14 neat, I just learned that python 3.6 introduced "formatted string literals" Sep 28 06:40:21 ~$ python3 -c 'foo = 42; print( f"foo = {foo} ({foo:#x})" )' Sep 28 06:40:21 foo = 42 (0x2a) Sep 28 06:44:23 Oh cool. Reminds of string interpolation in haxe Sep 28 06:44:36 https://haxe.org/manual/lf-string-interpolation.html Sep 28 06:45:09 lol, it does have random silly limitations, like it fails on f"{"foo"}", f'{"\n"}', and f'{{}.keys()}' (because {{ is an escaped {) ... the equivalents in perl and javascript all work fine :P Sep 28 06:45:44 supporting format specifiers is unique and neat though Sep 28 06:46:15 never heard of haxe before, but string interpolation is in many languages Sep 28 06:46:17 Yeah, I don't think I've really seen that before Sep 28 06:47:11 haxe started as a faster actionscript compiler and then expanded to compiling to other languages (like javascript) Sep 28 06:47:35 It mostly gets used in game development Sep 28 06:47:47 Kind of niche though Sep 28 06:48:35 yeah the only thing I can think of that comes close to being able to give format specifiers in interpolation is parameter expansion in bash, which doesn't support formatting specifiers per se but it does support some other manipulations like substrings ("${var:2:10}") and casting to upper/lowercase (${var^^}, ${var,,}) Sep 28 06:52:46 unfortunately I'm still trying to retain python 3.5-compatibility in my only python project ( https://github.com/mvduin/py-uio ), so no f-strings for me yet :P Sep 28 06:55:51 how unfortunate :p Sep 28 06:57:13 Alright, now to figure out how to output a GTK app to a framebuffer Sep 28 06:57:24 hah Sep 28 06:58:36 qt has a linuxfb backend, dunno about gtk Sep 28 06:59:53 horrah! found the missing link Sep 28 06:59:56 Supposedly one exists, not sure how well supported or up to date it is Sep 28 07:00:02 the AWS tutorial was broke. Sep 28 07:15:20 bbl Sep 28 08:14:42 jkridner, did you get as afar as writing and debugging lambdas to run Sep 28 11:36:41 are the serialdebug pins exposed in the gpioheader also? i dont have a cable that can fit the new serial debug connection Sep 28 11:38:40 nope Sep 28 11:39:11 ok thanks Sep 28 11:52:11 whats the best site to dump image files for linking here? Sep 28 11:58:54 this is the backside of the serial connector on my AI that was overheating and currently will not boot (i am going to flash another SD card with 9.9 and confirm that the boot issue isnt just corrupt emmc) Sep 28 11:58:57 https://drive.google.com/file/d/1s9cWj0-nxSrfOkkfY5kW6mqosIldNNKS/view?usp=sharing Sep 28 11:59:24 https://drive.google.com/file/d/19pRcHcP9APTcQ6nWiU708ca8ID9PtNXH/view?usp=sharing Sep 28 12:02:04 its not a direct short, i read a high resistance between the two pins (99kOhm) Sep 28 12:13:10 mrpackethead: I did not Sep 28 12:13:21 I just ran the test suite. Sep 28 12:41:28 yay! my AI board is now booting from SDcard. My previous attempt I mistakenly downloaded the IoT image but didn't realize that wasnt compatible with the AI Sep 28 13:35:06 smbrandonjr: Oooo, that's a good tip, is that clearly noted on the page with the image downloads? Sep 28 14:06:53 yes the page specifies what image is compatible with the AI, i just overlooked it Sep 28 14:08:16 the excitement of new toys! Sep 28 14:09:13 Oooh, huh, when I google "beaglebone" it takes me to https://beagleboard.org/bone which hasn't been updated to list the AI yet. Gotta go back to the homepage to find that. Sep 28 14:20:48 myself: what are you looking for? this? https://beagleboard.org/latest-images Sep 28 14:21:27 no, I was looking for pricing and availability. Best resource for that is still https://octopart.com/bbone-ai-beagleboard-104819291 Sep 28 14:24:40 oh got ya...i ordered from mouser Sep 28 14:25:01 https://beagleboard.org/ai Sep 28 19:11:40 https://pastebin.com/Ck1PkN5V are some odd errors from last night. Sep 28 19:17:07 If you know about /var/mail/xxxxxx, please let me know something. Sep 28 19:17:22 Those files are empty. Sep 28 19:20:52 Okay, Okay. Forget it. The file was not working b/c I was in my env. Sep 28 19:22:11 set_: if looks like you're trying to execute a python script that lacks a shebang (#!/usr/bin/oython3 or whatever), causing the shell to attempt to execute your script as a shell script, which is a big pile of a syntax errors Sep 28 19:22:25 Oh. Sep 28 19:22:26 Okay. Sep 28 19:22:28 Yikes. Sep 28 19:22:31 You are right. Sep 28 19:22:33 Sheesh. Sep 28 19:22:56 and the "from" command is something mail-related, hence the weird messages Sep 28 19:23:05 aw. Okay. Sep 28 19:23:12 I was unaware of that idea. Sep 28 19:24:08 so either add a shebang to the top of your script, or execute it like "python3 MotoCape.py" Sep 28 19:24:26 Okay. Got it. Sep 28 19:24:33 Sorry to bother you. Sep 28 19:26:14 lookign for some advise. which python librarys to use with Groove sensors. Sep 28 19:26:23 i've found the adafruit and they grey cat ones. Sep 28 19:26:42 wondering if anyone has had any sucsss/fail and can share their experience Sep 28 19:26:48 GPS? Sep 28 19:27:58 mrpackethead2: I have used uart2 from the BBBW/BBB w/ the GPS Grove connection. Oh and the Grove people made some wires w/ the connections for the BBBlue to Grove connections. Sep 28 19:28:33 I got an IOT dev kit. it came with a bunch of differnet groove sensors Sep 28 19:28:40 Oh. Sep 28 19:28:41 Yea. Sep 28 19:29:31 That thing is difficult. I saw some people w/ their SeeedStudio ideas on Hackster.io I think. They have some tutorials, too. Sep 28 19:29:46 But...I knew less when I purchased that thing years back. Sep 28 19:30:01 Let me get the link. Sep 28 19:30:19 I have got it intrfaced to Amazon GreenGrass ok now Sep 28 19:30:28 now to get some sensors going Sep 28 19:30:55 https://project.seeedstudio.com/ Sep 28 19:31:18 I found that earlier. There are some articles based on the BBB or related boards. Sep 28 19:31:32 I will get that exact link. Sep 28 19:33:21 https://project.seeedstudio.com/search?q=BeagleBoard.org&i=projects. They got all sorts of people posting projects and having prize stuff (at times). Anyway. Sep 28 19:33:22 ... Sep 28 19:33:30 I have not used Amazon stuff yet. Sep 28 19:34:31 Actually, I tested the Amazon stuff when it first came out years ago. They, the amazon.com people, were new and just getting up and going online w/ their "Cloud Service." Sep 28 19:41:19 set, greengrass works nicely.. but as normal AWS docs are pretty hard to follow Sep 28 19:45:18 Nice. Sep 28 19:45:22 I saw it online just now. Sep 28 19:45:33 Oh well. Seems a bit too involved for me. Sep 28 19:46:56 Greengrass is good for mananging a large fleet of devices Sep 28 19:47:01 Aw. Sep 28 19:47:14 can easily push out lambda code to devices as needed. Sep 28 19:47:44 So, Xbee would be a good way of connecting? Sep 28 19:48:28 xbee won't get you direclty attached Sep 28 19:48:38 Oh. Okay. Sep 28 19:49:15 But...there are xbee modules for the BBB via Capes and Grove connectors. Sep 28 19:49:50 oh yes. Sep 28 19:49:59 Yep. Sep 28 19:50:44 Hey...did you get to look at the tutorials for the AWS Grove box stuff? Sep 28 19:50:49 On that link I provided? Sep 28 19:53:04 One dude/lady put together a sprinkler system w/ the BBGW and some other sensors/actuators. Sep 28 19:53:27 Let me see if I can find it. It seemed very well put together. Sep 28 19:54:10 https://project.seeedstudio.com/Greg-R/beaglebone-green-wireless-irrigation-control-ce7c4b <<--- This one! Sep 28 19:54:30 I was going to mimic it but then found the source to be over my head. Sep 28 19:59:34 that irrigation poject is written in node.js and i'm wanting to stick with python Sep 28 20:01:38 Oh. Sep 28 20:01:40 Okay. Sep 28 20:01:49 Yea. it is still a really nice project. Sep 28 20:02:14 node.js is interesting and it is good w/ bonescript. Sep 28 20:02:27 I like python too but I am still just learning stuff. Sep 28 20:02:56 So, have you found their Wiki of BBB capable grove connectors yet? Sep 28 20:03:49 http://wiki.seeedstudio.com/BeagleBone/ Sep 28 20:04:10 I dislike python and nodejs in different ways I think :P Sep 28 20:04:17 You can use that link for sensors/actuators in the grove family. Sep 28 20:05:50 I found it again: http://wiki.seeedstudio.com/Beagle_Bone_Green_and_Grove_IoT_Starter_Kit_Powered_by_AWS/. Sep 28 20:06:09 They have a Python script in that last link you may find interesting. Sep 28 20:08:03 at least modern javascript ('use strict';) has mandatory variable declarations, although it still can't detect typos in identifiers at compile-time (but python sometimes even fails to detect them at runtime :P ) Sep 28 20:11:07 (and, provided you use 'let' or 'const' instead of 'var'. they're block scoped... although scoping is still weird, with hoisting and the "temporal dead zone" ... the syntax and semantics of javascript are just ugly as fuck) Sep 28 21:30:25 set, its all using python 2.7 :-( Sep 28 21:34:03 lol Sep 28 21:44:14 can't use 2.7 anymore Sep 28 21:44:23 outlawed Sep 28 21:44:27 indeed **** BEGIN LOGGING AT Sat Sep 28 22:08:02 2019 **** BEGIN LOGGING AT Sat Sep 28 22:11:35 2019 **** BEGIN LOGGING AT Sat Sep 28 22:38:09 2019 Sep 28 22:38:32 well, i got smbus2 installed Sep 28 22:38:52 trying to scan the bus now Sep 28 22:39:00 you can't scan i2c Sep 28 22:39:05 i2c is not a discoverable bus Sep 28 22:39:15 sure you can Sep 28 22:39:25 you just need to interate through all the address's Sep 28 22:39:41 and send a random request to them that may have unpredictable consequences on the device Sep 28 22:40:28 and it doesn't tell you anything other than that the address is in use by something Sep 28 22:40:41 and that would be what i want to know right now Sep 28 22:40:59 Just an I2C ACK would be a good start Sep 28 22:41:01 :-) Sep 28 22:41:24 scan perhaps is not the 'ideal' name Sep 28 22:42:14 the situation is well-illustrated by i2cdetect's detection of the two types of query you can use to try to detect devices: Sep 28 22:42:27 " -q Use SMBus "quick write" command for probing. Not recommended. This is known to corrupt the Atmel AT24RF08 EEPROM found on many IBM Thinkpad laptops." Sep 28 22:42:39 " -r Use SMBus "receive byte" command for probing. Not recommended. This is known to lock SMBus on various write-only chips (most notably clock chips at address 0x69)." Sep 28 22:43:46 by default it'll pick for each address one of these two options that it believes to be the safest.... how comforting :P Sep 28 22:47:35 well right now i2cdetect is not seeing anything Sep 28 22:47:37 gm Sep 28 22:47:45 :D Sep 28 22:47:50 anything in kernel log? Sep 28 22:49:11 wheres the kernel log normally Sep 28 22:49:33 journalctl -k -b Sep 28 22:49:41 is one option Sep 28 22:50:17 or "dmesg" (but this requires root privileges by default in debian) Sep 28 22:50:43 or it may be written to some legacy logfile in /var/log by your syslogd if one is running Sep 28 22:52:58 Sep 28 22:52:36 beaglebone kernel: omap_i2c 4802a000.i2c: timeout waiting for bus ready Sep 28 22:52:58 Sep 28 22:52:37 beaglebone kernel: omap_i2c 4802a000.i2c: timeout waiting for bus ready Sep 28 22:55:07 verify pinmux, make sure there are pull-ups Sep 28 22:55:25 (external pull-ups, the internal ones should not be considered adequate) Sep 28 23:05:56 the module has 10k pullups Sep 28 23:06:18 then check connectivity and pinmux Sep 28 23:06:38 timeout waiting for bus ready means the i2c controller is seeing SCL being continuously low **** BEGIN LOGGING AT Sat Sep 28 23:14:11 2019 **** BEGIN LOGGING AT Sat Sep 28 23:23:35 2019 Sep 28 23:24:59 since i'm using the console version i wonder if this has not been set up **** BEGIN LOGGING AT Sat Sep 28 23:28:50 2019 Sep 28 23:32:35 zmatt. pinmux it was. Sep 28 23:37:59 how do you configure the pinmux to survive a reboot Sep 28 23:53:18 make a bash script. Sep 28 23:53:36 and a service. Sep 28 23:53:38 I think. Sep 28 23:53:40 Let me check. Sep 28 23:56:01 https://github.com/adafruit/adafruit-beaglebone-io-python/blob/master/test/notes/run_config-pin_during_startup.md Sep 28 23:56:11 mrpackethead: Look at that link. Sep 28 23:56:18 It should round off any ideas. Sep 28 23:58:47 happy happy Sep 28 23:58:49 :-)\ Sep 28 23:59:03 got the i2c running Sep 28 23:59:04 :-) Sep 29 00:02:21 Nice. Sep 29 00:04:18 I am sure there are other ways. I am just used to making scripts and services. Sep 29 00:06:49 mrpackethead: Have you looked at the TI.com stuff for their config-pin utility? I have not. I am about to go and gather some ideas. Sep 29 00:08:28 http://www.ti.com/tool/PINMUXTOOL is a bunch of work. I might stick w/ the script/service. Sep 29 00:17:00 thanks. Sep 29 00:45:50 Yep! Sep 29 01:36:43 yes, the script works well Sep 29 01:36:48 and will be just fine./ Sep 29 01:43:52 Yea boy! Sep 29 01:54:30 ti pinmux tool is not convenient if you just want to reconfigure some pins on the bbb, it's more for custom designs Sep 29 01:54:42 on the bbb you typically use config-pin or an overlay Sep 29 01:56:55 mrpackethead: and for checking pinmux you may like my show-pins utility: https://github.com/mvduin/bbb-pin-utils/#show-pins Sep 29 01:58:34 mrpackethead: and yeah, you either need to use config-pin in a startup service, have your application do it (by writing the appropriate sysfs attributes, same as what config-pin does, which is just a shell script btw), or you can use an overlay, which is configured in /boot/uEnv.txt and applied by the kernel during early initialization Sep 29 01:59:52 all good now, i've got it in a script Sep 29 02:00:12 uses config-pin Sep 29 02:00:26 now able to talk to my i2c Devices Sep 29 02:00:39 yeah I'm just giving the optoins Sep 29 02:00:40 *options Sep 29 02:00:47 thanks, appreicated. Sep 29 02:01:14 debian@beaglebone:~/i2c$ sudo python HP206C.py Sep 29 02:01:14 [sudo] password for debian: Sep 29 02:01:14 Pressure: 1010.53 hPa Sep 29 02:01:15 Temp: 19.67 C Sep 29 02:01:27 the pressure is dropping here. Sep 29 02:01:28 :-) Sep 29 02:01:40 No! Sep 29 02:02:07 No pressure :) Sep 29 02:02:31 Hey. I have been learning civil engineering in C++ source. My head is losing pressure. And yes, no pressure. ! Sep 29 02:02:56 I have a titsy for you all. Please hold. Sep 29 02:05:40 https://pastebin.com/E51rJ7Xi is the idea so far. Sep 29 02:05:46 Wait for my source. Sep 29 02:07:20 set i have pressure here Sep 29 02:07:30 Nice! Sep 29 02:07:40 Bronson? I hear he is a tough guy Sep 29 02:07:42 1010.29 hPa but droppign quickly Sep 29 02:07:44 :-) Sep 29 02:07:45 https://pastebin.com/vits4uya is the source. Sep 29 02:07:48 No Charles. Sep 29 02:07:58 mrpackethead: Are you flying? Sep 29 02:08:12 set_ only in my dreams Sep 29 02:08:13 :-) Sep 29 02:08:15 Oh. Sep 29 02:08:16 Nice. Sep 29 02:08:35 Ive got an HP206C sensor attached to the beaglebone Sep 29 02:08:45 Extra nice! Sep 29 02:08:58 Off to look up that sensor. Sep 29 02:09:02 amazingly robust and accurate sensor Sep 29 02:09:14 does temp and pressure Sep 29 02:09:26 Right. Barometer! Sep 29 02:09:43 and a weird alitimeter thing Sep 29 02:09:50 but thats a bit not right Sep 29 02:09:51 :-) Sep 29 02:09:54 For altitude, right. Sep 29 02:10:10 they use pressure + temp to make a guess at altiude Sep 29 02:10:15 Oh. Sep 29 02:10:29 I wonder how that math looks. Sep 29 02:10:34 "propritory math" Sep 29 02:10:38 Ha. Sep 29 02:11:06 Next challenge is to figure out how to debug a greengrass lambda Sep 29 02:11:14 Ut oh. Sep 29 02:11:16 AWS does not probide much guidence Sep 29 02:11:34 I say w/ guidance but I cannot provide any. I am a layman on AWS these days. Sep 29 02:12:05 Im certified at the Archtiect Professional level, and i dont know Sep 29 02:12:06 doh! Sep 29 02:12:33 C-o-r-E: Gary J. Bronson. Sep 29 02:12:58 He types up books and teaches. Sep 29 02:13:31 He recently acquired his Phd. Sep 29 02:13:45 'aquired' Sep 29 02:13:51 makes it sound like you can buy one Sep 29 02:13:54 I guess he doesnt have a death wish then Sep 29 02:13:58 Right. Sep 29 02:14:10 No death wish but a teaching wish, I guess. Sep 29 02:14:43 I think those things are way to stressful. I would not put myself through it. Sep 29 02:15:07 School is stressful, i.e. outside of having to have a high GPA. Sep 29 02:15:30 i only could go as far as a Masters then i had enough. Sep 29 02:15:54 See. I could not handle it. Too much money and too much stress. Sep 29 02:16:11 I did not even look to the next level. Yep! Sep 29 02:18:54 Did you all see the C++ stuff from that second paste? Sep 29 02:19:06 Am I incorrect or should I go and look at my work? Sep 29 02:20:11 Just for reference, I am using the set up on the BBBW for compilation. g++ Sep 29 02:21:14 I know. Both. I better review it. Sep 29 02:30:13 The only reason I think I am incorrect is b/c of c = 6 in the source. Sep 29 02:30:33 They say c = 1/2 the height. It could be c = 3. I am not sure. Sep 29 02:33:24 0.94? Who knows...I will look at the end of the book for answers one day. Sep 29 02:33:39 Anyway. It is an informative read so far. Sep 29 02:44:06 Forget it. I just figured out that it is not e4 but "to the fourth power." Sep 29 02:44:07 Sheesh. Sep 29 02:44:14 Blah! **** ENDING LOGGING AT Sun Sep 29 02:59:57 2019