**** BEGIN LOGGING AT Mon Jun 24 02:59:58 2013 Jun 24 03:08:21 define "debug" Jun 24 03:08:25 what are you trying to find out? Jun 24 03:10:03 Hmm, well im trying to figure out why uio_pruss is seemingly doing nothing. it seems to get loaded, but the file system interfaces it should create are not, (and as such, the PRU loader doesnt work) Jun 24 03:10:20 Although. I think i'm just going to try again in the morning at this point. Jun 24 03:13:36 you have many options for that Jun 24 03:13:39 code inspection Jun 24 03:13:43 printks Jun 24 03:13:53 looking at logs Jun 24 03:13:59 jtag Jun 24 03:14:01 kgdb Jun 24 03:14:09 just to name a few Jun 24 03:14:10 Yeah, I just got a hold of the kernel source, and was going to try reading the code, and printks Jun 24 03:14:16 dmesg didnt show anything Jun 24 03:14:25 and im not sure if there are other relevant logs Jun 24 03:14:49 does this module match the kernel? Jun 24 03:14:52 i personally hate modules Jun 24 03:14:55 easier to debug kernels Jun 24 03:15:11 heh, Jun 24 03:15:49 what's the reason for messing with uio_pruss? Jun 24 03:17:17 well, it doesnt seem to be working on my board? I decided I would try to recompile and see if that helps anything Jun 24 03:18:21 but why are you messing with that? Jun 24 03:18:25 vs other things Jun 24 03:18:52 Well, I wrote some code for the PRU, but I am unable to test it until I can load it Jun 24 03:19:12 Ok Jun 24 03:19:23 IIRC, there are other ways of doing it w/o uio_pruss Jun 24 06:24:47 maybe it`s a dumb question but do i have any chance to break my nexus 7, powering the BBB from it? last night i restarted from nowhere when i did some debugging and since then i can`t read anymore from the device. *code unchanged* Jun 24 06:29:03 it is not impossible. In theory you are only allowed to draw something like 100ma before you do power negociation. First try a different device (e.g. usb mass storage) Jun 24 06:29:19 mouse worked Jun 24 06:30:42 but now doing lsusb on the n7 i can see my am335x vid/pid Jun 24 06:30:56 I did have to send my Galaxy SII one month after messing around with USB host (I have no idea if this was related). Jun 24 06:31:23 why are you powering the device like this BTW? Jun 24 06:34:15 did not have power cable Jun 24 06:34:19 jack power cable Jun 24 06:36:11 when u sent the S2 did any usb device worked? Jun 24 06:36:28 for me when i connect a mouse, or keyboard now on the n7 it worked Jun 24 06:36:39 it wasn't charging well any more Jun 24 06:36:47 for me works everything Jun 24 06:37:11 except this freaking AM335x ROM :) Jun 24 06:37:27 so more a power thing compared to a usb thing (if a mouse works all is fine) Jun 24 06:38:45 on the BBB the jack has power priority over the mini-usb? Jun 24 06:39:26 tested the mass storage with the N7 with the PC...it works Jun 24 06:39:55 yo need to ask this on the mailing list (I don't know). Jun 24 06:40:38 yes Jun 24 06:40:48 Power Jack, Battery input, USB Jun 24 06:41:03 you can look at the PMIC datasheet to confirm this. Jun 24 06:41:08 i have been able to switch power without de device powering down) Jun 24 06:41:40 HOWEVER Jun 24 06:41:52 you might want to undo the major F-up in U-boot Jun 24 06:42:00 they have it set to draw over 500mA Jun 24 06:42:10 and if you have a picky device, it can royally hose you Jun 24 06:42:39 now i`m powering the BBB from a legit 2A power source Jun 24 06:42:39 but on the BBB if you start on the power jack it increases the freq and draws > 500 mA Jun 24 06:42:50 yes Jun 24 06:43:01 but some hubs will kill your port if you go over 500mA Jun 24 06:43:08 that blew a day of my time Jun 24 06:43:24 and of the hw tech's time as I had to have him make hard mods to debug that Jun 24 06:44:45 think i did not break anything in my tablet, everything works normally. device enumerates good Jun 24 06:45:49 my dad told me it could have been possible that the n7 at the reboot could not power the BBB and the protection from the power source inside the n7 started the protection Jun 24 06:46:01 with a high freq => awkward sound Jun 24 06:46:02 yes Jun 24 06:46:23 the N7 has a boost converter to take 3volt-ish up to 5V Jun 24 06:46:29 that thing can get overloaded Jun 24 06:47:48 so powering the BBB from device can sometimes hurt your android Jun 24 08:02:03 av500: can you look a bit over my code? http://pastebin.com/4YTC4wQX Jun 24 08:03:59 same problem as yesterday it just gets invalid reading, it gets -1 at line 68,69. did all sort of tricks to check stuff but useless. last night my tablet jut rebooted and since then i cannot read anymore from the BBB, every other usb device works ok. tested the board with a linux to see if it sends packets over usb and it does Jun 24 08:04:24 hmm Jun 24 08:05:22 perhaps dmesg will give some clues or adb logcat Jun 24 08:05:44 keesj: http://pastebin.com/QZ528fbk dmesg when i connect the device Jun 24 08:06:03 no other dmesg message related to the BBB except the one pasted above Jun 24 08:06:19 just some random power management things from the tegra chip Jun 24 08:06:48 checked for permissions and my app has over the device. Jun 24 08:07:14 good Jun 24 08:09:05 i tried to ask on #android-dev channel but nobody there has experience with usb host communication Jun 24 08:10:27 also tried to recompile the kernel for my galaxy nexus to remove usb otg support but i think it cannot be done Jun 24 08:10:56 I don't have my usb-host adapter cable with me but I can try tonight (in 10 hours from now) Jun 24 08:11:18 if you have a branch I can pull from that would be nice. Jun 24 08:11:24 if you can try my code that will be really helpful Jun 24 08:11:43 also why not take is a step at the time and start with the jni + libusb on android? Jun 24 08:11:57 the master branch https://github.com/ungureanuvladvictor/BeagleDroid Jun 24 08:12:25 was thinking last night at this Jun 24 08:12:44 and now it seems a viable option Jun 24 08:19:07 btw your host is that a 32 of 64 bits machine (and did you try to compile with -m32)? Jun 24 08:20:28 i`m using android studio with default settings Jun 24 08:20:45 I mean your c code Jun 24 08:21:32 for the linux port ? Jun 24 08:21:41 don`t kinda get it... Jun 24 08:23:22 yes for the Linux port , can you try and compile your code to be 32 bits e.g. adding -m32 and checking it still works. (just to be sure) Jun 24 08:23:48 w8 need to reboot into linux, i`m on mac Jun 24 08:28:51 keesj: not exactly sure how to use it but i did like this in the makefile http://pastebin.com/MtGAkgiW Jun 24 08:29:49 got this http://pastebin.com/w4djRmDN . i installed libusb through apt-get, maybe it installed only 64bit lusb binary Jun 24 08:38:35 hmm. you can do a apt-get install libusb-1.0-0-dev:i386 Jun 24 08:47:01 (without the -dev.. ) as this removes the normal headers sorry Jun 24 10:18:04 mhmh have it, maybe the lib is in another folder Jun 24 14:45:55 av500: should i start thinking about JNI and libusb? i don`t know how it worked last night although i did a git commit with that code. now is not receiving anything from the board. Jun 24 14:53:41 hmm Jun 24 14:53:49 I would not give up that fast Jun 24 14:54:42 i`m out of debugging ideas Jun 24 14:55:24 also tried to remove otg from my galaxy nexus kernel but i cannot, the only way to get rid of CONFIG_USB_OTG=Y is to remove usb gadget support in the kernel and if i do that i get some compilation error Jun 24 14:56:50 vvu: well, you dont need to remove OTG Jun 24 14:56:57 you need to remove that one error check Jun 24 14:57:06 sure that is under CONFIG_OTG Jun 24 14:57:14 but a few // might have the same effect Jun 24 14:57:26 also, what error do you get? Jun 24 14:57:31 brb a second to switch to linux, maybe i can get it work Jun 24 14:57:38 why not stay in Linuix? Jun 24 14:59:27 ok, i`m back now Jun 24 15:00:28 any hint where i should look to remove that stuff? Jun 24 15:16:17 the error message Jun 24 15:16:21 I forgot what it was Jun 24 15:16:30 but we did look it up in the kernel Jun 24 15:16:34 paste the error Jun 24 15:17:21 did it Jun 24 15:17:25 it enumerates good Jun 24 15:17:51 so Jun 24 15:17:57 i just edited driver/usb/hub.c and just commented out all the #ifdef CONFIG_USB_OTG Jun 24 15:17:58 then you dont need to patch anything, no? Jun 24 15:18:04 ah Jun 24 15:18:09 need.. Jun 24 15:18:13 right Jun 24 15:18:30 this project has so many underlying things Jun 24 15:18:44 don`t know how others are but it`s fun to debug this stuff :) Jun 24 15:19:26 now lets see if my nexus 7 is bad or not, brb restart to osx Jun 24 15:19:49 why are you restarting all the time???? Jun 24 15:21:52 i have dual boot on my mac book pro. android stuff on osx i run it, have external display where i keep my IDE. if i try to connect my external display in linux all hell breaks loose and get a kernel panic Jun 24 15:24:22 as expected, does not work. same result a on my n7 Jun 24 15:31:15 av500: any trick in your sleeve to debug this thingie ? Jun 24 17:10:47 just wanted to confirm this: is there no I2C EEPROM on-board the BeagleBoard-xM like there is with the BBB? Jun 24 19:06:01 <_av500_> vvu: sorry, no idea so far Jun 24 20:20:40 keesj: had time to test my code with your device ? Jun 24 20:26:58 re Jun 24 20:27:30 "re"? Jun 24 20:27:46 something like "re hi" I think Jun 24 20:28:03 if so hello! Jun 24 20:28:22 http://www.urbandictionary.com/define.php?term=re Jun 24 20:29:04 fair enough Jun 24 20:30:30 I did have a quick look at the c code. Jun 24 20:30:44 http://pastebin.com/KJukqjcV I also patches the Makefile a little Jun 24 20:31:15 how much programming experience do you have? Jun 24 20:31:16 so JNI is then? Jun 24 20:31:56 programming experience not so so much, more like programming by the "it works, leave it like that" stance Jun 24 20:32:09 my code is very redundant the C one Jun 24 20:32:09 ok. Jun 24 20:32:28 do you like it ? Jun 24 20:32:47 the C one at this point no. Jun 24 20:32:56 do you like programming? Jun 24 20:33:11 programming, *sorry for caps* A LOT! Jun 24 20:33:16 not talking about the code just trying to understand your motivation. Jun 24 20:33:34 your proposal also contained quite a few UI related elements. Jun 24 20:33:45 i really like this code+hardware thingie Jun 24 20:35:24 UI don`t really have the hang of it but tried to learn as much as i could form an university course, had some lectures of UI design Jun 24 20:39:05 don`t really know if i`m on the right track with the programming part, but i`m feeling i`m going good Jun 24 20:43:07 keesj: tried my java code with a Galaxy Nexus, same result just timeouts when needs to receive data. i think i need to study a bit your libusb stuff from github and modify my C code then JNI that library. Jun 24 20:44:18 yes or just start whith a JNI on Android tutorial Jun 24 20:44:26 (download the NDK) and such. Jun 24 20:44:39 yep, read 2day some stuff about it Jun 24 20:45:35 you did major changes to libusb in order to integrate it good with java? Jun 24 20:46:46 well kinda but you don't really need that either Jun 24 20:47:24 i read something on stackoverflow that the part with the filedescriptor needs to be adapted, or maybe i`m wrong. Jun 24 20:47:37 you can for now also just grab the one you mentioned in your proposel Jun 24 20:47:55 yep, but 1st some helloWorld stuff Jun 24 20:48:27 yes, that's right. In Android the premissions model is not based on Unix permissions. Jun 24 20:48:52 it's ratther a more high level thing. Jun 24 20:49:23 and the some system service will open the device for you and pass you the file descriptor (using the binder RPC framework) Jun 24 20:49:44 that's why you can't access these devices (if you are not root) Jun 24 20:50:31 also you don't really need to port (or use libusb) either. Jun 24 20:50:48 libusb process and my main process right? Jun 24 20:51:17 you can also use the kernel headers / interface or the usb access lib that android created. Jun 24 20:53:10 I *think* you can just clone https://github.com/keesj/librtlsdr-android and remove most rtl related stuff Jun 24 20:53:17 you will have to keep the libusb in lib Jun 24 20:54:25 yes, but i tend to build from scratch my own stuff. Jun 24 20:54:35 https://github.com/keesj/librtlsdr-android/blob/android/src/libusbhelper.c is the jni code Jun 24 20:55:47 https://github.com/keesj/android-rtlsdr/blob/master/src/rtlsdr/android/MainActivity.java#L50 contains the java part Jun 24 20:56:56 it's a nice answer and you might learn something but GSoC is also about getting work done "the flipping bits" part. Jun 24 20:57:42 there is no shame is using other code (it is a great way to learn) as long as the license permits Jun 24 20:58:34 it takes *years* to unsertand everything from bootloaders to kernel , usb , android , java. Jun 24 20:59:33 so better try to get work done. Good Artists Borrow, Great Artists ... Jun 24 21:00:46 and also if you want to learn look at the compiler errors your code produces :P Jun 24 21:01:29 first need to solve all C problems :) did some nasty things there Jun 24 21:01:56 i think a good plan is to keep the init/send/receive/close on the JNI part and the rest do in plain java Jun 24 21:02:02 just pass the byte[] there Jun 24 21:08:40 the problem is that you don't know the problem and you changed multiple things Jun 24 21:09:11 so the first step should be to compile you code "as is" and run it on Android from the command line Jun 24 21:10:28 e.g not using JNI Jun 24 21:12:32 at least that's what I would do (or some the usbmon output and compare that to the c code) Jun 24 21:17:37 can't find my adapter cable. that takes away a big part of the fun Jun 24 21:17:46 :) Jun 24 21:18:53 can i crosscompile libusb using the compiler i used to build the kernel for my devices? should be right think so Jun 24 21:19:32 no, not really Jun 24 21:20:06 libusb depdend on it's own libc. Jun 24 21:21:46 https://github.com/keesj/librtlsdr-android/blob/android/libusb.diff ( or http://android.serverbox.ch/?p=151 ) Jun 24 21:22:15 the latter has exact steps and shows you can run normal commands Jun 24 21:22:52 so for short best is to download the NDK and follow the steps (the NDK contains a toolchain) Jun 24 21:23:15 (I'm off) Jun 24 21:23:24 thx for all the tips! Jun 24 21:23:32 np Jun 25 00:08:34 keesj: i downloaded full android source code, have there all the tools. followed the instructions on the android.serverbox site and i get some awkward http://pastebin.com/kdG9qSY3 Jun 25 00:09:07 my Android.mk is the same as yours *took from the diff*, same result with Android.mk from the website Jun 25 00:16:15 jj2baile, afternoon Jun 25 01:27:08 ka6sox: hey. can you think of reasons why uio_pruss would not work? Like conflicts with other things or bugs or something. Jun 25 01:31:18 jj2baile, nope Jun 25 01:31:26 do you have a dmesg for me to look at? Jun 25 01:39:57 dmesg showed nothing abnormal Jun 25 01:40:20 gadget: rndis req21.00 v0000 i0000 l12 Jun 25 01:40:25 things like that entirely ^ Jun 25 01:41:52 also briefly tried adding printks to the module code, nothing showed up in dmesg as well :p Jun 25 01:42:05 i'm going to resume trying to figure this out tomorrow i think. Jun 25 01:42:43 okay, ask panto in your morning... Jun 25 01:42:55 I'm duplicating what you are doing now... Jun 25 01:43:06 do you have a small programme you have loaded? Jun 25 01:43:12 (and can you send it to me?) Jun 25 01:43:53 yeah i wrote a small program, but it, nor any of the included example apps worked. they all failed with the library being unable to open the pru Jun 25 01:44:10 (which seems to happen because the things on the file system uio_pruss are supposed to create, are not there Jun 25 01:44:31 should I email you my test program? I have no guarantee it works though, since when i was about to test it i came across this issue :P Jun 25 02:05:08 jj2baile, ka6sox, is this stuff in github? I'd like to stab at it tomorrow, I feel I'm missing out some and need to get into the loop Jun 25 02:05:23 Ah yes, I made the repo but have yet to push code Jun 25 02:05:38 ok, once you do, just ping me Jun 25 02:05:40 bradfa: Ill push some stuff tomorrow afternoon probably Jun 25 02:05:41 and let me know Jun 25 02:05:42 no rush Jun 25 02:05:42 sure thing Jun 25 02:52:13 bradfa: https://github.com/zecozephyr/PRUJTAG **** ENDING LOGGING AT Tue Jun 25 02:59:58 2013