{"action":"closed","issue":{"url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/499","repository_url":"https://api.github.com/repos/bbcmicrobit/micropython","labels_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/499/labels{/name}","comments_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/499/comments","events_url":"https://api.github.com/repos/bbcmicrobit/micropython/issues/499/events","html_url":"https://github.com/bbcmicrobit/micropython/issues/499","id":305244060,"number":499,"title":"Using radio.send/receive in a tight loop results in \"data packet received is not a string\"","user":{"login":"romilly","id":149310,"avatar_url":"https://avatars2.githubusercontent.com/u/149310?v=4","gravatar_id":"","url":"https://api.github.com/users/romilly","html_url":"https://github.com/romilly","followers_url":"https://api.github.com/users/romilly/followers","following_url":"https://api.github.com/users/romilly/following{/other_user}","gists_url":"https://api.github.com/users/romilly/gists{/gist_id}","starred_url":"https://api.github.com/users/romilly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romilly/subscriptions","organizations_url":"https://api.github.com/users/romilly/orgs","repos_url":"https://api.github.com/users/romilly/repos","events_url":"https://api.github.com/users/romilly/events{/privacy}","received_events_url":"https://api.github.com/users/romilly/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-03-14T16:53:42Z","updated_at":"2018-03-16T03:17:31Z","closed_at":"2018-03-16T03:17:31Z","author_association":"NONE","body":"Issue #357 is marked closed, but the problem is still alive and easily reproducible.\r\n\r\n_On micro:bit A_\r\n ```\r\n   import radio\r\n    radio.on()\r\n    while True:\r\n        radio.send('flash')\r\n```\r\n\r\n_On micro:bit B_\r\n   ```\r\n import radio\r\n   radio.on()\r\n   while True:\r\n       try:\r\n           incoming = radio.receive()\r\n       except Exception as e:\r\n           print('aargh %s' % e)\r\n           radio.off()\r\n           radio.on()\r\n           continue\r\n       if incoming == 'flash':\r\n           print('blink')\r\n```\r\n--------------------------\r\nYou'll see lots of blinks, and an 'aargh data packet received is not a string' after every few blinks.\r\n\r\nThe radio.off(); radio.on() clears the error, allowing normal reception to resume.\r\n\r\n"}}
{"actor":{"display_login":"dpgeorge"}}