-
Keyboards – Serial Analysis Using FTD232RL
Posted on November 20th, 2009 No commentsFirst, for those friends at work and personal, you cannot just tap into a USB bus connection of any type and analyze like you can a serial connection. If you have to ask why with a condescending voice as if you could make it happen, then keep to yourself and study USB protocol.
Now that is out of the way, let me take a sentence or two to explain. USB is not serial and does not even compare to serial in a couple of areas. Timing on a USB bus is determined by the protocol version, hence 10 Mbs, 100 Mbs and faster all depending on whether you are using 1.0, 2.0 or whatever version. In serial communications, the implementer sets the timing to a baud rate. Next, what is on the bus is on the bus, so the exchange is not one-to-one in USB as it is with serial. The device identification (HID) is established by the host, and the USB host determines which traffic is for which device that is communicating over the bus. In other words, the USB host (computer) controls all communication, not the implementation of the device.
So one would ask why does a USB to PS2 converter just consist of the four pins of a USB connector tied into four pins of a PS2 connector? I too asked this question and performed a bit of analysis, including busting apart a couple of these adapters to see if a tiny ‘conversion’ chip was inside. This is very, very funny now that I understand better. The reason this kind of pin-to-pin connection works is because the computer (USB host) identifies the device as a PS2 device when it is plugged into the computer, and the computer speaks serial to the device. When the USB plug is used to connect the keyboard, the computer recognizes the keyboard as a USB device and the USB device chip in the keyboard talks to the PC accordingly.
What all this means is that if you run a straight wire tap into a USB-to-USB keyboard connection, you are going to get a lot of garbage from other devices running through the same host controller, you are going to have timing problems, and it will be virtually impossible for a PIC, AVR, or any micro controller to keep up with analysis and filtering due to computing limitations. If this has not made things clear, and you want to know more, I suggest a visit to this forum.
Now, onto the next step. How about running a straight wire tap from a USB-to-USB connection into an FTDI USB to serial conversion chip that is powered by the USB bus itself then analyze the serial exchange? Here is a quick mash up thrown together in Eagle late last night. Will spend some time this morning on the breadboard putting this together. The first thing of concern when reviewing this is whether the USB host (computer) will try to enumerate the FTDI chip and load the driver, which is what we don’t want – so may have to install some diodes or something to make sure the communication on goes one way from keyboard to FTDI chip and out the serial port. Another area of concern is whether the FTDI chip will perform the serial conversion without being enumerated by the computer. Stay tuned. Or, comment with some suggestions, because I really do need all the help I can get.

-
Morsing….
Posted on July 5th, 2009 No commentsLate last year I had an idea about a gadget that would be a GPS trail/path logger and an emergency locator. There are a plethora of circuit diagrams and DIY project blogs on the web that cover a GPS logger based on a PIC microchip, but none offer an option to send of a Lo-Jack type of signal that sends the current location. This could be a low power CW signal sent on a certain frequency that identifies the exact GPS coordinate of the device. There are a few snags from a testing perspective that concern some of the technicalities of remote automatic control, however, there are also some great possibilities here. Kind of like a Lo-Jack for hikers…. which I know already exists.
If anybody out there knows why Lo-Jack has not been implemented in Japan, please comment. -
PIC 18F4550 Prototyping Board
Posted on March 7th, 2009 No commentsIn a first step to start creation of the KeyJack , I found this link while Googling for ideas.

This photo was a snapshot from PhotoBooth, so please excuse the reflection, but most of the components are visible. Instead of using the sexy surface mount devices, I used what was available on a rainy day. Of course the micro controller is not mounted yet, but soon enough. All of the empty holes are for mounting headers that can connect other devices or jumper across onto another prototyping board or a breadboard. Here is the circuit side of the PCB:

As you can see, have not sat down to solder the parts yet…. that’s going to start in just a few minutes. When complete and running, will come back for a follow-up post. Stay tuned.Follow-up… a couple hours later.
Here is the (sloppy) soldered up back side of the board complete with jumpers and connection headers. Had a couple of soldering mishaps along the way, so had to solder a wire into one part of the run. It all tests positive for conductivity. All that is left are two components I don’t have in the parts collection – push buttons for the reset and bootloader.





