VOGONS


HIDman - USB to PS/2 converter (Open Source)

Topic actions

Reply 182 of 217, by rasteri

User metadata
Rank Member
Rank
Member
sofakng wrote on 2023-05-12, 03:11:

Are you still planning to work on the PS2-only version, or is it 'obsolete' (or superseded) by the AXP version?

To be honest I'm not sure. Logically I probably should discontinue the PS/2 version as it's more expensive and less useful, but the form factor is much nicer IMO.

BTW there's a BOM with digikey order numbers in github now : https://github.com/rasteri/HIDman/blob/main/h … are/axp/BOM.csv

Reply 183 of 217, by sofakng

User metadata
Rank Member
Rank
Member
rasteri wrote on 2023-05-12, 10:04:
sofakng wrote on 2023-05-12, 03:11:

Are you still planning to work on the PS2-only version, or is it 'obsolete' (or superseded) by the AXP version?

To be honest I'm not sure. Logically I probably should discontinue the PS/2 version as it's more expensive and less useful, but the form factor is much nicer IMO.

BTW there's a BOM with digikey order numbers in github now : https://github.com/rasteri/HIDman/blob/main/h … are/axp/BOM.csv

Which case are you using for the PS/2 version? I'd like to build both versions because I agree the PS/2 form factor is much nicer. I'm also looking on Mouser/Digikey for an alternative in the US since shipping from the UK is over $20 by itself.

Also, is the BOM pretty much the same between both versions?

Lastly, would you consider adding an option to output both keyboard and mouse on the same PS/2 cable? This would allow it to work with your weeCee and not require a PS/2 splitter/combine cable.

Reply 184 of 217, by Eivind

User metadata
Rank Member
Rank
Member

@rasteri: Did you ever get a chance to look at the code with regards to supporting USB hubs? As a reminder, last time I tested no HIDs connected through hubs worked, and there was no debug log output when plugging them in either. Thx!

The LlamaBlaster sound card
ITX-Llama motherboard
TinyLlama SBC

Reply 187 of 217, by florian3

User metadata
Rank Newbie
Rank
Newbie

I have some basic hub support working in this branch https://github.com/hkr/HIDman/tree/hubs2.
It has some limitations, if I remember correctly you cannot chain hubs and hot-plugging of devices that are connected to hubs does not work.
It works with a KVM that I have here. The first KVM I tried did not work.

Reply 188 of 217, by rasteri

User metadata
Rank Member
Rank
Member
florian3 wrote on 2023-07-25, 21:31:

I have some basic hub support working in this branch https://github.com/hkr/HIDman/tree/hubs2.
It has some limitations, if I remember correctly you cannot chain hubs and hot-plugging of devices that are connected to hubs does not work.
It works with a KVM that I have here. The first KVM I tried did not work.

That's fantastic, I'll hopefully have some time over the weekend to investigate.

Reply 189 of 217, by Eivind

User metadata
Rank Member
Rank
Member
rasteri wrote on 2023-08-04, 10:55:
florian3 wrote on 2023-07-25, 21:31:

I have some basic hub support working in this branch https://github.com/hkr/HIDman/tree/hubs2.
It has some limitations, if I remember correctly you cannot chain hubs and hot-plugging of devices that are connected to hubs does not work.
It works with a KVM that I have here. The first KVM I tried did not work.

That's fantastic, I'll hopefully have some time over the weekend to investigate.

I tried flashing the CH559 with your updated firmware, @florian3 - but could not get it to work. Tried with a powered USB hub with a keyboard attached as well as with my HHKB keyboard which has a built-in hub.
Tried using the HIDman logger functionality, and I got nothing when plugging either of them in, same as with rasteri's firmware. 🙁

The LlamaBlaster sound card
ITX-Llama motherboard
TinyLlama SBC

Reply 190 of 217, by florian3

User metadata
Rank Newbie
Rank
Newbie
Eivind wrote on 2023-08-04, 11:08:

I tried flashing the CH559 with your updated firmware, @florian3 - but could not get it to work. Tried with a powered USB hub with a keyboard attached as well as with my HHKB keyboard which has a built-in hub.
Tried using the HIDman logger functionality, and I got nothing when plugging either of them in, same as with rasteri's firmware. 🙁

I made those changes a couple months ago. I'll try to have another look at it.
I am using this KVM https://www.amazon.com/Computers-Keyboard-Swi … g/dp/B092Q2DVC2. And I had this hub working https://www.amazon.com/Plugable-2-Port-Compac … s/dp/B005HKIDF2.

The hub in this KVM did not work https://www.amazon.com/CKLau-Monitor-Multiple … n/dp/B0811FTQZW.
I also have a 7 port hub that didn't work because it's actually two daisy-chained 4port hubs, so only 3 ports worked.

Reply 191 of 217, by rasteri

User metadata
Rank Member
Rank
Member

I was thinking about trying to port tinyusb to the CH559, as it's presumably better than the USB stack I cobbled together from various sample code.

It expects GCC + ARM/RISCV, however.... dunno how portable it'll be to SDCC+8051

Reply 192 of 217, by Eivind

User metadata
Rank Member
Rank
Member
rasteri wrote on 2023-08-05, 14:48:

I was thinking about trying to port tinyusb to the CH559, as it's presumably better than the USB stack I cobbled together from various sample code.

It expects GCC + ARM/RISCV, however.... dunno how portable it'll be to SDCC+8051

That would be very cool! Have no idea the amount of work it would take though. Haven't looked very closely at the CH559 in general, but I do get a sense of very lacking documentation and community interest... 🙁

