Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. playdoh:node-beagle-boot jason$ sudo npm start
  2.  
  3. > beagle-boot@1.0.4 start /Users/jason/workspace/node-beagle-boot
  4. > node test.js
  5.  
  6. { description: 'Connected to {"busNumber":20,"deviceAddress":25,"deviceDescriptor":{"bLength":18,"bDescriptorType":1,"bcdUSB":512,"bDeviceClass":2,"bDeviceSubClass":0,"bDeviceProtocol":0,"bMaxPacketSize0":64,"idVendor":1105,"idProduct":24897,"bcdDevice":0,"iManufacturer":33,"iProduct":37,"iSerialNumber":0,"bNumConfigurations":1},"portNumbers":[1,1]}',
  7. complete: 0 }
  8. { description: 'spl =>', complete: 0 }
  9. { description: 'Interface claimed', complete: 5 }
  10. { Error: LIBUSB_TRANSFER_STALL errno: 4 }
  11. <Buffer 02 00 00 80 34 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 2c 06 00 00 00 00 00 00 00 00 00 00 00 00 ... >
  12. { Error: LIBUSB_TRANSFER_STALL errno: 4 }
  13. <Buffer 05 00 00 80 10 00 00 00 17 00 00 00 00 00 00 00>
  14. { description: 'BOOTP received', complete: 10 }
  15. { description: 'BOOTP reply done', complete: 15 }
  16. { description: 'ARP request received', complete: 20 }
  17. { description: 'ARP response sent', complete: 25 }
  18. { description: 'TFTP request received', complete: 30 }
  19. { description: 'spl transfer starts', complete: 35 }
  20. { description: 'spl transfer complete', complete: 40 }
  21. { description: 'Connected to {"busNumber":20,"deviceAddress":26,"deviceDescriptor":{"bLength":18,"bDescriptorType":1,"bcdUSB":512,"bDeviceClass":2,"bDeviceSubClass":0,"bDeviceProtocol":0,"bMaxPacketSize0":64,"idVendor":1317,"idProduct":42146,"bcdDevice":789,"iManufacturer":1,"iProduct":2,"iSerialNumber":0,"bNumConfigurations":2},"portNumbers":[1,1]}',
  22. complete: 0 }
  23. { description: 'uboot =>', complete: 45 }
  24. /Users/jason/workspace/node-beagle-boot/main.js:90
  25. if(interface.isKernelDriverActive()){
  26. ^
  27.  
  28. TypeError: Cannot read property 'isKernelDriverActive' of undefined
  29. at EventEmitter.<anonymous> (/Users/jason/workspace/node-beagle-boot/main.js:90:21)
  30. at emitThree (events.js:116:13)
  31. at EventEmitter.emit (events.js:195:7)
  32. at Timeout.setTimeout [as _onTimeout] (/Users/jason/workspace/node-beagle-boot/main.js:59:37)
  33. at ontimeout (timers.js:365:14)
  34. at tryOnTimeout (timers.js:237:5)
  35. at Timer.listOnTimeout (timers.js:207:5)
  36.  
  37. npm ERR! Darwin 16.6.0
  38. npm ERR! argv "/usr/local/Cellar/node/7.5.0/bin/node" "/usr/local/bin/npm" "start"
  39. npm ERR! node v7.5.0
  40. npm ERR! npm v4.1.2
  41. npm ERR! code ELIFECYCLE
  42. npm ERR! beagle-boot@1.0.4 start: `node test.js`
  43. npm ERR! Exit status 1
  44. npm ERR!
  45. npm ERR! Failed at the beagle-boot@1.0.4 start script 'node test.js'.
  46. npm ERR! Make sure you have the latest version of node.js and npm installed.
  47. npm ERR! If you do, this is most likely a problem with the beagle-boot package,
  48. npm ERR! not with npm itself.
  49. npm ERR! Tell the author that this fails on your system:
  50. npm ERR! node test.js
  51. npm ERR! You can get information on how to open an issue for this project with:
  52. npm ERR! npm bugs beagle-boot
  53. npm ERR! Or if that isn't available, you can get their info via:
  54. npm ERR! npm owner ls beagle-boot
  55. npm ERR! There is likely additional logging output above.
  56.  
  57. npm ERR! Please include the following file with any support request:
  58. npm ERR! /Users/jason/workspace/node-beagle-boot/npm-debug.log
  59. playdoh:node-beagle-boot jason$ git diff
  60.  
  61.  
  62.  
  63. diff --git a/main.js b/main.js
  64. index 6d216f5..071a15d 100644
  65. --- a/main.js
  66. +++ b/main.js
  67. @@ -50,6 +50,7 @@ exports.usbMassStorage = function(){
  68.  
  69. // Connect to BeagleBone
  70. usb.on('attach', function(device){
  71. + emitterMod.emit('progress', {"description": "Connected to " + JSON.stringify(device), "complete": 0});
  72.  
  73. if(device === usb.findByIds(ROMVID, ROMPID))
  74. emitter.emit('init', 'spl', device, 0x02);
  75. @@ -74,6 +75,10 @@ emitter.on('init', function(file, device, outEnd){
  76. emitterMod.emit('progress', {description: description, complete: percent});
  77. percent += 5;
  78.  
  79. + if(platform == 'darwin' && file == 'uboot') {
  80. + device.open(false);
  81. + device.setConfiguration(1);
  82. + }
  83. device.open();
  84. var interface = device.interface(1); // Select interface 1 for BULK tran
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement