**** BEGIN LOGGING AT Tue Jun 28 02:59:58 2016 Jun 28 03:03:11 howdy folks! im having a hell of a time getting GPIO pins to work properly on my beaglebone green Jun 28 03:03:21 when using an output (LED) it stays on always Jun 28 03:03:47 when using an input button it goes to low, but then stays at high as soon as i hit the button Jun 28 03:04:00 ive tried configuring things with device tree overlays but still no luck Jun 28 03:04:19 im able to get the pins to show up in sysfs as expected too Jun 28 03:06:58 any ideas on basics to check on? voltages? Jun 28 03:07:04 im using a the grove cape v2 Jun 28 03:07:22 Export the pin? Jun 28 03:08:12 I am still dealing with grove cape V1.0. Jun 28 03:08:19 yeah i did the export and such Jun 28 03:08:24 Oh. Jun 28 03:08:32 i can read the values but for some reason they stay hot all the time Jun 28 03:08:38 led==on and button==1 Jun 28 03:08:53 i feel like im missing something fundamental Jun 28 03:09:12 Oh...okay. I am actually looking at book right now. Jun 28 03:09:17 I am on that page. Jun 28 03:09:33 nice :P Jun 28 03:09:46 direction? Jun 28 03:09:57 i found this which made it easy to create the DOT: http://kilobaser.com/blog/2014-07-28-beaglebone-black-devicetreeoverlay-generator#dtogenerator Jun 28 03:10:02 yep set that too Jun 28 03:10:04 i.e. echo in > direction Jun 28 03:10:15 i was wondering about the pull up/pull down resistors Jun 28 03:10:22 but have tried all kinds of dances with that Jun 28 03:10:38 i have the analog inputs working great Jun 28 03:11:11 Use a 100 ohm and another 10K ohm. Jun 28 03:11:35 Ohms law... Jun 28 03:12:24 Oh heh? Do you have a pushbutton that stays down or stays up or is it push down and it pops up? Jun 28 03:13:30 yeah its a push button Jun 28 03:13:59 im using the grove one which i believe has a resistor on it already Jun 28 03:14:04 Oh. Jun 28 03:14:32 What size resistor does it have. B/c...there are different sized LEDs. Jun 28 03:14:59 this one http://www.seeedstudio.com/wiki/Grove_-_Button Jun 28 03:15:26 Oh...okay. Did you try their Wiki or the forums? Jun 28 03:15:46 wiki yes, but havent tried the forum Jun 28 03:15:51 this was stop number 2 :) Jun 28 03:16:10 this is the LED im using http://www.seeedstudio.com/wiki/Grove_-_Variable_Color_LED Jun 28 03:16:32 Aw. I got that to work once. Now...my color LED only shines one color. Jun 28 03:16:44 I cannot explain it. Jun 28 03:17:02 I am sorry to waste your time. Jun 28 03:17:29 no worries thanks for helping out Jun 28 03:17:52 Okay...I am back to learning bash scripting. Jun 28 03:29:00 viglesias: are you sure you got the right gpio number for whatever pin(s) you're using? Jun 28 03:30:00 normally you don't need an overlay for gpios since it's already the default mux mode (although it doesn't hurt to use one to be explicit) Jun 28 03:34:35 or if you want non-default internal pull-up/down configured Jun 28 03:37:14 to show your current pin configuration (e.g. to verify an overlay has worked), this script may be handy: http://gerbil.xs4all.nl/show-pins-v3.pl.tgz Jun 28 03:44:44 At the end of my bash scripts on the BBB, $ is not interpreted well. I get a "command not found" error. Jun 28 03:45:00 i.e. on .txt files. Jun 28 03:45:36 Set_: what on earth are you trying? Jun 28 03:45:48 I am trying to learn how to bash script. Jun 28 03:46:05 for now...with text files. Jun 28 03:46:41 ok, try to explain again but this time try to make sense :P Jun 28 03:46:47 Okay. Jun 28 03:47:19 $ in bash (and perl, and php, and probably more languages) is used for variables Jun 28 03:47:26 x="world" Jun 28 03:47:31 echo "Hello $x" Jun 28 03:48:42 I typed up a text file. The text file read #!/bin/bash first off. Jun 28 03:49:26 I then added some basic commands with $ on my last line in a nano editor and then chmod u+x myfilehere. Jun 28 03:49:46 to execute the file. Jun 28 03:50:00 huh what do you mean with "with $ on my last line" Jun 28 03:50:04 zmatt: i absolutely thought so Jun 28 03:50:11 but here is my logic Jun 28 03:50:28 i have an input push button, i can get the value to change from 0->1 Jun 28 03:50:44 that makes me think im plugged into the right ping Jun 28 03:51:24 yeah that weird grove thing... I couldn't immediately find what its schematic is though Jun 28 03:51:38 also similar with the LED, it will be off until i switch the pin direction to output then it stays on Jun 28 03:51:54 That is it. The $ symbol is incorrect but the book says it needs to be there in my bash scripting. Jun 28 03:52:14 Set_: you're not making any sense Jun 28 03:52:15 ...tiny miracles. Jun 28 03:52:49 I was asking to get my "date" and "who" in my bash script. Jun 28 03:53:05 I had to use chmod u+x to execute the program. Jun 28 03:53:23 well you don't have to, just can also just run bash myscript.sh Jun 28 03:53:36 then the #!/bin/bash is also not necessary Jun 28 03:53:44 (it tells the kernel how to run your script) Jun 28 03:53:51 That is what I thought. Jun 28 03:54:11 The book I am reading states it differently. Jun 28 03:54:58 I am just learning echo, chmod, and some lettering commands. Jun 28 03:56:34 viglesias: the fact it responds to changing pin direction would suggest you got the right gpio and it is correctly muxed Jun 28 03:56:53 viglesias: but after setting it to output, it doesn't respond to changing value ? Jun 28 03:57:00 correct Jun 28 03:57:05 super weird Jun 28 03:57:25 are you trying this via sysfs or otherwise? Jun 28 03:57:32 sysfs Jun 28 03:57:36 actually Jun 28 03:57:42 have used BBIO too Jun 28 03:57:48 and Gobot Jun 28 03:57:54 and bonscript Jun 28 03:59:09 (be sure not to draw too much current from the bbb using a led btw) Jun 28 03:59:53 the four blue leds actually use transistors instead of driving them directly from the bbb Jun 28 04:00:19 ive since just started to work on the button only since they are both busted Jun 28 04:00:32 the leds? Jun 28 04:00:45 leds work Jun 28 04:00:50 usr ones anyway Jun 28 04:00:58 just not the grove one off a gpio pin Jun 28 04:01:16 "they are both busted" .. you managed to break the grove leds? Jun 28 04:02:33 negative i just meant that both the button and the LED are not working Jun 28 04:02:43 ah Jun 28 04:02:44 so i figure work on one problem at a time Jun 28 04:06:58 ok, let's try this systematically... download the script I linked to earlier, run it (as root) and verify P8.43 is currently muxed to gpio 2.08 Jun 28 04:07:34 (that pin is convenient for testing since bbb has a pushbutton on that pin itself) Jun 28 04:09:10 I got bananas and yogurt. I am lying. I have to leave. That is the truth. Later for now. Jun 28 04:11:45 viglesias: http://pastebin.com/MLqcn6wC Jun 28 04:12:59 viglesias: if you press button S2 (not the reset or power button but the third near, closer to the SD card slot) then it should show the pin as low instead (as long as the button is held down) Jun 28 04:13:49 I'm assuming at least the bbg has three buttons too, never actually checked Jun 28 04:17:40 zmatt: why that pin? Jun 28 04:18:23 06:07 < zmatt> (that pin is convenient for testing since bbb has a pushbutton on that pin itself) Jun 28 04:18:41 no external hardware needed Jun 28 04:19:19 gotcha Jun 28 04:19:28 script didnt work for some reason Jun 28 04:19:41 you got an error? Jun 28 04:19:50 http://hastebin.com/anoniduqep.pas Jun 28 04:20:47 hmm, that means my script encountered some output it doesn't recognize (I made its parser quite strict to make sure it would die on unexpected data rather than silently misparsing it) Jun 28 04:20:51 lemme see Jun 28 04:21:25 can you pastebin the content of /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins Jun 28 04:21:31 likely because its a bbx Jun 28 04:21:33 bbg Jun 28 04:21:39 no that shouldn't matter Jun 28 04:22:09 that just means some pin descriptions aren't entirely accurate (like the ones I label "hdmi" even though the bbg has no hdmi)... that's just cosmetic though Jun 28 04:22:10 http://hastebin.com/iwubahuves.coffee Jun 28 04:22:24 lol, hastebin's syntax guessing is hilarious Jun 28 04:23:12 word .pas Jun 28 04:23:27 its not very good at detecting terminal output Jun 28 04:24:46 nor anything really Jun 28 04:24:58 ok I see the prob Jun 28 04:25:14 what kernel version are you using? Jun 28 04:25:29 3.8.13-bone80 Jun 28 04:25:43 nothing worked for me on the 4.x kernel Jun 28 04:26:11 oh, an ancient kernel, that explains why my script has trouble Jun 28 04:26:18 this may help though: http://hastebin.com/aquhanexuc.tex Jun 28 04:26:25 (TeX, sure hastebin) Jun 28 04:27:24 or I'll just reupload the script anyway, hold on Jun 28 04:27:31 parse error at ./show-pins-v3.pl line 96, <> line 2. Jun 28 04:27:42 that's progress Jun 28 04:28:04 w00t Jun 28 04:28:23 96, that's trying to parse /sys/kernel/debug/pinctrl/44e10800.pinmux/pins .. can you paste that one too? Jun 28 04:28:58 http://hastebin.com/oforezudec.hs Jun 28 04:29:01 haskell Jun 28 04:29:05 it's a real language zoo Jun 28 04:29:11 all i do is haskell Jun 28 04:29:17 great language Jun 28 04:29:42 * viglesias has never haskell'd (yet) Jun 28 04:31:25 ok, I've reuploaded the script Jun 28 04:32:02 hopefully it works now Jun 28 04:32:25 works! nice output Jun 28 04:32:26 thanks Jun 28 04:32:32 you're welcome :) Jun 28 04:32:44 ever think of putting that on github or the like? Jun 28 04:32:52 yeah I guess I ought to Jun 28 04:37:23 zmatt what do the columns map to? Jun 28 04:38:49 description pin slew rx pull mode function owner Jun 28 04:39:09 for gpio the function also shows direction and pin level Jun 28 04:39:26 provided the gpio is enabled in the kernel (e.g. by exporting it via sysfs) Jun 28 04:41:19 owner describes what has claimed the pin in the kernel, either some (hopefully) descriptive string like "sysfs" or the name of a device tree node for pinmux Jun 28 04:42:08 I do btw highly recommend a 4.x kernel, 3.8 is really ancient Jun 28 04:44:01 dirkk: btw, I extracted the overlay utils from py-uio -> https://github.com/mvduin/overlay-utils .. since really they have nothing to do with python nor specifically with uio Jun 28 04:45:15 viglesias: if you need to build overlays, my overlay-utils are there to make life easier Jun 28 04:45:20 (kernel 4.1 or later required) Jun 28 07:56:40 zmatt: sorry for the late. Thanks. Shall I disable emmc or hdmi in /boot/uEnv.txt ? Jun 28 07:57:56 How do I know that pruss is enabled ? error: prussdrv_open() failed, I think I miss some include or lib directory ?? Jun 28 08:26:09 dirkk: what kernel are you using? Jun 28 08:27:10 zmatt: old one ;) 4.1.18-ti-r53 Jun 28 08:27:53 4.1-ti doesn't include uio_pruss, it has remoteproc instead (or rather I think it has both, but its device tree is setup for remoteproc rather than uio_pruss) Jun 28 08:27:57 dirkk: why not use remoteproc ? Jun 28 08:28:18 where would i best report bugs / feature requests on the official images? Jun 28 08:28:31 I'm not really familiar with either so the above isn't a value-judgement, but it is presumably why you're getting an error :) Jun 28 08:29:11 in-fact none of the 4.x-ti-anything do not has prussdrv Jun 28 08:29:13 (not that i'd regret digging through the whole uboot process, but had the shipped image its uuid set in /boot/uEnv.txt, flashing the image to mmc would have resulted in an ootb botableimage) Jun 28 08:29:46 dirkk: you will have to use -bone- kernel to use prussdrv Jun 28 08:30:38 ZeekHuge: never used remoteproc ... -bone- kernel ? How ? Jun 28 08:31:38 its simple to use remoteproc : https://github.com/ZeekHuge/BeagleScope/tree/master/examples#examples Jun 28 08:32:20 I probably i will soon get time to add content to this : http://zeekhuge.github.io/ Jun 28 08:32:29 *https://zeekhuge.github.io/ Jun 28 08:32:59 dirkk: in general, installing a new kernel: 1. sudo apt-get update # unless you've already done this in the last day or so Jun 28 08:33:30 zmatt: it's been a while Jun 28 08:33:33 2. apt-cache search 'linux-image-.*-bone[0-9]+$' | sort -V | tail Jun 28 08:33:44 to check what the latest versions are Jun 28 08:34:33 (currently latest release is linux-image-4.6.1-bone3 and latest rc is linux-image-4.7.0-rc2-bone0 ) Jun 28 08:34:55 sudo apt-get install linux-image-4.6.1-bone3 # substitute desired kernel version Jun 28 08:38:11 afk Jun 28 08:38:53 dirkk: af internet haha Jun 28 08:39:09 ZeekHuge: I will see the remoteproc doc, thanks Jun 28 08:39:36 zmatt: bbb af internet haha Jun 28 08:40:05 share your system internet Jun 28 08:40:48 about remoteproc, its much more versatile than prussdrv is. and is a standard way. Jun 28 08:40:53 dirkk: ^ Jun 28 08:44:26 ZeekHuge: ok, shall I disable emmc ? Jun 28 08:45:44 if you would, it wont boot through emmc ;) Jun 28 08:46:12 why would you want to ? Jun 28 08:47:15 ZeekHuge: If I can keep emmc I prefer. For now just toogle a pin via PRU. It will be a good start ;) Jun 28 08:47:49 you can just disable hdmi and that would do for now. Jun 28 08:50:16 ZeekHuge: hdmi already disabled Jun 28 08:51:43 ZeekHuge: your solution on github is not standalone. You used CCS, right ? Jun 28 08:52:46 not at all. Those are just to support something with TI's code composer. You can just delete all that stuff and compile it from terminal. Jun 28 08:52:59 So, IT IS standalone Jun 28 08:53:14 ZeekHuge: ok ^^ Jun 28 08:53:14 is the -bone- image up on your BBB ? Jun 28 08:53:42 ZeekHuge: 4.1.18-ti-r53 Jun 28 08:54:22 ZeekHuge: I see that you test for 4.4.12-ti-r31 and later Jun 28 08:55:11 dirkk can you please give the output of "cat /sys/devices/platform/bone_capemgr/slots" ? Jun 28 08:55:38 yeah, thats the kernel image with latest remoteproc drivers Jun 28 08:56:06 ZeekHuge: directly here ? pastebin ? Jun 28 08:56:50 dirkk: your call Jun 28 08:57:22 ZeekHuge: http://pastebin.com/rqNMcfzj Jun 28 08:58:55 okay so, this kernel does not have config-pins utility. So you will have to mux the pins using device tree file. Jun 28 09:01:43 ZeekHuge: I have config-pins I think. zmatt helped me a lot on dts. I think it's good Jun 28 09:02:15 okay, cool ! Jun 28 09:02:40 ZeekHuge: I add an overlay but it's not visible in slots Jun 28 09:02:52 dmesg | tail Jun 28 09:03:21 or dmesg | tail | pastebinit Jun 28 09:04:12 ZeekHuge: http://pastebin.com/tuvWESmN Jun 28 09:05:14 there is no message showing your overlay Jun 28 09:07:59 ZeekHuge: booting the PRU core manually... no ? Jun 28 09:09:47 nope .. that is remoteproc. It was trying to boot PRU core, but couldnt find the firmware at /lib/firmware/am335x-pru1(0)-fw. So finally failed to load. Jun 28 09:13:20 ZeekHuge: yes. I have nothing when I do 'ls /lib/firmware/am335x-pru1(0)-fw' Jun 28 09:14:01 ZeekHuge: this file is .dtbo, right ? Jun 28 09:16:08 nope, its the firmware (compiled code) file for pru cores Jun 28 09:17:24 dirkk: its actually important to figure out if you would want to go the prussdrv way, or remoteproc way. and then get the latest kernel for that. Jun 28 09:21:04 ZeekHuge: Could I use remoteproc with 4.1.18-ti-r53 for now ? Jun 28 09:22:39 I think so, but not sure. Jun 28 09:23:21 for that, try this https://github.com/ZeekHuge/BeagleScope/tree/master/examples/firmware_exmples/pru_blinky Jun 28 09:23:29 it must work Jun 28 09:23:52 ie https://github.com/ZeekHuge/BeagleScope/tree/master/examples#-pru_blinky Jun 28 09:23:58 ZeekHuge: I still don't know. The prussdrv seems simplier main.c + asm and bin but I didnot read remoteproc stuff Jun 28 09:25:22 your call Jun 28 09:37:46 ZeekHuge: in PRU_gpioToggle directory I only need PRU_gpioToggle.c and resource_table_empty.h Jun 28 09:38:53 for the latest version of clpru (ie the compiler), you need .cmd file too Jun 28 10:46:49 dirkk: anything there ? Jun 28 12:04:39 ZeekHuge: I was Hungry, sorry I have other question about your make when you invoke the pru compiler, is it cross compilation ? Jun 28 12:22:04 https://github.com/ZeekHuge/BeagleScope/blob/master/examples/firmware_exmples/pru_blinky/deploy.sh#L45 Jun 28 12:22:07 dirkk: ^ Jun 28 12:24:00 ZeekHuge: sorry didnt read this line ;) Jun 28 12:30:42 ZeekHuge: because I see https://github.com/ZeekHuge/BeagleScope/blob/master/examples/firmware_exmples/pru_blinky/PRU_gpioToggle/Makefile#L9 Jun 28 12:33:04 dirkk: you still need to export that in either case . Jun 28 12:33:47 so basically this is required https://github.com/ZeekHuge/BeagleScope/blob/master/examples/firmware_exmples/pru_blinky/PRU_gpioToggle/Makefile#L1 Jun 28 14:21:48 hello Jun 28 14:21:54 can i ask a question? Jun 28 14:23:59 No. Take that *back*. Jun 28 14:24:08 (wink) Jun 28 14:25:00 Well then there now. Jun 28 14:35:25 Ragnorok: he didnt understand that joke Jun 28 14:38:28 Seems that way. Alas. I've decreased our reputation. Jun 28 14:39:50 there is any reputation ? Jun 28 14:44:21 hélas Jun 28 14:44:33 it is my impression that the bbb graphics card can be used with free drivers only as plain frame buffer (no acceleration whatsoever / don't try playing anything but snake / don't even think of video),... Jun 28 14:45:19 ... and that there are proprietary drivers available from ti for limited kernel builds, but not available in debian or upstream linux. Jun 28 14:45:25 is that impression correct? Jun 28 14:47:13 chrysn: kinda. Video playback using the CPU for decoding will work, but there is a resolution limit (due to CPU). Jun 28 14:47:47 also I'd need to check the AM335x TRM, but there might be a 2d accelerator, or that's AM52xx only. Jun 28 14:49:10 tbr: thanks. are there any projects that aim to build practical (ie. includable in distriutions) 3d drivers that i could watch / support? Jun 28 14:49:37 it's SGX/PVR, nobody dares to touch it Jun 28 14:51:36 too bad, so i'll have to look for different hardware to replace that broken laptop as living room computer Jun 28 14:52:52 to get an impression of what it could do: what images would you recommend to run the nonfree drivers? Jun 28 15:01:05 no clue Jun 28 15:01:20 also note that this is just 3D acceleration. Not video decoding. Jun 28 20:08:48 in this image I'm using it's suggesting using connmanctl to configure wifi, is there a doc on this? Jun 28 20:54:55 ~seen rcn-ee Jun 28 21:18:08 !seen rcn-ee Jun 28 21:45:53 !seen rcn-ee Jun 28 21:55:33 update_kernel has decided to give me options, does it take an ARGV and if so in what format? Jun 28 22:07:21 I have been told Vx_Works is now a supported RTOS for beagleboards ? Jun 28 22:09:43 ask vxworks Jun 28 22:10:28 do you have a list of RTOS's supported? Jun 28 22:21:14 I don't think there is one. you'd need to check each RTOS if it supports the respective board **** ENDING LOGGING AT Wed Jun 29 02:59:58 2016