Reply 220 of 231, by rasteri
BTW I've fully merged the XT keyboard support. Now when you press the button the LED will cycle between three modes - AT/PS2 (blue), XT (green), AMSTRAD (red, not implemented yet).
BTW I've fully merged the XT keyboard support. Now when you press the button the LED will cycle between three modes - AT/PS2 (blue), XT (green), AMSTRAD (red, not implemented yet).
rasteri wrote on 2024-04-26, 18:07:No idea I'm afraid. There's so much different in your setup from mine (different board, mice, keyboard, PC, port pins, etc) that any one of them could be causing the problem.
Maybe grab one of those cheapo logic analyzers, then you can investigate further?
I think I've managed to fix this problem (without logic analyzer but I think I will order one nevertheless). Noticed that (wireless) mouse works more often if it's not powered on at boot and then proceeded to find out that if I move mouse on boot it will never work. Studied PS/2 protocol a bit and noticed that data reporting should be disabled by default and only enabled after Enable Data Reporting command. So implemented support for Enable / Disable Data Reporting and now mouse works on every boot. I guess PS/2 controller got upset when it received data when it did not expect it.
Hardware-wise found out that my GPIO re-mappings did not work very well and only mouse aux pins did work . I am no C nor embedded systems developer so no idea why is that but I will just desolder resistor from P4.3 and then this dev board should work with stock firmware...
jarp wrote on 2024-04-28, 20:36:I think I've managed to fix this problem (without logic analyzer but I think I will order one nevertheless). Noticed that (wireless) mouse works more often if it's not powered on at boot and then proceeded to find out that if I move mouse on boot it will never work. Studied PS/2 protocol a bit and noticed that data reporting should be disabled by default and only enabled after Enable Data Reporting command. So implemented support for Enable / Disable Data Reporting and now mouse works on every boot. I guess PS/2 controller got upset when it received data when it did not expect it.
Interesting - I didn't implement that command because I was just like.... just don't move the mouse while it's booting, heh. But maybe your wireless mouse sends movement commands during poweron or something.
Feel free to submit a pull request with the command implemented 😀 (or just post the file you updated here if you can't be bothered)
rasteri wrote on 2024-04-29, 11:20:Interesting - I didn't implement that command because I was just like.... just don't move the mouse while it's booting, heh. But maybe your wireless mouse sends movement commands during poweron or something.
Feel free to submit a pull request with the command implemented 😀 (or just post the file you updated here if you can't be bothered)
Heh, and I have developed a habit of always shaking the mouse on boot 😀 I believe it is because wireless mouse needs some movement to wake it up so I tend to wake it up on boot. But also non-modified firmware failed to boot with mouse quite often even if mouse was not touched so I guess indeed mouse sends unexpected updates or something.
Pull request created, please check feasibility of it, I had troubles understanding code architecture at first as I am no embedded systems programmer...
jarp wrote on 2024-04-29, 18:47:Pull request created, please check feasibility of it, I had troubles understanding code architecture at first as I am no embedded systems programmer...
Tested it on a bunch of PCs and it works great, thanks for your contribution!
Does anybody know if anything out there uses ps/2 mouse native scale 2:1 mode or is acceleration always done on driver level? I did not even find DOS mouse driver which would allow to even to enable it. Out of curiousity and for excercise I added support for scaling as well, but not sure if it would have any practical use...
Ps/2 remote mode would be another one, is it used in real life? Or wrap mode by any diagnostocs software or anything?
Edit: Ok, decided to learn some x86 asm and wrote utility which can set scaling, resolution and polling of PS/2 mouse. Will try to implement support for them (short of rate i think...) and intellimouse support. Not sure if @rasteri welcomes such modifications but it is ok if not, just wanting to learn some DOS and embedded stuff.
jarp wrote on 2024-05-01, 20:38:Will try to implement support for them (short of rate i think...) and intellimouse support.
I'm not sure which programs set scaling. Maybe some versions of windows. But yeah feel free to implement.
Have you started on Intellimouse? I was about to start implementing it myself never mind, I saw your comments on the issue
It's been a while since I played around with the HIDman, but I'd like to give it another go in my upcoming third version of the TinyLlama SBC.
Couple of questions:
1. Did you manage to make any progress with USB hubs?
2. Looking at the PS/2 version of the schematics, I see you've connected both pins 2 and 8 (6) for both PS/2 connectors - is that for enabling both keyboard and mouse data+clk over a single cable? Does this mean several of the pins from the CH559 are actually outputting the same signals?
Eivind wrote on 2024-05-10, 10:35:1. Did you manage to make any progress with USB hubs?
Yeah most USB hubs now work, but I still have one stubborn one that doesn't. Even the CH559 example library doesn't work with it, but it works in Windows and Linux so it isn't just broken.
I have access to a fancy logic analyzer so I'm going to look at the raw USB packets to figure out why. It's my top priority currently (I'm having a batch of HIDmen manufactured so I need to get to the bottom of this one way or another!)
2. Looking at the PS/2 version of the schematics, I see you've connected both pins 2 and 8 (6) for both PS/2 connectors - is that for enabling both keyboard and mouse data+clk over a single cable? Does this mean several of the pins from the CH559 are actually outputting the same signals?
Yes exactly - the AXP version has the same feature too. The advantages of this are twofold the way I see it - firstly it's useful for devices that have combined keyboard/mouse over a single PS/2 port (many laptops and industrial computers for example). Secondly it allows the use of a splitter cable to keep cables neater.
rasteri wrote on 2024-05-10, 19:25:Yeah most USB hubs now work, but I still have one stubborn one that doesn't. Even the CH559 example library doesn't work with it […]
Eivind wrote on 2024-05-10, 10:35:1. Did you manage to make any progress with USB hubs?
Yeah most USB hubs now work, but I still have one stubborn one that doesn't. Even the CH559 example library doesn't work with it, but it works in Windows and Linux so it isn't just broken.
I have access to a fancy logic analyzer so I'm going to look at the raw USB packets to figure out why. It's my top priority currently (I'm having a batch of HIDmen manufactured so I need to get to the bottom of this one way or another!)
2. Looking at the PS/2 version of the schematics, I see you've connected both pins 2 and 8 (6) for both PS/2 connectors - is that for enabling both keyboard and mouse data+clk over a single cable? Does this mean several of the pins from the CH559 are actually outputting the same signals?
Yes exactly - the AXP version has the same feature too. The advantages of this are twofold the way I see it - firstly it's useful for devices that have combined keyboard/mouse over a single PS/2 port (many laptops and industrial computers for example). Secondly it allows the use of a splitter cable to keep cables neater.
Sounds great! Love that you're still invested in this project and I look forward to using it (again)!
OT: Had to chuckle when I read "HIDmen"... 🤭
I'm also really happy to see the recent commits to the git and to see the project still being worked on!
sofakng wrote on 2024-05-10, 19:33:I'm also really happy to see the recent commits to the git and to see the project still being worked on!
Yeah thanks to jarp we have 5 button Intellimouse support! Also there's been a few other improvements (XT support being the main one I suppose)