bugst / go-serial

A cross-platform serial library for go-lang.
BSD 3-Clause "New" or "Revised" License
620 stars 189 forks source link

Timeouts #48

Closed maitredede closed 3 years ago

maitredede commented 6 years ago

Hi, I would like to know if it is possible to add timeouts on read/write operations. Either by setting a timeout value, or a deadline value. Thanks.

Tecnologer commented 6 years ago

any update about this?

LeeSSXX commented 5 years ago

I also need this feature.

ghost commented 5 years ago

I give up this package because of lacking read Timeout option

maitredede commented 5 years ago

Hi @lifetyper what is the package you use as replacement ? Thanks.

ghost commented 5 years ago

@MaitreDede I use both this package and github.com/tarm/serial for my project,use this for serial port listing only.

ygl-rg commented 4 years ago

@MaitreDede I use both this package and github.com/tarm/serial for my project,use this for serial port listing only.

so am I

cbrake commented 4 years ago

if you need timeouts, you may want to consider wrapping the serial port with this package:

https://pkg.go.dev/github.com/simpleiot/simpleiot/respreader?tab=doc

I've been using it for modem control (AT commands), and for RS485 protocols like modbus -- seems to be working well.

hb1707 commented 3 years ago

@MaitreDede我将这个软件包和github.com/tarm/serial用于我的项目,仅将此用于串行端口列表。

so do i

@MaitreDede I use both this package and github.com/tarm/serial for my project,use this for serial port listing only.

so am I

+1 so do i