Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on raspberry pi zero 2 w and go 1.11 #9

Open
Langohr23 opened this issue Apr 18, 2024 · 8 comments
Open

Build on raspberry pi zero 2 w and go 1.11 #9

Langohr23 opened this issue Apr 18, 2024 · 8 comments

Comments

@Langohr23
Copy link

Hello,

I currently try to build the project with the recommended go version.

I get the following error:
go/src/github.com/jochenvg/go-udev/monitor.go:18:2: found packages unix (affinity_linux.go) and main (mkasm.go) in /home/thomas/go/src/golang.org/x/sys/unix

Thank you!

@rosmo
Copy link
Owner

rosmo commented Apr 19, 2024

That's quite strange. Is it a fresh install?

Could you try: go install github.com/rosmo/go-hidproxy/cmd/go-hidproxy ?
And also you may want to upgrade to the latest Go version (generally Go versions are quite backwards compatible).

@Langohr23
Copy link
Author

Thank you for your reply!

It is a fresh Raspberry Pi OS bullseye installation on a pi zero 2 w

After updating to the current go installation (go version go1.22.2 linux/arm64) No I get the following errors:

thomas@pizero:~ $ go get github.com/rosmo/go-hidproxy/cmd/go-hidproxy
go: go.mod file not found in current directory or any parent directory.
'go get' is no longer supported outside a module.
To build and install a command, use 'go install' with a version,
like 'go install example.com/cmd@latest'
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.

thomas@pizero:~ $ go install github.com/rosmo/go-hidproxy/cmd/go-hidproxy
go: 'go install' requires a version when current directory is not in a module
Try 'go install github.com/rosmo/go-hidproxy/cmd/go-hidproxy@latest' to install the latest version

@rosmo
Copy link
Owner

rosmo commented Apr 19, 2024

Hey, I just updated a couple things and the README. The command go install github.com/rosmo/go-hidproxy/cmd/go-hidproxy@latest should work now, just tested it on a NanoPi.

@Langohr23
Copy link
Author

Now it gets stuck with this error:
/root/go/pkg/mod/github.com/rosmo/[email protected]/cmd/go-hidproxy/main.go:8:2: "github.com/rosmo/go-hidproxy" imported as hidproxy and not used

@rosmo
Copy link
Owner

rosmo commented Apr 20, 2024

My bad, I refactored the whole thing now. Could try again? Go's global proxy has a tendency to cache things so best to install with a commit hash directly, for example:

go install github.com/rosmo/go-hidproxy/cmd/go-hidproxy@0a3a762

@Langohr23
Copy link
Author

Thank you! The Mouse now works (only the scrolling is a little bit fast) . The Keyboard is not working:
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sMicrosoft Modern MouseEV_SYN"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sMicrosoft Modern MouseEV_KEY"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sMicrosoft Modern MouseEV_REL"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sMicrosoft Modern MouseEV_MSC"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sMicrosoft Modern Mouse Consumer ControlEV_SYN"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sMicrosoft Modern Mouse Consumer ControlEV_REL"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sMicrosoft Modern MouseEV_SYN"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sMicrosoft Modern MouseEV_ABS"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sMicrosoft Modern MouseEV_ABS"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sMicrosoft Modern MouseEV_SYN"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sSurface KeyboardEV_LED"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sSurface KeyboardEV_SYN"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sSurface KeyboardEV_KEY"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sSurface KeyboardEV_REL"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sSurface KeyboardEV_ABS"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sSurface KeyboardEV_MSC"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sSurface KeyboardEV_ABS"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sSurface KeyboardEV_SYN"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sSurface KeyboardEV_SYN"
Apr 20 11:41:23 pizero go-hidproxy[1301]: time="2024-04-20T11:41:23+02:00" level=info msg="Device %t , Dev Name %sSurface KeyboardEV_ABS"

I added a log-Statement to get k.Name but cannot find out how to quickly fix it

@Langohr23
Copy link
Author

Log_keyboard_surface.txt

Maybe this is more helpful

@rosmo
Copy link
Owner

rosmo commented Apr 20, 2024

Ach, looks like the formatting strings aren't quite there. I'll fix it tomorrow and we'll give it another go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants