bugst / go-serial

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

No longer works with Raspberry pi #167

Open Com1Software opened 8 months ago

Com1Software commented 8 months ago

I presume the Raspberry pi will no longer work with this package - Thanks

Speshl commented 6 months ago

Also not able to get this working on raspberry pi. Port opens successfully and blocks until data is received. First byte that gets sent causes the read to fail with a port closed error. Works fine when used with albenik/go-serial which is/was forked from this repo originally.

cmaglie commented 4 months ago

Please provide an example to reproduce the issue, and also describe your OS / Hardware.

jhrncar commented 4 months ago

Not confirmed yet, but installing this package has sort of corrrupted my default serial port on Raspberry Pi 4. As soon as I connect the raspberry via serial to another device (Raspberry Pico), I get a an infinite loop of this error (and some other but mostly this:

loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-backtrace-all-active-cpus(l) show-memory-usage> <-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) dump-ftrace-buffer(z)

It happens even if the GO program that i used this package in is not running. After couple of seconds, the RPi reboots and is stuck at kernel with some call trace and error that i was not able to understand so i dont post it here. Uninstalling this package or GO all together did not help. What did the trick was to reboot the interface using raspi-config. I have not yet used another program over the serial, but at least it doesnt crash on connecting the cables.

I cannot confirm nor deny that this library was the issue, but as you guys are saying that it doesnt work on RPi and the problem started after i installed this... well you get the point

cmaglie commented 4 months ago

@jhrncar This doesn't look like an issue caused by this library because it does not perform any permanent change to the system (you should always be able to restore a "clean" state after a reboot).

Also, since you say:

It happens even if the GO program that i used this package in is not running.

this fact seems to indicate that the issue is elsewhere (unless you have other hints to share...).

jhrncar commented 4 months ago

@jhrncar This doesn't look like an issue caused by this library because it does not perform any permanent change to the system (you should always be able to restore a "clean" state after a reboot).

Also, since you say:

It happens even if the GO program that i used this package in is not running.

this fact seems to indicate that the issue is elsewhere (unless you have other hints to share...).

Well, I can only say this: as soon as i installed this package and ran a very simple script with it, problems started. I am not a Linux enjoyer and therefore i cannot debug this properly. But I think a logic: It quawks like a duck, smells like a duck and looks like a duck = its a duck - can be applied here: Raspberry worked, I installed a library that is known to cause problems on Raspberry, Raspberry started making problems...

cmaglie commented 4 months ago

I believe you, but put yourself in my shoes for a moment: I have no crystal ball, so if you don't describe your setup and a way to reproduce the problem, I can't do anything to help you.

This thread has 7 messages already, but no one provided useful information to solve or understand what the issue is, just people complaining that the library "doesn't work on Raspberry PI". I'm not paid to work on this project, I'm doing it out of passion in my free time. Time is a very scarce resource and I already spent an hour on this thread that will probably lead to nothing.

cmaglie commented 4 months ago

@jhrncar I'm not complaining to you directly, it's just a trend that I'm seeing as this library gains popularity... probably I should cool down and live with it.