**** BEGIN LOGGING AT Sun Jan 15 03:00:01 2017 Jan 15 03:50:45 can anyone here help me get a black wireless going? Jan 15 05:02:37 anyone in here? Jan 15 05:09:13 yes, but I probably don't know the answer to your question Jan 15 05:16:48 its a simple wuestion Jan 15 05:16:50 question Jan 15 05:17:02 is the bb supposed to boot into linux out of the box? Jan 15 05:17:16 i have a bbb wireless Jan 15 05:20:57 I think so Jan 15 05:26:20 hmm because mine doesn't do shit, just a black screen Jan 15 05:39:43 digi: I have a bbw with the latest debian image that starts X even without a display connected Jan 15 05:41:45 well the leds and stuff all blink Jan 15 05:43:04 and using the web IDE(?) I can sorta get a blinking LED program to work Jan 15 05:43:29 but i can't figure out how to get video output Jan 15 05:44:43 digi: check the output of dmesg Jan 15 05:45:21 dmesg is? Jan 15 05:46:03 digi: ...it outputs kernell messages to the console Jan 15 05:46:23 what console? Jan 15 05:47:17 digi: oh, ...connect it to you computer using the usb cable Jan 15 05:47:44 ok Jan 15 05:48:08 its connected Jan 15 05:48:45 digi: open a web browser and go to 'beaglebone.local' Jan 15 05:49:30 is that the same as 192.168.7.2? Jan 15 05:49:41 digi: yes Jan 15 05:49:46 alright im there Jan 15 05:50:35 digi: if you're using Windows or Mac you have to install the drivers on that page Jan 15 05:51:10 i have them installed - win 10 64 Jan 15 05:52:25 digi: then use PuTTy to ssh into 'beaglebone.local' or '192.168.7.2' as user 'root' Jan 15 05:55:07 ok Jan 15 05:55:19 im at the prompt Jan 15 05:58:20 digi: enter 'dmesg' Jan 15 06:00:22 http://pastebin.com/11wZiHFY Jan 15 06:00:25 is the output Jan 15 06:01:06 i only have the usb cable connected right now, if that matters Jan 15 06:06:02 digi: try enabling one of the settings to load the HDMI cape for BB-BLACK in /boot/uEnv.txt and reboot Jan 15 06:06:18 digi: the only cape that is loaded is cape-universal Jan 15 06:08:15 how do i edit that? Jan 15 06:08:32 sorry im not that well versed with console Jan 15 06:10:16 digi: 'nano /boot/uEnv.txt' Jan 15 06:13:02 diji: actually it's quite possible the bbb wireless comes with the iot image by default, which doesn't enable HDMI output Jan 15 06:13:32 http://pastebin.com/RsiVxnvY thats what my uEnv.txt looks like Jan 15 06:14:31 (though I'm not sure since I would expect hdmi to enable unless a non-default dtb is selected) Jan 15 06:14:32 what should i change? Jan 15 06:15:00 actually that's just a small part of the file you're showing Jan 15 06:15:12 hmm Jan 15 06:15:34 (nano is not really well suited for copy/pasting a whole file since you need to scroll within the document) Jan 15 06:16:26 note that lines starting with # are comments/examples Jan 15 06:16:52 zmatt: ya, that's true, but try and explain the key bingings of vim or emacs to someone who has never used them Jan 15 06:17:21 Ragnarokkr: for copy/paste, just cat Jan 15 06:17:44 vim and emacs are no better for that purpose Jan 15 06:18:21 why are we staring at uEnv.txt again anyway? Jan 15 06:18:23 zmatt: you mean 'cat file.txt > pastebin' Jan 15 06:18:50 if the bbb has internet then pastebinit works even better yes (pastebinit zmatt: its a bbb wireless Jan 15 06:19:36 so no internets yert Jan 15 06:19:38 yet Jan 15 06:19:56 diji: well if you configure it to connect to your wireless then you would have internet Jan 15 06:20:28 Ragnarokkr: btw I saw you abbreviate bbb wireless to bbw earlier... don't, that's the beaglebone white Jan 15 06:20:31 :) Jan 15 06:21:17 zmatt: i haven't done anything yet. I assumed it would boot with a video output and I would config with a kb+m Jan 15 06:21:19 zmatt: i've seen it used quite a bit Jan 15 06:22:16 anyway I see where is says "cmdline=coherent_pool=1M quiet cape_universal=enable" Jan 15 06:22:45 diji: my understanding is that you can connect to it via wireless and do setup via web wizard or something, but I have been trying to figure out what the out-of-the-box experience of the bbbw is supposed to look like and still haven't Jan 15 06:23:38 Ragnarokkr: why did you want him to look at uEnv.txt ? Jan 15 06:24:06 zmatt: the output of dmesg doesn't show it loading BB-BONELT-HDMI Jan 15 06:26:04 Ragnarokkr: nor would it, hdmi used an overlay only in the ancient 3.x kernels Jan 15 06:26:38 reading dmesg now... Jan 15 06:27:15 lcdc definitely loads Jan 15 06:27:39 [ 38.634864] tilcdc 4830e000.lcdc: No connectors reported connected with modes Jan 15 06:27:47 it's not detecting any monitor connected Jan 15 06:28:02 or EDID query is failing badly Jan 15 06:28:03 zmatt: it wasnt connected when i ran it Jan 15 06:28:20 zmatt: ill do another with it connected Jan 15 06:28:23 diji: if you want to debug why you're not getting video output then it would help :P Jan 15 06:30:30 diji: I do see btw that the wireless entered AP mode Jan 15 06:30:38 so the bbbw is an access point right now Jan 15 06:31:23 hmm the monitor flashed breifly while it was booting Jan 15 06:32:18 http://pastebin.com/TV8HCUaA Jan 15 06:32:23 new dmesg Jan 15 06:32:42 with the monitor connected Jan 15 06:34:20 yeah looks like video output is working fine, just not showing much if anything (I would expect at the very least a cursor though at the topleft) Jan 15 06:35:28 which makes sense if the iot image is preinstalled, which has no gui. if you want an X11 gui on the bbb itself the easiest is probably to reflash it with the latest lxqt image Jan 15 06:36:02 nah i just have a black screen Jan 15 06:36:16 like not even the backlight on, pure black Jan 15 06:36:17 hiii Jan 15 06:37:15 can is see what image is installed from the console? Jan 15 06:37:18 diji: it might be blanked Jan 15 06:37:32 I bought beaglebone black and trying to install drivers thorough my PC(windows 8) Jan 15 06:38:11 But, making some issue Jan 15 06:38:29 anish: if driver install fails you might need to disable driver signing in windows, I had to Jan 15 06:38:48 diji: maybe /etc/dogtag ? or there was another file which might have info, ehh.. something like /etc/rcn-ee.conf I'm not sure anymore Jan 15 06:39:02 diji: easier is probably to just show a process listing: ps f -fe Jan 15 06:39:17 anish: https://www.google.com/#q=windows+8+allow+unsigned+drivers Jan 15 06:40:37 ah yes the joy of windows... which is unable to use microsoft's own driver for microsoft's own proprietary usb-networking protocol (RNDIS) without a "driver" consisting of a text file telling windows to use its own f*cking driver Jan 15 06:40:47 which needs to be signed of course, wouldn't want windows to use its own drivers accidently Jan 15 06:41:25 zmatt: http://pastebin.com/AYSsHX6M Jan 15 06:41:38 I know they were working on getting it resigned but I don't know the status of that (nor do I hugely care) Jan 15 06:41:45 thats the output of ps f -fe Jan 15 06:41:58 oh Jan 15 06:42:02 there's a gui Jan 15 06:42:05 that's interesting Jan 15 06:42:46 (the tree containing lightdm, /usr/bin/X, and lxqt-session ) Jan 15 06:43:19 you've tried e.g. moving the mouse to make sure the screen is not blanked? Jan 15 06:43:36 (it shouldn't be immediately after boot, but doesn't hurt to check) Jan 15 06:43:57 otherwise you now officially have a video output problem (congrats!) Jan 15 06:45:48 nah, nothing Jan 15 06:45:54 try: cat /sys/class/drm/*/{enabled,status,modes} Jan 15 06:47:55 highest is 1280x1024 Jan 15 06:48:22 enabled and connected? Jan 15 06:48:31 yeah Jan 15 06:48:34 cat /sys/class/graphics/fb0/mode Jan 15 06:50:15 that command doesnt seem to do anything Jan 15 06:50:59 just jumps back to root@beaglebone:~# Jan 15 06:51:08 yeah that just means the content is empty Jan 15 06:51:25 cat just displays the content of one or more files (short for concatenate) Jan 15 06:51:56 gotchs Jan 15 06:52:00 gotcha Jan 15 06:52:18 /sys is a magical filesystem representing kernel objects and their attributes Jan 15 06:52:32 so you can query the state of devices and drivers and such Jan 15 06:53:28 (and also configure quite a bit) Jan 15 06:54:10 anyway, eh, I thought that attribute was supposed to be set, but I see now it's also unset on one of the systems we have that uses a GUI so I guess I might be wrong Jan 15 06:54:42 ok, next plan, let's ask X11 what's going on... Jan 15 06:55:08 export DISPLAY=:0 XAUTHORITY=~debian/.Xauthority Jan 15 06:55:10 sounds good Jan 15 06:55:15 that sets up two environment variables needed Jan 15 06:55:36 (they'd already be set if you were on the GUI itself) Jan 15 06:55:48 can i paste things in console? Jan 15 06:56:01 like ctrl+v Jan 15 06:56:02 middle-click or right-click depending on putty's settings Jan 15 06:56:28 i entered it and nothing happened Jan 15 06:56:35 that's normal Jan 15 06:57:13 in general the unix philosophy is give output if you actually wanted to know something or on failure, but if a command is successful and has nothing to report you get no output Jan 15 06:57:39 works for me Jan 15 06:57:43 now that those vars are setup, we can do: Jan 15 06:57:44 xrandr Jan 15 06:57:52 that does query for information :) Jan 15 06:58:24 output: Invalid MIT-MAGIC-COOKIE-1 keyCan't open display :0 Jan 15 06:58:39 hum Jan 15 07:00:52 that suggests the environment variables are wrong, but I don't see a reason why Jan 15 07:01:01 can you try the process listing (ps f -fe) again with a wider window? Jan 15 07:01:09 maybe I'm overlooking something Jan 15 07:01:49 you mean like maximise putty? Jan 15 07:02:39 for example, or just resize it to be wider Jan 15 07:02:57 http://pastebin.com/2LPGJGm0 Jan 15 07:03:01 with fullscreen Jan 15 07:04:11 eh weird, earlier it was logged in, now it's sitting on a login screen Jan 15 07:04:12 wth Jan 15 07:05:28 ghost in the machine Jan 15 07:06:05 although i might have rebooted bewteen those two outputs Jan 15 07:06:14 i forget when i last did Jan 15 07:06:29 I would expect that if it auto-logins, it auto-logins every time Jan 15 07:06:44 but well, we can work with this I think Jan 15 07:07:06 last time i rebooted it hit the reset button rather than a hard reboot Jan 15 07:07:56 export XAUTHORITY=/var/run/lightdm/root/:0 Jan 15 07:07:57 xrandr Jan 15 07:08:35 hitting the reset button *is* a hard reboot Jan 15 07:09:06 oh alright Jan 15 07:09:08 anyway Jan 15 07:09:13 xrandr: Failed to get size of gamma for output default Jan 15 07:09:21 Screen 0: minimum 1280 x 1024, current 1280 x 1024, maximum 1280 x 1024 Jan 15 07:09:31 default connected 1280x1024+0+0 0mm x 0mm Jan 15 07:09:38 please don't paste multiline stuff in here Jan 15 07:09:38 1280x1024 0.00* Jan 15 07:10:24 http://pastebin.com/pxCpDMyv Jan 15 07:10:28 but ok, so everything is working fine... Jan 15 07:10:35 apart from the little detail of having no video Jan 15 07:11:06 cat /sys/class/graphics/fb0/modes >/sys/class/graphics/fb0/mode Jan 15 07:11:25 is that one command? Jan 15 07:11:28 yes Jan 15 07:11:44 ok Jan 15 07:11:58 monitor blinked right after i entered it Jan 15 07:12:12 appending >filename to a command redirects its output to that file Jan 15 07:12:57 easy enough Jan 15 07:13:17 it seems like your monitor has real problems with the hdmi signal for some reason Jan 15 07:13:36 give me a minute to see if i can try another display Jan 15 07:14:30 or, if you're powering it via usb right now, a proper 5V (preferably 2A) adapter would also be another thing I'd try Jan 15 07:14:50 i tryed the adaptor too with no luck Jan 15 07:15:07 can i power it off a phone charger Jan 15 07:15:17 at least to check to display output? Jan 15 07:15:28 yeah sure Jan 15 07:15:32 aight Jan 15 07:15:33 1 min Jan 15 07:15:50 note that you can communicate with the bbb even if its usb is occupied if you log onto its wireless access point Jan 15 07:16:10 (no I don't know the default password, I would hope such info is prominently included with the device :/ ) Jan 15 07:19:44 ok i got a cursor Jan 15 07:19:47 on my tv Jan 15 07:20:05 that's encouraging Jan 15 07:20:08 on the other side of the house so let me grab the mouse to see what happens Jan 15 07:20:28 just a black screen with the cursor in the middle Jan 15 07:20:31 1 min Jan 15 07:20:36 that is a bit weird Jan 15 07:21:37 though I don't know what the default background is... if it's black, and your tv is overscanning, then menubar or panel at the top and/or bottom could be outside the visible range Jan 15 07:25:30 (on my samsung tv I had to do non-obvious configuration to keep it from overscanning) Jan 15 07:27:34 ok Jan 15 07:27:36 well Jan 15 07:28:06 it works! Jan 15 07:28:29 so im kind of embarassed that it didnt try that first Jan 15 07:28:34 so, for your previous monitor, it is possible it is claiming nonsense in its EDID Jan 15 07:28:41 "yeah sure, I support that resolution!" Jan 15 07:29:18 it is possible to forcibly override the resolution and framerate via /boot/uEnv.txt Jan 15 07:30:19 so would have to force 1,920x1,080? Jan 15 07:30:51 getting that resolution to work is very tricky since it stretches against the limits of the lcd controller (and memory bandwidth) Jan 15 07:30:59 i should note that it didn't fit on my tv Jan 15 07:31:08 it was sized wrong Jan 15 07:31:16 read what I said about overscanning Jan 15 07:31:23 yeah Jan 15 07:31:31 if you mean stuff was outside visible range at least Jan 15 07:31:42 yup Jan 15 07:31:54 afaik most tvs have a setting to fix that Jan 15 07:32:04 which may or may not be easy to find Jan 15 07:32:14 I only know it on samsung tvs Jan 15 07:32:15 i messed with it breifly but wanted to get back up here Jan 15 07:32:23 it is a samsung tv Jan 15 07:32:30 one sec :) Jan 15 07:32:38 (and a samsung monitor) Jan 15 07:34:29 press Source, Tools, Edit Name, select the input, select the name "PC" from the list Jan 15 07:34:59 intuitive right? :P Jan 15 07:35:40 it was on pc Jan 15 07:35:45 huh Jan 15 07:35:47 i changed to av Jan 15 07:35:55 to see if it would work Jan 15 07:36:00 no it definitely needs to be PC Jan 15 07:36:01 doesn't look like it Jan 15 07:37:01 i also borked my hdmi micro adaptor, i have another but its untested Jan 15 07:37:18 just borked* Jan 15 07:37:35 720p should work on the tv, though I'd expect that to be the default Jan 15 07:38:38 you know theory was all so nice... device reads EDID from monitor, monitor gives an accurate representation of what it supports, device compares that to its own capabilities and selects the best mode, and it all works Jan 15 07:38:46 hmm, i cant access the monitor menu when the bb is plugged in Jan 15 07:39:29 so your monitor might be getting confused to hell by the hdmi signal or something Jan 15 07:40:13 forcing might work, but it'll be trial and error Jan 15 07:41:06 wouldn't i just force the native resolution Jan 15 07:42:17 one I've used with success once was video=HDMI-A-1:1440x1080R@50e Jan 15 07:43:07 the native height but reduced width resulted in proper display without overstretching the processor Jan 15 07:43:24 my temperature sensor on my RPi works on kernel 4.7 but not 4.8 Jan 15 07:43:29 the driver didn't change between these versions Jan 15 07:43:31 y Jan 15 07:43:47 diji: the R stands for reduced blanking (lcd panels don't really need much if any blanking), the e is force-enable Jan 15 07:44:02 (force-enable shouldn't be necessary) Jan 15 07:44:03 zmatt: i edit that into the uEnv.txt file? Jan 15 07:44:11 in the cmdline= option specifically Jan 15 07:44:41 e.g. I had: Jan 15 07:44:43 cmdline=coherent_pool=1M video=HDMI-A-1:1440x1080R@50e quiet Jan 15 07:44:48 (I don't use cape-universal) Jan 15 07:45:24 Frogging101: lunar phase detector was changed Jan 15 07:45:32 must have been Jan 15 07:45:34 :p Jan 15 07:46:14 Frogging101: ask broadcom support? ;) Jan 15 07:46:44 I'm not sure whose screwup it is really :p Jan 15 07:46:54 zmatt: how do i save changes in nano? Jan 15 07:47:08 and must i reboot? Jan 15 07:47:12 diji: I don't use nano, but iirc it shows the keyboard commands at the bottom? Jan 15 07:47:22 so vim maybe? Jan 15 07:47:59 if you were using vim you'd notice from the "how the fuck do I enter text? AHH WHAT'S GOING ON HOW DO I GET OUT" Jan 15 07:48:13 (vim takes a bit of getting used to) Jan 15 07:48:48 so should i just go back and forth between my monitor and tv? Jan 15 07:49:21 what do you mean? I'm not even sure what your question "vim?" was supposed to signal in the first place Jan 15 07:49:49 lol Jan 15 07:50:32 diji: control-O is save in nano Jan 15 07:50:34 zmatt: mvn i thought you said "don't use nano" i missed the "I" part Jan 15 07:50:43 i'm too tired to debug this bs right now so I guess I'll do it tomorrow and/or try it on a BBB Jan 15 07:50:53 Frogging101: what kind of sensor is it? Jan 15 07:50:56 DHT22 Jan 15 07:51:01 dht11 kernel driver Jan 15 07:51:07 oh those shitty things Jan 15 07:51:16 1-wire-except-custom Jan 15 07:51:20 What's weird is that the userspace implementation doesn't work either on kernel 4.8, so it's a gpio issue maybe? Jan 15 07:51:29 or a timing issue Jan 15 07:51:45 pls no Jan 15 07:51:59 doing this in linux sounds like a recipe for stochastic results Jan 15 07:52:06 PRU could do this reliably of course Jan 15 07:52:32 PRU? (sorry, google isn't helping me) Jan 15 07:52:48 you have a beaglebone and don't know what PRU is ? Jan 15 07:52:56 I don't have a beaglebone (yet) Jan 15 07:52:58 :p Jan 15 07:53:11 ah, since you said try it on a BBB I assumed Jan 15 07:53:24 yes Jan 15 07:53:53 linux interfaces with all sorts of stuff though Jan 15 07:54:21 PRU is Programmable Real-Time Unit, it's a special RISC core designed by TI for hard real-time stuff Jan 15 07:54:40 yes linux does, but most of that uses special peripherals, like an UART, I2C controller, SPI controller etc Jan 15 07:54:46 then the critical timings are done by that component Jan 15 07:55:05 ah Jan 15 07:56:04 anyway, the AM3358 used on the beaglebone has a "PRU subsystem" with two PRU cores and associated memories and peripherals Jan 15 07:56:13 they have a bunch of GPIO wired directly into registers Jan 15 07:56:18 that sounds like fun Jan 15 07:56:40 and all instructions other than load/store take 1 cycle Jan 15 07:56:48 so you can make timing just by counting instructions Jan 15 07:56:58 they run at 200 MHz :) Jan 15 07:57:27 so you can literally bit-bang a 100 MHz clock, (although that would take up 100% cpu load of one core) Jan 15 07:57:27 what language do you program it in? Jan 15 07:57:55 it has a very fancy assembler that supports structs and such Jan 15 07:58:19 or a C compiler but that's not as useful if you want accurate timing Jan 15 07:58:23 zmatt: not to drag you down another rabbit hole, but my ssh connection is timing out since i saved the edited uEnv.txt Jan 15 07:58:50 diji: editing the file itself has no effect until reboot Jan 15 07:59:14 zmatt: i did reboot and now i can't ssh in anymore Jan 15 07:59:26 it times out Jan 15 07:59:49 I hope you triple-checked your changes to uEnv.txt :P Jan 15 08:00:00 ruh roh Jan 15 08:00:01 maybe I should have been more explicit about that Jan 15 08:00:17 they're settings for the bootloader, so not the best place to make typos Jan 15 08:00:26 oh nice Jan 15 08:00:29 can i reflash Jan 15 08:00:42 yes, easily. you can also recover easily if you have a serial console cable Jan 15 08:01:01 like a serial to usb cable? Jan 15 08:01:19 http://elinux.org/Beagleboard:BeagleBone_Black_Serial Jan 15 08:01:31 yeah i have one Jan 15 08:01:39 3.3V ? Jan 15 08:01:59 (I've heard mixed results for the 5V cable) Jan 15 08:02:13 ehhh probably not Jan 15 08:02:21 the console port *is* 5V tolerant (unlike all other IOs) Jan 15 08:02:42 but it still only sends 3.3V and a 5V serial cable may have trouble interpreting that correctly Jan 15 08:02:59 you can try of course Jan 15 08:03:09 i think i have a level shifter laying around somewhere Jan 15 08:03:23 my workstation has an actual serial port :D Jan 15 08:03:33 Frogging101: which is useless for this :D Jan 15 08:03:51 rs232 uses voltages which are definitely *not* safe Jan 15 08:03:55 heh Jan 15 08:04:30 like, very severely so Jan 15 08:05:04 25V, lol Jan 15 08:05:05 zmatt: so if i wanted to I could just flash a new image and be done with it? Jan 15 08:05:25 like download the image and write it to an SD Jan 15 08:05:33 diji: yeah, you can download a flasher image, write that onto a microsd card, stick it in and it'll reflash eMMC Jan 15 08:05:48 note you can find flasher images and standalone images, pay attention to which one you want Jan 15 08:06:00 standalone means it just boots from the card Jan 15 08:06:16 im just gonna do that since even though the serial route sounds more fun Jan 15 08:06:34 I do recommend eventually exploring the serial console Jan 15 08:06:52 kgdb Jan 15 08:07:36 it's better to be familiar with recovery *before* you need it badly because you accidently mucked up uEnv.txt on an image you've been working on for months and forgot to backup Jan 15 08:07:40 ;) Jan 15 08:07:55 I'll definitely get to it, i did a lot of serial stuff with 8 bit micors so its not all new Jan 15 08:08:23 also very useful is usb... it's possible to get the bbb into usb mass storage mode, making the eMMC appear like an usb stick Jan 15 08:09:15 are those 6 male headers on the board the serial connection? Jan 15 08:09:22 I also reflash beaglebones that way, no need to hassle with usd cards Jan 15 08:09:44 (but requires one-time investment in figuring out how to get it to work, it's not as smooth) Jan 15 08:09:55 yeah that's standard ftdi layout Jan 15 08:10:08 though only gnd, tx, and rx are connected Jan 15 08:10:18 yeah Jan 15 08:10:24 (annoyingly) Jan 15 08:10:37 look man i got to go to bed so ill have to deal with it tomorrow Jan 15 08:10:42 which also means you can't paste more than one line + 64 bytes into u-boot Jan 15 08:10:56 thanks a ton for helping me and for the insight into linux Jan 15 08:11:02 or unix Jan 15 08:11:23 since it'll stop reading the uart while processing the command, so once the fifo is full remaining data is discarded Jan 15 08:11:47 and hardware handshake (which would prevent that) isn't connected Jan 15 08:11:49 :/ Jan 15 08:11:58 good night then :) Jan 15 08:12:24 one more quick question for my curiosity, do you come from a hardware or software background Jan 15 08:12:25 ? Jan 15 08:12:47 yes Jan 15 08:12:55 ;) Jan 15 08:13:26 in practice I know a fair bit of hardware but don't *do* much hardware Jan 15 08:14:04 I do however often verify schematics, get asked hardware questions, debug hardware issues, and work on software that closely interacts with hardware Jan 15 08:14:43 heh ill take it. I'm always curious about where in the abstraction layers the harware guys coming from the bottom meet the software guys coming from the top Jan 15 08:15:09 I'm definitely more at home in low-level programming than high-level Jan 15 08:15:28 e.g. I've also done baremetal programming for the beaglebone Jan 15 08:16:23 in C++, although most C++ programmers probably will have a hard time recognizing it as such ;) (e.g. my little baremetal programs so far never had a heap, hence no malloc() or operator new) Jan 15 08:16:41 I also made this example once -> https://github.com/mvduin/bbb-asm-demo Jan 15 08:17:10 yeah i started with C and really only have worked with C doing all micro stuff. My programming friends have a real tough time helping me sometimes Jan 15 08:17:35 They do all really high level stuff Jan 15 08:17:35 (pure assembly because someone was looking for that, no idea why -- you really don't need much assembly code) Jan 15 08:18:23 doing baremetal on the beaglebone is perfectly doable in my opinion, even though it's a bit more challenging than a microcontroller Jan 15 08:18:38 otoh you then suddenly have insanely massive resources compared to a microcontroller :) Jan 15 08:19:32 without the (sometimes insanely massive) overhead of linux Jan 15 08:20:32 yeah im still a bit anxious about it, to me right now 1Kb of anything is massive Jan 15 08:21:00 but i really got to go Jan 15 08:21:00 heh yeah, so far I've not yet bothered to initialize the memory controller Jan 15 08:21:08 since I got 127 KB of local SRAM Jan 15 08:21:35 thanks a ton again for your time and knowledge Jan 15 08:21:54 you're welcome! and good luck Jan 15 08:22:09 thanks, hope to see you here again Jan 15 08:22:45 I'm generally always here, and pay attention fairly often Jan 15 10:56:49 and he's having a lot of fun acting as rpi kernel maintainer Jan 15 10:56:50 "Every step of the way is misery to get the code merged, and I would give up a lot to never work on the Linux kernel again. Jan 15 11:02:39 Lets say I have want to use the interrupt on pin p9.27, gpio2_19 Jan 15 11:02:53 (sorry, wrong window) Jan 15 11:03:00 Why is the interrupt-parent <&gpio3>? Jan 15 11:05:10 ah Jan 15 11:05:19 It would make more sense if it was &gpio2? Jan 15 11:05:20 yes... Jan 15 11:05:45 actually it needs to be &gpio2 Jan 15 11:05:56 I think some ancient kernels used 1-based numbering Jan 15 11:06:00 Rly? Jan 15 11:06:46 I dont understand any of this Jan 15 11:06:47 this still shows up in the identifier in the ti,hwmods property (which can't be fixed for compat reasons I guess): https://github.com/RobertCNelson/linux-stable-rcn-ee/blob/4.4.41-ti-r82/arch/arm/boot/dts/am33xx.dtsi#L328-L330 Jan 15 11:08:00 worse yet, there are still a few that use 1-based numbering Jan 15 11:08:08 So if i want to use gpio2_19 i should set the interupt-parent to &gpio2? Jan 15 11:08:10 e.g. mmc0 is called mmc1 in DT Jan 15 11:09:29 What I dont understand is how the can-cape-overlay from towertech is working? They use the 1-based numbering http://dpaste.com/1JBQJ6P Jan 15 11:09:55 yes, normally you'd expect to write e.g. interrupts = <&gpio2 19 (flags)>; like you would with other resources (dmas, gpios, pwms) but for historical reasons interrupts puts the device in a separate property Jan 15 11:09:56 line 126 Jan 15 11:10:07 how? that's easy Jan 15 11:10:10 12:05 < zmatt> I think some ancient kernels used 1-based numbering Jan 15 11:10:29 But I am running on kernel 4.4 Jan 15 11:10:33 Is that ancient? Jan 15 11:10:35 no Jan 15 11:10:54 oh I misunderstood what you said Jan 15 11:11:11 since towertech only provided stuff for 3.x kernels last time I checked Jan 15 11:11:38 No, they actually provided a fix for 4.4.x kernels with a modified mcp2515.c module Jan 15 11:12:04 s/4.4.x/4.x Jan 15 11:13:13 the DT is right, the comments are wrong Jan 15 11:13:28 line 25: "P9.27", /* spi irq: gpio2_19 */ Jan 15 11:13:40 P9.27 is gpio 3.19 Jan 15 11:13:58 likewise P9.23 is gpio 1.17 Jan 15 11:15:04 haha, that makes sense Jan 15 11:15:17 the exclusive-use declarations on lines 35-36 are therefore also wrong, but this only affects conflict-detection Jan 15 11:15:19 I will never trust a comment again Jan 15 11:15:57 So the line 35-36 should actually say gpio3_19 and gpio1_17 Jan 15 11:16:06 yup Jan 15 11:16:43 That leaves me with only one more question. It says interrupts = <19 0>; on line 127 Jan 15 11:16:43 also lol at line 93 Jan 15 11:16:54 yea Jan 15 11:16:55 hhaha Jan 15 11:17:12 I guess cs-gpios is hard to understand or something :P Jan 15 11:17:40 yeah so, if you look here: https://github.com/RobertCNelson/linux-stable-rcn-ee/blob/4.4.41-ti-r82/arch/arm/boot/dts/am33xx.dtsi#L334 Jan 15 11:18:13 this is saying that any reference to an interrupt provided by gpio2 needs 2 arguments Jan 15 11:18:23 y Jan 15 11:18:53 it would have been much clearer if they actually used the named constants available for that second argument Jan 15 11:19:04 y, like you have in your overlay-'utils Jan 15 11:19:25 I looked at your irq.h file, but the 0 isn't bound to any constant Jan 15 11:19:33 So i dont understand what that means Jan 15 11:19:50 neither do I, it is invalid afaik Jan 15 11:20:14 maybe the gpio controller assumes some default for the idiots who do this Jan 15 11:20:27 I'd need to check the source code Jan 15 11:20:41 I think I read that last night. I should be zero to use the "default" value of the interupt-parent Jan 15 11:20:54 But I dont understand where that is specified Jan 15 11:21:08 the source code of the interupt controller driver Jan 15 11:21:37 But I think that chip actually needs falling edge detection, so i should change the 0 to 2? Jan 15 11:21:41 https://github.com/mvduin/overlay-utils/blob/master/include/irq.h Jan 15 11:21:53 How do you mark lines in github btw? Jan 15 11:22:19 I suggest #including the irq controller DT binding and use the constants (like I do) Jan 15 11:22:25 click in the margin Jan 15 11:22:33 ah, ok Jan 15 11:22:34 ty Jan 15 11:22:41 you can also shift-click to select a range Jan 15 11:22:49 nice Jan 15 11:24:16 I will try to change the 0 to 2 or 8 and see if it still works Jan 15 11:24:33 IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_LEVEL_LOW Jan 15 11:25:46 Maybe thats the thing in the show-pins? Maybe the level interupts is what is creating the < yeah I considered the same, although it doesn't make sense to me Jan 15 11:26:51 btw only one of those will be correct Jan 15 11:27:04 so since it was falling-edge before, it should be falling-edge again Jan 15 11:29:29 Is it specified in the module, whether it should be falling edge or rising edge? I know that the actually chip uses falling edge, but is that something you specifiy in the module? Or does both the edge and level interupts trigger the same kind of event in the module? Jan 15 11:30:05 the correct choice depends on the behaviour of the hardware and the design of the driver Jan 15 11:30:58 the wrong choice may not necessarily cause overt failures but instead subtle race conditions (it may otoh also cause overt failures) Jan 15 11:32:10 (the correct choice should therefore be in the DT binding docs for the mcp driver) Jan 15 11:32:50 So if i set it to rising edge, and manually force the line high, then the code that handles the interupt in the module will run? Jan 15 11:33:27 the interrupt handler would be called if enabled yes Jan 15 11:33:39 ok, cool Jan 15 11:33:40 on rising edges Jan 15 11:33:56 mhm Jan 15 11:34:20 if you'd choose level then the interrupt would rapid-fire until a safety mechanism in linux intervenes, after which the interrupt line will be unusable till next boot Jan 15 11:34:21 And the module have no idea that it gets "wrong" signals Jan 15 11:34:48 it'll think "hmm? oh nothing" and return IRQ_NONE Jan 15 11:35:01 haha, ok Jan 15 11:35:21 note that on some architectures it's common for multiple devices to share an irq line Jan 15 11:35:44 so then whenever the irq is triggered, the handler for each device is invoked until one returns IRQ_HANDLED Jan 15 11:35:59 or possibly all of them actually, not sure Jan 15 11:37:01 for edge-triggered it would be necessary to invoke all of them to avoid risking a dropped interrupt, level irqs could get away with skipping the rest once one handler is found that returns IRQ_HANDLED Jan 15 11:37:48 https://www.kernel.org/doc/Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt Jan 15 11:37:51 they use 0x02 Jan 15 11:38:13 yea, that is falling edge Jan 15 11:38:18 this documentation could have been clearer :P Jan 15 11:38:40 no shit Jan 15 11:38:58 This is the other chip I tried to get to work on friday. http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/serial/maxim,max310x.txt Jan 15 11:39:03 also uses falling edge Jan 15 11:39:13 So when I had 0 instead of 0x02 Jan 15 11:39:26 did that actually work? I'm kinda surprised Jan 15 11:39:42 I haven't found code responsible yet Jan 15 11:39:45 The mcp2515 module? Jan 15 11:40:05 with 0 (IRQ_TYPE_NONE) as argument Jan 15 11:40:10 mhmh Jan 15 11:40:12 it did Jan 15 11:40:19 Thats what towertech released Jan 15 11:40:37 But I have no idea if they actually use the interupt or if they use some sort of polling Jan 15 11:40:48 They heavily modifed the source code for the module Jan 15 11:41:10 that's suspicious Jan 15 11:41:33 and of course they've submitted that upstream right? ... :P Jan 15 11:41:56 http://dpaste.com/2WN1GZR Jan 15 11:42:00 no, they didnt Jan 15 11:42:30 I am currently going true it to look for what they changed Jan 15 11:42:45 diff didnt work that good since lines have been moved Jan 15 11:42:48 they provided this as a C file, not even as a proper patch? Jan 15 11:42:51 gawd Jan 15 11:42:59 no idea even what kernel they used as base? Jan 15 11:43:03 They made a makefile for it as well Jan 15 11:43:19 I can submit the whole zip file Jan 15 11:43:57 https://dl.dropboxusercontent.com/u/2883083/TowerTech/towertech-tt3201-rev5-kernel-4.x.tar.gz Jan 15 11:44:12 Thats the link i got from them in an email Jan 15 11:44:28 kernel 4.x .. nice and specific Jan 15 11:44:34 jup Jan 15 11:45:09 I dont understand why they dont patch it upstream, would be so much easier for all the people trying to use the mcp2515 chip Jan 15 11:45:26 effort Jan 15 11:45:31 hehe Jan 15 11:45:44 also, decent chance that it turns out they've been doing something stupid :P Jan 15 11:46:05 Thats true Jan 15 11:46:31 https://github.com/torvalds/linux/blob/master/drivers/gpio/gpiolib.c#L1631-L1636 so far in trying to figure out what happens with 0 this is what I foudn Jan 15 11:46:37 *found Jan 15 11:46:52 ah wait Jan 15 11:47:03 ok, so the gpiochip passes a default type Jan 15 11:47:10 then... Jan 15 11:48:01 https://github.com/torvalds/linux/blob/master/drivers/gpio/gpiolib.c#L1783-L1790 Jan 15 11:48:13 there is no default Jan 15 11:48:34 wow, so clever! Jan 15 11:49:07 But i dint get that msg in my dmesg output i think Jan 15 11:49:42 no that would only happen if an attempt is made to register the gpiochip with a default irq trigger Jan 15 11:51:01 I do think that using IRQ_TYPE_NONE when requesting an irq should then give an error, unless there's still something I'm missing Jan 15 11:51:12 I would agree Jan 15 11:51:53 easy test: every irq has a counter associated, visible in /proc/interrupts Jan 15 11:51:59 so you can see whether or not it's firing Jan 15 11:55:32 ehh why are there two drivers in that file from TT Jan 15 11:56:13 or not.. huh Jan 15 11:56:20 * zmatt confused Jan 15 11:56:41 yeah there are Jan 15 11:57:25 by different authors Jan 15 11:58:54 which one are you using? mcp2515 or mcp251x ? Jan 15 11:59:35 I just used the overlay they sent, after running the build.sh script Jan 15 11:59:42 So I have no idea actually Jan 15 11:59:45 Didnt think of it Jan 15 11:59:57 compatible = "microchip,mcp2515"; Jan 15 12:00:21 they're both compatible with that Jan 15 12:00:25 check lsmod Jan 15 12:00:33 I dont have my bbb here :( Jan 15 12:00:40 ah Jan 15 12:00:48 so you also can't check /proc/interrupts :) Jan 15 12:01:09 mcp251x is the one also in mainline linux Jan 15 12:03:43 looks like they based it on a very old version of the driver, many bugfixes ago Jan 15 12:04:52 Seems like the build.sh script installs both modules Jan 15 12:05:38 But they only move the mcp251x.ko to the attic folder Jan 15 12:05:52 that would be the original mcp251x Jan 15 12:05:55 ? Jan 15 12:05:57 y Jan 15 12:06:09 I have absolutely no idea from where they got the other one Jan 15 12:06:34 probably some alternative out-of-tree driver they found somewhere Jan 15 12:07:07 Ye, they also sent this one, for kernel 3.x https://dl.dropboxusercontent.com/u/2883083/TowerTech/towertech-tt3201-rev5.tar.gz Jan 15 12:08:01 The mcp2515.c includes the mcp251x.h Jan 15 12:08:27 that header doesn't even exist in mainline Jan 15 12:08:33 mhm Jan 15 12:09:30 Compared to the mainline it seems like they have modified the srtuct but most of the functions are the same Jan 15 12:10:13 I'm trying to find their baseline version, since they're definitely lacking many of the later commits Jan 15 12:10:51 oh nice they even seem to have cherry-picked Jan 15 12:11:19 ah no nm Jan 15 12:12:28 seems like they have added some options to enable clkout,stay-awake,and uses a oscillator-frequency handle instead of the clock nodes Jan 15 12:12:31 in the dts Jan 15 12:12:40 mcp251x,oscillator-frequency = <16000000>; Jan 15 12:12:40 mcp251x,stay-awake = <1>; Jan 15 12:12:41 mcp251x,enable-clkout = <1>; Jan 15 12:13:26 I see why irq works, they added code to the driver to make it default to falling Jan 15 12:13:47 CLEVER! Jan 15 12:14:42 I'm still going down git history to find the driver they used as base version Jan 15 12:14:54 I'm now in early 2014 Jan 15 12:15:39 I would guess 2013 Jan 15 12:15:43 or 2009 Jan 15 12:15:50 based on the copyright stuff comments Jan 15 12:16:07 patches rarely update the copyright Jan 15 12:16:16 true that Jan 15 12:17:17 but indeed we've arrived in 2013 Jan 15 12:18:12 waitwhat Jan 15 12:18:32 it's based on a pre-DT version Jan 15 12:19:03 hence the different DT binding Jan 15 12:19:44 lol Jan 15 12:20:24 aug 2013 ... Jan 15 12:20:46 They probably just did a few modifications to the one they had for the 3.x kernel and released it for 4.x Jan 15 12:21:46 april 2013 Jan 15 12:22:17 that seems to be the one Jan 15 12:22:57 link? Jan 15 12:22:58 commit 4fcc999e98bc89190b051cc30932bd00d4ebe1f4 Jan 15 12:23:56 https://github.com/torvalds/linux/blob/4fcc999e98bc89190b051cc30932bd00d4ebe1f4/drivers/net/can/mcp251x.c Jan 15 12:25:42 I think anyway Jan 15 12:25:52 mhm, but they have done some modifications to that one Jan 15 12:27:44 https://gist.github.com/mvduin/70d6db8a41328ddd92b6d5c49572c1ef Jan 15 12:29:54 hm Jan 15 12:31:49 to see all the commits they've therefore discarded, see Jan 15 12:31:51 https://github.com/torvalds/linux/commits/master/drivers/net/can/spi/mcp251x.c Jan 15 12:32:11 y Jan 15 12:32:30 I think il give it a go to get the mainline module to work Jan 15 12:33:04 and when you reach the end you need to continue at the old location before the move, https://github.com/torvalds/linux/commits/master/drivers/net/can/mcp251x.c Jan 15 12:33:42 hehe Jan 15 12:33:50 15-20 commits ago Jan 15 12:33:50 until "Remove unneeded PM_OPS definitions" about halfway down :P Jan 15 12:34:35 nice job TT Jan 15 12:34:39 yupp Jan 15 12:35:19 given that clearly people use it and improve it, I'd say the mainline driver really ought to work Jan 15 12:36:19 I would agree. Il give it a another try. Now, i feel i know a lot more about how this work than i did last summer (which was nothing) Jan 15 12:38:24 good luck :) Jan 15 12:38:32 hehe .Thanks Jan 15 12:39:33 btw, do you work for the beaglebone guys? Jan 15 12:47:49 tlab: You might be interested in this conversation Jan 15 12:54:58 laurittr: nope Jan 15 12:56:19 Anyways. I appreciate all the help you have given me! Thank you very much. Jan 15 12:56:36 laurittr: currently this just happens to be my favorite place to procrastinate most important things Jan 15 12:56:40 :P Jan 15 12:56:52 :D Jan 15 13:00:56 Frogging101: btw, if you want to know more about PRU see http://elinux.org/images/d/da/Am335xPruReferenceGuide.pdf Jan 15 13:01:45 and maybe the PRU chapter in the latest TRM... it overlaps significantly, but both lacks some info and adds some other info Jan 15 13:05:22 laurittr, zmatt welcome to my world of fun with TT. Why they don't use mainline driver I don't know Jan 15 13:06:15 My board dates back to 2012, and works with an old distro, angstrom and debian, but no 4.x kernels Jan 15 13:07:11 The waveshare can cape works great with mainline tho, and is much cheaper. But is only 1 can line Jan 15 13:08:25 the other can conflicts with the i2c bus used by capemgr... I personally wouldn't give a shit and just disable capemgr, but I understand that's a more difficult position to take if you make capes :P Jan 15 13:08:44 (in fact we have capemgr disabled in all our DTs) Jan 15 13:15:37 I do not intend to use the capemanger Jan 15 13:16:53 then a custom pcb with two transceivers would get you 2x can Jan 15 13:20:39 yeah I thought about making a custom cape on a protoboard from adafruit Jan 15 13:20:44 to use the two dcan's Jan 15 13:22:18 from what I've heard the mcp251x using the kernel eats up a lot of cpu load Jan 15 13:22:45 especially if the canbus load is high Jan 15 13:23:36 plus it seems they have dropped support for the TT in the beaglebone images Jan 15 20:52:17 Hi all Jan 15 20:53:40 I am running a beagleboard-xm that is running Ubuntu 12.04 I would like to stop lightdm from starting up. Any recommendations? Jan 15 20:56:25 remove it from the init scripts or disable the systemd unit or whatever, I assume Jan 15 20:56:42 oh it'll be upstart for 12.04, I believe Jan 15 20:57:01 http://askubuntu.com/questions/139014/how-to-disable-lightdm Jan 15 20:57:07 thanks Frogging101 Jan 15 21:02:29 Hi Froggin101 I have been on this page. Most of the answer don't quite work for my case. "systemctl disable lightdm" >> "systemctl: command not found" Jan 15 21:11:17 The only option that kind of work is the one which removes the executable bit "chmod -x /usr/sbin/lightdm". The problem I have with this solution is that it corrupts my auto-log function when I want to plumb lightdm back Jan 15 22:23:40 Hi all Jan 15 22:24:36 can a desktop manager such as lightdm be ran without invisible. I want to run a QT application but I don't want it to appear as if I am running on desktop Jan 15 22:24:56 sorry typo error Jan 15 22:25:23 can a desktop manager such as lightdm be ran in an invisible mode? Jan 15 22:25:49 I am running ubuntu 12.04 Jan 16 00:31:57 zmatt: I fixed the DHT11 issue. Apparently msleep() is really unreliable with low values Jan 16 00:32:19 The driver was doing an msleep(18) but I routinely observed 30-50ms delays on my oscilloscope Jan 16 00:33:26 so the driver would send the start signal, which is pulling the pin low for up to 20ms, but it was doing it for much longer than that and the sensor wouldn't respond Jan 16 00:34:04 I replaced msleep() with a usleep_range and it's much more reliable now Jan 16 00:34:16 so yes. timing issue Jan 16 00:34:18 :p Jan 16 00:54:22 oh it was using msleep? lol Jan 16 00:54:43 I thought that thing had timing more in the <1ms times Jan 16 01:15:34 it was using msleep for the start pulse Jan 16 01:15:44 which can be from 0.8 to 20ms Jan 16 01:16:04 which msleep was consistently overshooting Jan 16 01:17:22 it was overshooting it on pre-4.8 kernels too, but not by as much (it usually was within 20-30ms) so it was usually "close enough" Jan 16 01:17:33 but after 4.8 it was 30-50 Jan 16 01:17:53 which made it fail almost every single time Jan 16 02:00:35 of course it shouldn't have relied on that in the first place **** ENDING LOGGING AT Mon Jan 16 03:00:01 2017