{"action":"opened","issue":{"url":"https://api.github.com/repos/hparra/ruby-serialport/issues/58","labels_url":"https://api.github.com/repos/hparra/ruby-serialport/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/hparra/ruby-serialport/issues/58/comments","events_url":"https://api.github.com/repos/hparra/ruby-serialport/issues/58/events","html_url":"https://github.com/hparra/ruby-serialport/issues/58","id":57948565,"number":58,"title":"XON is always activated","user":{"login":"jvalencia80","id":456311,"avatar_url":"https://avatars.githubusercontent.com/u/456311?v=3","gravatar_id":"","url":"https://api.github.com/users/jvalencia80","html_url":"https://github.com/jvalencia80","followers_url":"https://api.github.com/users/jvalencia80/followers","following_url":"https://api.github.com/users/jvalencia80/following{/other_user}","gists_url":"https://api.github.com/users/jvalencia80/gists{/gist_id}","starred_url":"https://api.github.com/users/jvalencia80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvalencia80/subscriptions","organizations_url":"https://api.github.com/users/jvalencia80/orgs","repos_url":"https://api.github.com/users/jvalencia80/repos","events_url":"https://api.github.com/users/jvalencia80/events{/privacy}","received_events_url":"https://api.github.com/users/jvalencia80/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-17T16:45:41Z","updated_at":"2015-02-17T16:45:41Z","closed_at":null,"body":"I'm trying to control an Arduino board with serialport, but I'm having difficulties. I'm calling \"readbyte\" several times to retrieve binary data, but it triggers a timeout at random intervals.\r\n\r\nI found that the solution was to open the Arduino IDE, open the Serial Monitor, and close it.\r\nBy doing this, the Arduino IDE changed some parameters in the serial port and all the errors were gone after that.\r\n\r\nArduino requires no xon/xoff protocol.\r\n\r\nSo I investigated a bit and found that \"serialport\" disables xoff but not xon, while the arduino ide disabled both.\r\n\r\nThe output of \"stty --file=/dev/ttyUSB0 -a\" after opening the serial port with \"serialport\" is this (only interesting lines):\r\n\r\n    werase = ^W; lnext = ^V; flush = ^O; min = 0; time = 10;\r\n    -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl ixon -ixoff\r\n\r\nAnd the output after opening it with the Arduino IDE is this:\r\n\r\n    werase = ^W; lnext = ^V; flush = ^O; min = 0; time = 0;\r\n    -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff\r\n\r\nThe only differences are the \"time = 0\" and \"-ixon\". \r\nI'm opening the port with this code:\r\n\r\n    @serial = SerialPort.new(port, BAUDRATE, 8, 1, SerialPort::NONE)\r\n\r\nI don't understand why XON is not disabled.\r\n\r\nAlso wanted to thank you by coding this gem!"}}