{"action":"created","issue":{"url":"https://api.github.com/repos/thiagorp/bbb-nrf24l01/issues/1","labels_url":"https://api.github.com/repos/thiagorp/bbb-nrf24l01/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/thiagorp/bbb-nrf24l01/issues/1/comments","events_url":"https://api.github.com/repos/thiagorp/bbb-nrf24l01/issues/1/events","html_url":"https://github.com/thiagorp/bbb-nrf24l01/issues/1","id":53999600,"number":1,"title":"failed to find device tree bspm_P9_17_f","user":{"login":"MarkSwanson","id":122992,"avatar_url":"https://avatars.githubusercontent.com/u/122992?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkSwanson","html_url":"https://github.com/MarkSwanson","followers_url":"https://api.github.com/users/MarkSwanson/followers","following_url":"https://api.github.com/users/MarkSwanson/following{/other_user}","gists_url":"https://api.github.com/users/MarkSwanson/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkSwanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkSwanson/subscriptions","organizations_url":"https://api.github.com/users/MarkSwanson/orgs","repos_url":"https://api.github.com/users/MarkSwanson/repos","events_url":"https://api.github.com/users/MarkSwanson/events{/privacy}","received_events_url":"https://api.github.com/users/MarkSwanson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-11T18:20:20Z","updated_at":"2015-01-17T21:54:22Z","closed_at":"2015-01-17T21:54:22Z","body":"I modified /usr/local/lib/node_modules/bonescript/my.js around line 57:\r\n\r\n            if (!slot) {\r\n                if(debug) winston.debug('Failed to write device tree fragment to slots. name: ' + name);\r\n            }\r\n            else if(slot[0]) {\r\n\r\nMy simple test program:\r\n\r\nvar nrf = require('bbb-nrf24l01');\r\nnrf.spiDev = '/dev/spidev1.0'; // This always needs to be the first property to be set\r\nnrf.channel = 0; //0 - 127 and 0 - 84 in the US\r\nnrf.payload = 4; //Size in bytes of the payload\r\nnrf.address = 'serve'; //Address for receiving messages (Must be 5 bytes long)\r\nnrf.startReceiving();\r\nconsole.log(\"receiving...\");\r\nif (nrf.dataReady()) {\r\n  var data = nrf.getData(); // Returns a Buffer object with the data received\r\n}\r\n\r\nWhen I run it I get:\r\n\r\n# node ./t.js\r\nerror: Failed to find devicetree fragment: bspm_P9_17_f\r\ninfo:  0: 54:PF---\r\n 1: 55:PF---\r\n 2: 56:PF---\r\n 3: 57:PF---\r\n 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G\r\n 5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI\r\n 7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPIDEV0\r\n 8: ff:P-O-L Override Board Name,00A0,Override Manuf,bspm_P9_16_f\r\n\r\ninfo: Error loading devicetree overlay for P9_17 using template bspm\r\nerror: Unable to write to /sys/class/gpio/gpio5/value\r\n\r\n# ls /sys/class/gpio\r\n./  ../  export  gpio115@  gpio117@  gpio51@  gpiochip0@  gpiochip32@  gpiochip64@  gpiochip96@  unexport\r\n\r\nI'm not sure why gpio5 is being used. It's as if the mode isn't set right. We should be using mode 0, but if we were in mode 7 then it would be gpio0[5] (instead of mode 0 spi0_cs0).\r\n\r\nI'm assuming the device tree config for BB-SPIDEV0 sets the pins into mode 0?\r\n\r\nAny suggestions?\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/thiagorp/bbb-nrf24l01/issues/comments/70386004","html_url":"https://github.com/thiagorp/bbb-nrf24l01/issues/1#issuecomment-70386004","issue_url":"https://api.github.com/repos/thiagorp/bbb-nrf24l01/issues/1","id":70386004,"user":{"login":"MarkSwanson","id":122992,"avatar_url":"https://avatars.githubusercontent.com/u/122992?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkSwanson","html_url":"https://github.com/MarkSwanson","followers_url":"https://api.github.com/users/MarkSwanson/followers","following_url":"https://api.github.com/users/MarkSwanson/following{/other_user}","gists_url":"https://api.github.com/users/MarkSwanson/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkSwanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkSwanson/subscriptions","organizations_url":"https://api.github.com/users/MarkSwanson/orgs","repos_url":"https://api.github.com/users/MarkSwanson/repos","events_url":"https://api.github.com/users/MarkSwanson/events{/privacy}","received_events_url":"https://api.github.com/users/MarkSwanson/received_events","type":"User","site_admin":false},"created_at":"2015-01-17T21:54:22Z","updated_at":"2015-01-17T21:54:22Z","body":"It turns out that both the \r\n/lib/firmware/ADAFRUIT-SPI0-00A0.dtbo\r\nand\r\n/lib/firmware/BB-SPIDEV0-00A0.dtbo\r\noverlays were broken.\r\nI used an overlay I found and I was able to work around this problem.\r\n"}}