Andy-P-Bennett / KayproDriver

2 stars 0 forks source link

Tips for troubleshooting #1

Open consideringquiet opened 3 months ago

consideringquiet commented 3 months ago

Hey there!

Wanted to give this project a shot as I had this board and figured it would be a neat present for a friend, thanks again for uploading all of this!

Unfortunately, when I connect with the code, I do not receive any data over RX during runtime. I figure that maybe I have my wiring wrong, or perhaps I am missing a step in applying the code to the USB to TTL converter. Would you happen to have any advice on your troubleshooting you ran to get this to work?

Here is my wiring below:

Keyboard || Converter YELLOW GND || GND GREEN 5V || 5V RED DATA || RX BLACK RESET || TX

The colors above are just going off of the colors on the original cable going to the board. I figured these out by opening mine up and reading the lead locations, let me know if these differ (I didn't smell any blue smoke, so hopefully I didn't get cross eyed!).

If you'd have any advice as to the above it would be greatly appreciated!

Andy-P-Bennett commented 3 months ago

To start, my personal email is @.***, you can shoot me an email and I'll see it faster and you can attach photos and whatnot

Sorry it's taken me so long to respond, hopefully you've been able to figure it out in the meantime, if not, hopefully I can offer some help! Getting my keyboard to work was quite a fair bit of trial and error, and it's been a while so I may have forgotten a fair chunk of the process, hahaha. So take what I say with a grain of salt! From what I remember, the keyboard talks one way, right to the computer. So mine didn't have a reset line if memory serves correctly... Whereas a modern keyboard has the ability to sync capslock and other statuses between multiple connected keyboards, this keyboard only transmits a byte when a key is pressed, and another when it's released and literally nothing else lol. I'm pretty sure there were two outgoing signal lines, a signal+ and signal- line; serial does this, often in a twisted cable pair, in order to compensate for interference that cables are all too good at picking up. As for figuring out which cables were which, I can't remember if there were labels on the keyboard or motherboard, but I think I just got it by raw trial and error, trying too freaking many permutations until my serial port analyzer picked up data on keypresses lol.

If you receive this response and need more help, I'll be curious as to what model of kaypro keyboard you're working with. Is yours specially from the kaypro 2000? These early laptops didn't have a standardized keyboard communication standard and thus their baud rate and buffer sizes can vary between models - this was a large part of my trial and error process was adjusting the data packet size, buffer size, and baud rate, until it looked like nicely decimal keyvalues inside my serial port analyzer - that I could then write a python script to translate the raw serial data output from the keyboard into keypress events that could be registered by a modern computer. There's a reason USB is called UNIVERSAL serial bus, that was big news in a world where every serial connection basically talked in a different language!

I'm not sure the colors have any meaning. At least on my keyboard, they repurposed a phone cable, so the colors would be corresponding to phone stuff, not keyboard stuff. Again, these were early, pioneering days, and they weren't afraid to use what already existed, even if for adifferent purpose. Your best bet is probably by looking at the traces on the keyboard and motherboard pcbs - see if one of the line's traces connects to a lot of places, that's probably a voltage or ground line. The data lines will probably go straight to the microcontroller on the keyboard pcb.

Okay, as for what you actually need to do. Check out this website so you can see what port your converter is presenting its data stream on, you need to tell that to the python script by either modifying the port argument in the script or by passing it as an argument when you run the python script. should just be 0 or 1 or something, but this just helps ya figure that out and make sure it's connected, removes the converter itself from the chain of stuff we have to figure out lol https://www.tomshardware.com/how-to/detect-com-port-windows-serial-port-notifier

If you figure out the correct wire matchup and plug the port into the code, it should work. If you've still got no dice, you'll need some sort of serial analyzer to check the serial stream. It's possible the baud rate on your board is different - mine ran at 1200 baud with 8 data bits. Fiddle with the analyzer until it looks like numbers. You can look up common baud rates and data bit sizes, but I would guess the data bit is the same. If your keyboard is different, you might need to adjust the key mapping section, which will be vaguely annoying haha. Here's a link to a serial analyzer I searched up, but you might want to try a different one, I haven't used this one before. https://realterm.sourceforge.net/

Send me a picture of your keyboard to my email and I'll let you know if it's the same as the one I used, then it'll be a lot easier to troubleshoot! Let me know what you try out, if anything works, and don't get frustrated! It's fun to use these old boards as a keyboard, and I loved explaining mine to everyone that asked!

加油! Andy

On Tue, Jun 18, 2024 at 9:37 AM consideringquiet @.***> wrote:

Hey there!

Wanted to give this project a shot as I had this board and figured it would be a neat present for a friend, thanks again for uploading all of this!

Unfortunately, when I connect with the code, I do not receive any data over RX during runtime. I figure that maybe I have my wiring wrong, or perhaps I am missing a step in applying the code to the USB to TTL converter. Would you happen to have any advice on your troubleshooting you ran to get this to work?

Here is my wiring below:

Keyboard || Converter YELLOW GND || GND GREEN 5V || 5V RED DATA || RX BLACK RESET || TX

The colors above are just going off of the colors on the original cable going to the board. I figured these out by opening mine up and reading the lead locations, let me know if these differ (I didn't smell any blue smoke, so hopefully I didn't get cross eyed!).

If you'd have any advice as to the above it would be greatly appreciated!

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/Andy-P-Bennett/KayproDriver/issues/1__;!!Oz_3W2l6Vjs!7GAAFzp7XIu9v45DkXniFrOUh_y4pz7SLdUjmWZi9B9vKyphHmhJUbKOP6mkQAw1wzoR7QWzlS3FfZZx5kYZEmiGTYswyCM$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/APXNSAXIRRPH4Y6QUSMSSYDZH6FOVAVCNFSM6AAAAABJPBMIA6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2TQNRTGY3TCNY__;!!Oz_3W2l6Vjs!7GAAFzp7XIu9v45DkXniFrOUh_y4pz7SLdUjmWZi9B9vKyphHmhJUbKOP6mkQAw1wzoR7QWzlS3FfZZx5kYZEmiG_7dxoI8$ . You are receiving this because you are subscribed to this thread.Message ID: @.***>