**** BEGIN LOGGING AT Sat Jul 22 03:00:04 2017 Jul 22 03:24:03 ? Jul 22 03:29:25 ravikp7: you need to emit an event upon device detection. Jul 22 03:33:43 ravikp7: the statefulness around getting ARP and TFTP requests in a certain order should be removed. You should just get packets and look at them, then handle them. Jul 22 03:35:41 ravikp7: I don't like the style of using promises to setTimeout.... just isn't clear to me why. Jul 22 03:46:31 jkridner: are you checking dev branch? I've pushed code to main branch Jul 22 03:48:03 jkridner: no promises used, all code event driven. Event is emitted on device detection Jul 22 03:48:49 ravikp7: but "() => " Jul 22 03:49:24 jkridner: without a delay, spl device fails to broadcast bootp :( Jul 22 03:51:31 ravikp7: k.... guess I'm just not familiar with "arrow functions" Jul 22 03:52:02 a simple anonymous function would seem sufficient.... or, even better, just name a function. Jul 22 03:52:21 jkridner: k.. Jul 22 03:52:28 * jkridner reads https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions to try to understand Jul 22 03:53:28 ravikp7: seems my problem right now is hardware related.... I'm detecting devices (added some code to provide 'progress' events on any device detection), but I'm not seeing my AM335x ROM show up. Jul 22 03:56:01 jkridner: it perfectly works for me, try listing all usb devices to see if got detected Jul 22 03:56:46 https://pastebin.com/xbj8jKy4 Jul 22 03:58:47 https://pastebin.com/qGzb1gRa <--- initially plugged with my board connected.... then unplugged/plugged in the hub I'm using. Jul 22 03:59:11 hub apparently has a serial device built-in. Jul 22 03:59:43 so, I think I'm having some hardware problem. I'm going to try yet another USB cable. Jul 22 04:00:07 ok Jul 22 04:05:23 rebooting Jul 22 04:13:55 ravikp7: k, rebooting helped. Jul 22 04:13:58 getting "Error: Can't claim interface Error: LIBUSB_ERROR_ACCESS " now Jul 22 04:15:07 jkridner: disbaled other kexts, using hoRNDIS ? Jul 22 04:17:23 we need to make the recommendation to run "sudo kextunload /System/Library/Extensions/HoRNDIS.kext" or even the option to run it part of the app. Jul 22 04:17:40 yes, I'd forgotten to disable it again. Jul 22 04:19:06 now dies at "{ description: 'uboot =>', complete: 45 } " Jul 22 04:19:15 "Error: LIBUSB_ERROR_NOT_FOUND " Jul 22 04:20:33 jkridner: same as our last status, windows and osx can't read the config descriptor of spl device Jul 22 04:21:03 k Jul 22 04:25:47 jkridner: I've got access to a pc running osx, I can now also test things there Jul 22 04:26:30 https://github.com/tessel/node-usb/issues/61 Jul 22 04:28:03 ravikp7: which configurations will we use? Jul 22 04:28:58 ravikp7: it'll be nice when you remove state and the app could continue where it left off. Jul 22 04:29:22 jkridner: config with two interfaces Jul 22 04:29:36 ravikp7: which config is that? Jul 22 04:29:42 different for SPL vs. uboot? Jul 22 04:29:47 er, ROM vs. SPL? Jul 22 04:30:31 can't remember, different i guess, will check now Jul 22 04:32:23 jkridner: that state management was just temporary to test things, will not rely on that. will use Redux to manage state of whole app in a place Jul 22 04:35:24 ravikp7: https://pastebin.com/qrAmHhvM Jul 22 04:36:58 jkridner: console.log(interface) and check if it reads the interfaces Jul 22 04:37:11 I guess it shows 0 interfaces Jul 22 04:37:29 well, we know it is 'undefined' based on the error. Jul 22 04:38:48 I might not need to do the second open. Jul 22 04:39:04 Set the device configuration to something other than the default (0). To use this, first call .open(false) (which tells it not to auto configure), then before claiming an interface, call this method. Jul 22 04:39:10 setConfiguration doc says ^^^ Jul 22 04:40:09 grrrr... "Error: Device must be open before searching for interfaces" Jul 22 04:45:05 tried all this on Windows also, no success Jul 22 04:45:16 jkridner: https://pastebin.com/mTiwmqsL Jul 22 04:45:42 jkridner: device.configdescriptor Jul 22 04:46:01 rom shows , spl device doesn't Jul 22 04:46:43 my patch above moves a bit past that. Jul 22 04:47:17 but, configuration 1 seems to not have any valid interfaces..... need to figure out the right configuration. Jul 22 04:47:26 * jkridner is looking at http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-arm.git;a=blob;f=drivers/usb/gadget/rndis.c;h=48463db0b2f594c29fcfa53da43a2245a32bafe4;hb=HEAD Jul 22 04:50:46 .allConfigDescriptors seems to be undefined. :( Jul 22 04:51:06 yeah Jul 22 04:51:18 numConfigurations == 2 Jul 22 04:51:27 but why can't I get descriptors for them? Jul 22 04:51:31 jkridner: must be fine there in uboot, that's why it works on linux. not? Jul 22 04:51:51 jkridner: works on linux, you wanna see logs? Jul 22 04:52:11 if the logs specify the configuration used. Jul 22 04:52:30 jkridner: it shows config used on linux Jul 22 04:52:58 wait a min, showing you Jul 22 04:58:55 jkridner: https://pastebin.com/0QkVAx98 device.configDescriptor after device.open() Jul 22 04:59:29 jkridner: shows config with two interfaces for spl device also Jul 22 05:00:03 configuration 9?? Jul 22 05:01:39 jkridner: havn't noticed that till now Jul 22 05:02:01 linux uses that config by default Jul 22 05:02:32 it's just config id, I guess Jul 22 05:03:16 jkridner: there's 1 config with rom device, and 2 with spl device. I've checked that with usb analyzer tool Jul 22 05:04:52 jkridner: there's a kext in BBBlfs OSX branch https://github.com/ungureanuvladvictor/BBBlfs/tree/osx/bbblfs-codeless-kext , wondering what's that for Jul 22 05:06:37 jkridner: do you know the status of BBBlfs on OSX? was it able to transfer uboot? Jul 22 05:09:45 jkridner: I used the usb analyzer tool on Windows, should I check on Linux? Jul 22 05:10:10 sure. Jul 22 05:10:32 ok, trying that Jul 22 05:17:30 jkridner: node-usb is showing two configurations for spl device and the config used is showing index 9. Index numbers can be arbitrary ? Jul 22 05:17:42 dunno Jul 22 05:17:55 been too long since I read the spec on USB. Jul 22 05:18:15 index might be to the descriptors. Jul 22 05:18:21 and not the ID itself. Jul 22 05:18:32 descriptor indexes are arbitrary. Jul 22 05:18:55 getDescriptor is a generic USB operation. Jul 22 05:19:20 jkridner: so, no problem with index 9 , right? Jul 22 05:20:28 and no need to check with usb-mon on linux ? as it's clear, there are two configs Jul 22 05:23:15 jkridner: should I try the BBBlfs OSX branch, to make sure node-usb is not causing the problem ? Jul 22 05:23:32 we should compare at least. Jul 22 05:23:52 jkridner: going to try it now Jul 22 05:26:46 nothing special here: https://github.com/ungureanuvladvictor/BBBlfs/blob/osx/src/main.c#L374 Jul 22 05:28:46 just to make sure node-usb isn't having some bug Jul 22 05:30:01 hmmm... don't see https://github.com/ungureanuvladvictor/BBBlfs/blob/osx/bbblfs-codeless-kext/bbblfs-codeless-kext/Info.plist having any descriptor setting info. vvu? Jul 22 05:45:29 k, got the interface claimed. Jul 22 05:45:41 setConfiguration is async. not clear from the API description. Jul 22 05:45:49 had to go look at the code a bit. Jul 22 05:49:25 ravikp7: https://pastebin.com/vUVPEwya Jul 22 05:49:59 wrong configuration? Jul 22 05:50:50 jkridner: uboot got transferred on mac, I saw a drive got detected Jul 22 05:51:02 jkridner: with BBBlfs Jul 22 05:51:07 k. did you use the kext? Jul 22 05:51:42 no, just used the instructions on readme, not sure if isn't included or not Jul 22 05:51:55 *is included Jul 22 05:55:03 jkridner: it shows warning dialog box, The disk you inserted was not readable by this computer. Jul 22 05:55:29 with buttons initialize, ignore and eject Jul 22 05:57:04 after initialize, it shows in disk utility Jul 22 05:58:42 libusb note: "Note: the device should not be bound to a kernel driver. You can use a codeless kext to achieve that if there is a kernel driver (eg: HID or USB Mass Storage) which already binds to the device." Jul 22 05:59:01 so, it works around unloading HoRNDIS. Jul 22 06:04:07 jkridner: can't figure out if it used the kext to transfer uboot Jul 22 06:04:33 jkridner: did you try running it? Jul 22 06:09:33 kext isn't installed, so kext not used Jul 22 06:14:54 jkridner: node-usb has a new pre-release version 1.3.0 , it also fixes allConfigDescriptors, we should try that now Jul 22 06:17:56 kext is just to avoid other drivers grabbing it. not required. Jul 22 06:24:10 jkridner: with node-usb 1.3.0 I can see config with 2 interfaces for spl device Jul 22 06:24:23 just going to try setting it Jul 22 06:25:57 ?? latest is 1.2.0 per LIBUSB_TRANSFER_ERROR Jul 22 06:26:06 er, per https://www.npmjs.com/package/usb Jul 22 06:29:55 jkridner: github pre-release Jul 22 06:30:41 can't set config before opening device, and device can't be opened :( Jul 22 06:31:05 jkridner: https://github.com/tessel/node-usb/releases Jul 22 06:32:48 on 1.2.0, I'm getting 2 interfaces. Jul 22 06:32:58 for the u-boot device. Jul 22 06:34:35 jkridner: on osx, the default config for spl device was showing 0 interfaces, not? Jul 22 06:35:18 device.allConfigDescriptors is now working in usb 1.3.0 Jul 22 06:35:36 I need sleep. Jul 22 06:35:49 SPL is showing two interfaces on config 2. Jul 22 06:35:55 I pasted that earlier. Jul 22 06:36:20 I'm getting stalls on the SPL TFTP transfer of uboot. Jul 22 06:37:31 night~ Jul 22 06:37:33 night! Jul 22 06:37:37 jkridner: the stalls are due to rndis_init code, it should not affect functionality, as spl got transferred Jul 22 06:37:55 jkridner: ok, will talk to u later, good night Jul 22 14:01:11 ravikp7: https://pastebin.com/SUFtDDF3 <-- trying to look at the interface Jul 22 14:02:58 jkridner: I was able to claim the interface, but bootp doesn't broadcast Jul 22 14:03:08 ditto Jul 22 14:03:21 I was wondering if the endpoint was correct. Jul 22 14:03:49 jkridner: it's working with BBBlfs Jul 22 14:03:57 different SPL, no? Jul 22 14:05:42 jkridner: same spl Jul 22 14:06:10 let me check Jul 22 14:07:47 with configDescriptor: https://pastebin.com/y7W35NCC Jul 22 14:11:04 do you handle the interrupt endpoint (0x82) Jul 22 14:11:08 jkridner: spl is different, I tried with BBBlfs's OSX branch spl with this node server, it's working Jul 22 14:12:09 jkridner: different versions of uboot showing different behavior Jul 22 14:13:05 jkridner: no, not using interrupt handler Jul 22 14:14:26 jkridner: we need to get latest uboot working Jul 22 14:14:55 yeah. if we can identify the delta, then is is possible to notify the u-boot list, but we need the mainline version working. Jul 22 14:16:12 http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot/u-boot-arm.git;a=blob;f=drivers/usb/gadget/rndis.c;h=48463db0b2f594c29fcfa53da43a2245a32bafe4;hb=HEAD#l49 Jul 22 14:16:45 interrupt is only IN by my understanding, so not sure what we need to do with it. Jul 22 14:20:05 jkridner: so code wise we get linux and os x working, only windows left, tried on windows, the config 2 can't be set Jul 22 14:21:59 I did getStringDescriptor on configuration 2 and it is iConfiguration = RNDIS Jul 22 14:27:14 where is your uboot config file? Jul 22 14:28:01 just interesting it works in Linux. Jul 22 14:29:20 jkridner: latest isn't working on linux Jul 22 14:29:25 oh? Jul 22 14:30:08 jkridner: you checked latest on os x? Jul 22 14:30:37 what do you mean by latest? I was using what you checked in last night for me. Jul 22 14:30:46 your built versions of SPL/uboot. Jul 22 14:30:48 in the repo. Jul 22 14:31:52 jkridner: I'm using uboot built by me from latest sources, but spl built from latest sources never worked, so was using old from BBBlfs as it worked Jul 22 14:32:12 all my deltas are in the latest pastebin Jul 22 14:37:41 jkridner: I just added this before device.open() Jul 22 14:37:44 if(file==='uboot') {device.open(false); device.setConfiguration(2, function(err){console.log(err);}); device.__open(); device.__claimInterface(0); } Jul 22 14:38:46 jkridner: and the rndis init via control transfer was also not required for the spl device Jul 22 14:38:47 are those needed? note that the device won't be open until you get the setConfiguration callback. Jul 22 14:39:46 it just worked this way out of many tries Jul 22 14:47:58 jkridner: spl built from latest sources not working with os x too, just checked it Jul 22 14:50:07 jkridner: for now, the spl from BBBlfs os x branch can transfer uboot both on linux and os x, should I push it to the repo for now ? Jul 22 14:58:47 jkridner: its version is 2014.07 **** ENDING LOGGING AT Sun Jul 23 03:00:01 2017