{"action":"created","issue":{"url":"https://api.github.com/repos/linino/linino_distro/issues/9","labels_url":"https://api.github.com/repos/linino/linino_distro/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/linino/linino_distro/issues/9/comments","events_url":"https://api.github.com/repos/linino/linino_distro/issues/9/events","html_url":"https://github.com/linino/linino_distro/issues/9","id":125214466,"number":9,"title":"Arduino gpio \"value\" file content stuck ","user":{"login":"phtrivier","id":18883,"avatar_url":"https://avatars.githubusercontent.com/u/18883?v=3","gravatar_id":"","url":"https://api.github.com/users/phtrivier","html_url":"https://github.com/phtrivier","followers_url":"https://api.github.com/users/phtrivier/followers","following_url":"https://api.github.com/users/phtrivier/following{/other_user}","gists_url":"https://api.github.com/users/phtrivier/gists{/gist_id}","starred_url":"https://api.github.com/users/phtrivier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phtrivier/subscriptions","organizations_url":"https://api.github.com/users/phtrivier/orgs","repos_url":"https://api.github.com/users/phtrivier/repos","events_url":"https://api.github.com/users/phtrivier/events{/privacy}","received_events_url":"https://api.github.com/users/phtrivier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-06T16:42:10Z","updated_at":"2016-01-08T10:44:07Z","closed_at":null,"body":"Hi \r\n\r\n I have an Arduino Yun running lininoio.\r\nI run code that does the equivalent of : \r\n* echoing 117 to `/sys/class/gpio/export` so that GPIO D2 is available as `/sys/class/gpio/D2/xxx`\r\n* open the value file  `/sys/class/gpio/D2/value` to get a gpio_id\r\n* read the file's content\r\n\r\nOn the board, the D2 pin is connected to the power voltage with a switch (I'm using the 'value' file to check whether the switch is on or off.)\r\nEverything works fine when the program runs for a short while (the 'value' file is changed to either 0 or 1), but regularly, the board ends up in a state when there is no synchro between the pin and the value file.\r\n\r\n(I can even confirm the desynchro in a shell, outside of my program.)\r\n\r\nI get the synchro again by stopping and restarting lininoio.\r\n\r\nWhat are potentials causes for such a desynchro ? What could I check to diagnose it ?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/linino/linino_distro/issues/comments/169960927","html_url":"https://github.com/linino/linino_distro/issues/9#issuecomment-169960927","issue_url":"https://api.github.com/repos/linino/linino_distro/issues/9","id":169960927,"user":{"login":"colosimo","id":848871,"avatar_url":"https://avatars.githubusercontent.com/u/848871?v=3","gravatar_id":"","url":"https://api.github.com/users/colosimo","html_url":"https://github.com/colosimo","followers_url":"https://api.github.com/users/colosimo/followers","following_url":"https://api.github.com/users/colosimo/following{/other_user}","gists_url":"https://api.github.com/users/colosimo/gists{/gist_id}","starred_url":"https://api.github.com/users/colosimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colosimo/subscriptions","organizations_url":"https://api.github.com/users/colosimo/orgs","repos_url":"https://api.github.com/users/colosimo/repos","events_url":"https://api.github.com/users/colosimo/events{/privacy}","received_events_url":"https://api.github.com/users/colosimo/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T10:44:07Z","updated_at":"2016-01-08T10:44:07Z","body":"Hi Pierre\n\nthe \"error reading\" stuff you're seeing in dmesg is most probably the \ncause of your problem. Seems like there is a communication data loss \nbetween MPU and MCU. You can try to modify the baudrate on UART:\n\n1) check the content of /etc/config/mcuiocfg\nYou should see something like:\nexport BAUDRATE=460800\n\n2) slow down above BAUDRATE value to 230400:\nexport BAUDRATE=230400\n\nPlease let me know if this solution fixes your problem.\n\nThanks\n\nAurelio\n\n\nOn 07/01/2016 12:26, Pierre-Henri Trivier wrote:\n> Hi\n>\n> here is the output from uname :\n>\n> |root@yun01:~# uname -a Linux yun01 3.3.8 #1 Wed Nov 11 12:29:46 CET 2015\n> mips GNU/Linux |\n>\n> Assuming \"mcuio\" is the relevant part of dmesg output, here is something\n> I get both when the syncing works and when it fails\n>\n> |[ 51.060000] mcuio adc is 0:1:1 [ 51.060000] mcuio-adc 0:1.1: 6 input\n> channels detected [ 51.130000] mcuio pwm is 0:1:2 [ 51.130000] mcuio-pwm\n> 0:1.2: 6 pwm outputs detected |\n>\n> Here is something I only get when the syncing fails\n>\n> |[ 6937.920000] mcuio_gpio_input: error reading curr config [\n> 6938.530000] mcuio_gpio_output: error reading curr config [ 7116.600000]\n> mcuio_gpio_input: error reading curr config [ 7117.210000]\n> mcuio_gpio_output: error reading curr config |\n>\n> Note that contrary to what I first said, simply rebooting the device\n> fixes the syncing issue.\n>\n> Any hint on how I could get more information ?\n>\n> Thanks\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/linino/linino_distro/issues/9#issuecomment-169635074>.\n>\n\n\n-- \nIng. Aurelio Colosimo\nVia Ferrante Aporti, 54\n20125 Milano - Italy\nTel: +39 0289692946\nCell: +39 3335948817\nWeb: www.aureliocolosimo.it\ne-mail: aurelio@aureliocolosimo.it\n"}}