Closed acrogenesis closed 6 years ago
Thanks for the error report and example. What OS and hardware are you using?
macOS 10.13.4
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-
poll:false]
Elixir (1.6.4)
I think what's happening is that it's waiting for the \n
but because it wasn't sent it just timeouts. Perhaps it should just send whats on the buffer or a timeout error.
For testing this we run the example on my Mac and on another pc connected through USB/uart and on the pc we run Arduino to easily send messages without line ending, \n
, and \r\n
So I was debugging the error more and noticed I was using the version 1.0.1 when I updated it started working as expected. Submited PR #43
Wow, I am so glad this fixed it. I was sure that there was something more to it. Thanks for following up especially with the news that it's already fixed!!
If we set the option for framing with
\n
,framing: {Nerves.UART.Framing.Line, separator: "\n"}
, but send no new line we get this error:The example can be found in: https://github.com/DisruptiveAngels/uart-example/blob/d990251ce6fd4992f91c3fee490253e0f1a8d06d/lib/hello_uart.ex