{"action":"created","issue":{"url":"https://api.github.com/repos/TMRh20/RF24/issues/162","labels_url":"https://api.github.com/repos/TMRh20/RF24/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/TMRh20/RF24/issues/162/comments","events_url":"https://api.github.com/repos/TMRh20/RF24/issues/162/events","html_url":"https://github.com/TMRh20/RF24/issues/162","id":115984072,"number":162,"title":"python wrapper doesn't work until after I've run the C code first","user":{"login":"marc-gist","id":4084427,"avatar_url":"https://avatars.githubusercontent.com/u/4084427?v=3","gravatar_id":"","url":"https://api.github.com/users/marc-gist","html_url":"https://github.com/marc-gist","followers_url":"https://api.github.com/users/marc-gist/followers","following_url":"https://api.github.com/users/marc-gist/following{/other_user}","gists_url":"https://api.github.com/users/marc-gist/gists{/gist_id}","starred_url":"https://api.github.com/users/marc-gist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marc-gist/subscriptions","organizations_url":"https://api.github.com/users/marc-gist/orgs","repos_url":"https://api.github.com/users/marc-gist/repos","events_url":"https://api.github.com/users/marc-gist/events{/privacy}","received_events_url":"https://api.github.com/users/marc-gist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-09T22:40:41Z","updated_at":"2015-11-13T06:09:11Z","closed_at":null,"body":"So I've noticed some strange behaviour.\r\n\r\nIf I startup my raspberryPi, run the rxRF24Network/hellowworld_rx.py\r\nNothing is ever received (displayed on screen).\r\n\r\nIf I run examples_RPi/hellowworld_rx\r\n(the C++ program), it receives the data fine.\r\n\r\nIf I then run the python code, it will now work fine.\r\n\r\nany ideas?\r\n\r\nall commands are run \"sudo\""},"comment":{"url":"https://api.github.com/repos/TMRh20/RF24/issues/comments/156335013","html_url":"https://github.com/TMRh20/RF24/issues/162#issuecomment-156335013","issue_url":"https://api.github.com/repos/TMRh20/RF24/issues/162","id":156335013,"user":{"login":"mz-fuzzy","id":9771301,"avatar_url":"https://avatars.githubusercontent.com/u/9771301?v=3","gravatar_id":"","url":"https://api.github.com/users/mz-fuzzy","html_url":"https://github.com/mz-fuzzy","followers_url":"https://api.github.com/users/mz-fuzzy/followers","following_url":"https://api.github.com/users/mz-fuzzy/following{/other_user}","gists_url":"https://api.github.com/users/mz-fuzzy/gists{/gist_id}","starred_url":"https://api.github.com/users/mz-fuzzy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mz-fuzzy/subscriptions","organizations_url":"https://api.github.com/users/mz-fuzzy/orgs","repos_url":"https://api.github.com/users/mz-fuzzy/repos","events_url":"https://api.github.com/users/mz-fuzzy/events{/privacy}","received_events_url":"https://api.github.com/users/mz-fuzzy/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T06:09:11Z","updated_at":"2015-11-13T06:09:11Z","body":"> With the RF24Network helloworld_rx example, it seems I have to change the line ms, number = unpack('<qi', payload) to ms, number = unpack('<ii', payload) or I get an error: struct.error: unpack requires a string argument of length 12 I could have sworn I tested this before...\r\n*edit to add: Must have tested with two RPi I'm thinking, and using different lengths for millis()...\r\n\r\ncorrect, c-rpi and arduino examples use 2 longs to send, so in order to make it compatible, python example should be changed to pack/unpack \"<ii\" in both helloworld_tx and helloworld_rx, and reading should expect 8 bytes there."}}