{"action":"created","issue":{"url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/39","labels_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/39/comments","events_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/39/events","html_url":"https://github.com/intel-iot-devkit/mraa/issues/39","id":49459859,"number":39,"title":"mraa_uart_init is failing on Edison Breakout Board","user":{"login":"Sorbier","id":9851996,"avatar_url":"https://avatars.githubusercontent.com/u/9851996?v=3","gravatar_id":"","url":"https://api.github.com/users/Sorbier","html_url":"https://github.com/Sorbier","followers_url":"https://api.github.com/users/Sorbier/followers","following_url":"https://api.github.com/users/Sorbier/following{/other_user}","gists_url":"https://api.github.com/users/Sorbier/gists{/gist_id}","starred_url":"https://api.github.com/users/Sorbier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sorbier/subscriptions","organizations_url":"https://api.github.com/users/Sorbier/orgs","repos_url":"https://api.github.com/users/Sorbier/repos","events_url":"https://api.github.com/users/Sorbier/events{/privacy}","received_events_url":"https://api.github.com/users/Sorbier/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/intel-iot-devkit/mraa/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"tingleby","id":1585592,"avatar_url":"https://avatars.githubusercontent.com/u/1585592?v=3","gravatar_id":"","url":"https://api.github.com/users/tingleby","html_url":"https://github.com/tingleby","followers_url":"https://api.github.com/users/tingleby/followers","following_url":"https://api.github.com/users/tingleby/following{/other_user}","gists_url":"https://api.github.com/users/tingleby/gists{/gist_id}","starred_url":"https://api.github.com/users/tingleby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tingleby/subscriptions","organizations_url":"https://api.github.com/users/tingleby/orgs","repos_url":"https://api.github.com/users/tingleby/repos","events_url":"https://api.github.com/users/tingleby/events{/privacy}","received_events_url":"https://api.github.com/users/tingleby/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/intel-iot-devkit/mraa/milestones/3","labels_url":"https://api.github.com/repos/intel-iot-devkit/mraa/milestones/3/labels","id":848745,"number":3,"title":"0.5.3","description":null,"creator":{"login":"arfoll","id":514406,"avatar_url":"https://avatars.githubusercontent.com/u/514406?v=3","gravatar_id":"","url":"https://api.github.com/users/arfoll","html_url":"https://github.com/arfoll","followers_url":"https://api.github.com/users/arfoll/followers","following_url":"https://api.github.com/users/arfoll/following{/other_user}","gists_url":"https://api.github.com/users/arfoll/gists{/gist_id}","starred_url":"https://api.github.com/users/arfoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arfoll/subscriptions","organizations_url":"https://api.github.com/users/arfoll/orgs","repos_url":"https://api.github.com/users/arfoll/repos","events_url":"https://api.github.com/users/arfoll/events{/privacy}","received_events_url":"https://api.github.com/users/arfoll/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":5,"state":"open","created_at":"2014-10-31T18:05:45Z","updated_at":"2014-12-09T15:24:45Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2014-11-19T22:04:02Z","updated_at":"2015-01-26T13:16:53Z","closed_at":"2014-11-20T14:51:25Z","body":"It seems that mraa_uart_init is always returning  NULL, as tristate is NULL.\r\n\r\n    intel_edison_fab_c.c\r\n    mraa_board_t*\r\n    mraa_intel_edison_fab_c()\r\n    {\r\n        mraa_board_t* b = (mraa_board_t*) malloc(sizeof(mraa_board_t));\r\n        if (b == NULL)\r\n            return NULL;\r\n\r\n    // This seciton will also check if the arduino board is there\r\n    tristate = mraa_gpio_init_raw(214);\r\n    if (tristate == NULL) {\r\n        syslog(LOG_INFO, \"edison: Failed to initialise Arduino board TriState,\\\r\n                assuming Intel Edison Miniboard\\n\");\r\n        if (mraa_intel_edsion_miniboard(b) != MRAA_SUCCESS) {\r\n            free(b);\r\n            return NULL;\r\n        }\r\n        return b;\r\n    }\r\n\r\n    intel_edison_fab_c.c\r\n    mraa_result_t\r\n    mraa_intel_edison_uart_init_post(mraa_uart_context uart)\r\n    {\r\n        return mraa_gpio_write(tristate, 1);\r\n    }\r\n\r\n    gpio.c\r\n    mraa_result_t\r\n    mraa_gpio_write(mraa_gpio_context dev, int value)\r\n    {\r\n    if (dev == NULL)\r\n        return MRAA_ERROR_INVALID_HANDLE;\r\n\r\nApparently,  mraa_uart_init  NULL value is coming from mraa_gpio_write, as dev=tristate=NULL"},"comment":{"url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/comments/71458824","html_url":"https://github.com/intel-iot-devkit/mraa/issues/39#issuecomment-71458824","issue_url":"https://api.github.com/repos/intel-iot-devkit/mraa/issues/39","id":71458824,"user":{"login":"dreamkeep","id":2239741,"avatar_url":"https://avatars.githubusercontent.com/u/2239741?v=3","gravatar_id":"","url":"https://api.github.com/users/dreamkeep","html_url":"https://github.com/dreamkeep","followers_url":"https://api.github.com/users/dreamkeep/followers","following_url":"https://api.github.com/users/dreamkeep/following{/other_user}","gists_url":"https://api.github.com/users/dreamkeep/gists{/gist_id}","starred_url":"https://api.github.com/users/dreamkeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreamkeep/subscriptions","organizations_url":"https://api.github.com/users/dreamkeep/orgs","repos_url":"https://api.github.com/users/dreamkeep/repos","events_url":"https://api.github.com/users/dreamkeep/events{/privacy}","received_events_url":"https://api.github.com/users/dreamkeep/received_events","type":"User","site_admin":false},"created_at":"2015-01-26T13:16:53Z","updated_at":"2015-01-26T13:16:53Z","body":"Hi Sorbier\r\n    How can I usr ioctl() function to get the uart buffer count that have recieved before read() the uart data.\r\nTks.\r\nconnor "}}