Which brings me to an idea I had... I looked at the TinyUsb project, and I see that the RP2040 is supported. I know it only has a single hw USB controller, but it seems you can use its programmable IO (PIO) for setting up a second USB port (also host) as well. Not sure if this would even work with TinyUsb, but the RP2040 is cheap (in fact, even cheaper than the CH559 at LCSC at $1.05), readily available and extremely well supported by the community. Might be something I'll take a look at...

The LlamaBlaster sound card
ITX-Llama motherboard
TinyLlama SBC

Reply 193 of 217, by rasteri

User metadata
Rank Member
Rank
Member
Eivind wrote on 2023-08-19, 10:24:

Which brings me to an idea I had... I looked at the TinyUsb project, and I see that the RP2040 is supported. I know it only has a single hw USB controller, but it seems you can use its programmable IO (PIO) for setting up a second USB port (also host) as well. Not sure if this would even work with TinyUsb, but the RP2040 is cheap (in fact, even cheaper than the CH559 at LCSC at $1.05), readily available and extremely well supported by the community. Might be something I'll take a look at...

Oh that is interesting, I hadn't realised the PIO had been hacked to do USB. When I was researching hidman the CH559 seemed to be the cheapest MCU with dual USB ports but tinyUSB would definitely be easier to port to the pico....

Reply 194 of 217, by Eivind

User metadata
Rank Member
Rank
Member
rasteri wrote on 2023-08-21, 20:23:

Oh that is interesting, I hadn't realised the PIO had been hacked to do USB. When I was researching hidman the CH559 seemed to be the cheapest MCU with dual USB ports but tinyUSB would definitely be easier to port to the pico....

If I'm reading this correctly, the implementation uses both of the RP2040's PIOs for the second USB port - which means the PS/2 transmission would have to be bit-banged. Probably not a big deal, not a lot of data.
For this relatively simple task (considering how powerful the RP2040 is), using a "whole" Pi Pico seems a bit overkill in terms of size though. I'm tempted to try putting together something for my ITX-Llama project using only the RP2040 chip itself. There's quite a list of necessary supporting components though; quad-spi flash, crystal, lots of caps and resistors, etc. But as with everything Raspberry - extremely well documented!

The LlamaBlaster sound card
ITX-Llama motherboard
TinyLlama SBC

Reply 195 of 217, by DFL

User metadata
Rank Newbie
Rank
Newbie

Hello, I can´t build from the source under Linux or Windows. Can someone point me in the right direction?
So far I got:

make
sdcc -c -V -mmcs51 --model-large --stack-auto --xram-size 0x1600 --xram-loc 0x0200 --code-size 0xEFFF -I/ -DFREQ_SYS=48000000 -DBOARD_AXP -DOPT_DEFAULT -o build/main.rel main.c

F:\SDCC\bin\sdcpp.exe -nostdinc -Wall -std=c11 -I"/" -D"FREQ_SYS=48000000" -D"BOARD_AXP" -D"OPT_DEFAULT" -obj-ext=.rel -D__SDCC_STACK_AUTO -D__SDCC_CHAR_UNSIGNED -D__SDCC_MODEL_LARGE -D__SDCC_INT_LONG_REENT -D__SDCC_FLOAT_REENT -D__SDCC=3_6_0 -D__SDCC_VERSION_MAJOR=3 -D__SDCC_VERSION_MINOR=6 -D__SDCC_VERSION_PATCH=0 -DSDCC=360 -D__SDCC_REVISION=9615 -D__SDCC_mcs51 -D__STDC_NO_COMPLEX__=1 -D__STDC_NO_THREADS__=1 -D__STDC_NO_ATOMICS__=1 -D__STDC_NO_VLA__=1 -D__STDC_ISO_10646__=201409L -D__STDC_UTF_16__=1 -D__STDC_UTF_32__=1 -isystem "F:\SDCC\bin..\include\mcs51" -isystem "F:\SDCC\bin..\include" "main.c"
main.c:163: syntax error: token -> 'uint32_t' ; column 12
main.c:169: syntax error: token -> 'uint8_t' ; column 11
main.c:183: syntax error: token -> 'uint8_t' ; column 15
(tons of other errors)

Versions:
SDCC -v
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/TININative/ds400/hc08/s08/stm8 3.5.0 #9253 (Apr 3 2018) (Linux)
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.6.0 #9615 (MINGW32)

Thanks

Reply 196 of 217, by rasteri

User metadata
Rank Member
Rank
Member
DFL wrote on 2023-09-01, 13:53:
Versions: SDCC -v SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/TININative/ds400/hc08/s08/stm8 3.5.0 #9253 (Apr 3 2018) (Lin […]
Show full quote

Versions:
SDCC -v
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/TININative/ds400/hc08/s08/stm8 3.5.0 #9253 (Apr 3 2018) (Linux)
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.6.0 #9615 (MINGW32)

you're running ancient sdcc

Reply 198 of 217, by Eivind

User metadata
Rank Member
Rank
Member

@rasteri: Just thought you'd be interested; regarding the rp2040, I've got a semi-working setup of it on my board now, just a few software kinks to iron out. Currently I can only get either the native usb port or the pio-controlled one to work at the same time. Also haven't looked into external hub support yet, but at least this looks to be somewhat easier to work with and debug than the ch559.

The LlamaBlaster sound card
ITX-Llama motherboard
TinyLlama SBC

Reply 199 of 217, by rasteri

User metadata
Rank Member
Rank
Member
Eivind wrote on 2023-09-09, 22:07:

@rasteri: Just thought you'd be interested; regarding the rp2040, I've got a semi-working setup of it on my board now, just a few software kinks to iron out. Currently I can only get either the native usb port or the pio-controlled one to work at the same time. Also haven't looked into external hub support yet, but at least this looks to be somewhat easier to work with and debug than the ch559.

Excellent! However I think I'm going to keep developing the CH559 as it allows for a much simpler circuit.