Posts Tagged ‘serial’

AllElectronics “Mystery Infrared Device” with LIRC

NOTE: This device is no longer sold; rescuing this information before it disappears from various caches.

Description of the device from AllElectronics:
Our best guess is this is an infrared receiver/ transmitter for use with televisions or other remote-controlled equipment. Made for OnCommand™, it consists of a small black box, 2″ x 1.95″ x 0.6″ with a dark-red plastic IR window on one side. Inside is a small pc board with four clear LEDs and a module that looks like an IR receiver. There is a 3.5mm phone jack and a 6′ 6-conductor phone cord with a modular phone plug.
CAT# IR-13

Various information on modification for use with a PC: (pulled from cache of AllElectronics product review page)

Reviewer: Seth Marks from CRYSTAL LAKE, IL US
This circuit can be used with one minor modification to make a serial IR receiver for use with LIRC. http://lnx.manoweb.com/lirc/?partType=section&partName=circuit Connect the following: White Wire to DCD (Pin 1), Red Wire to RTS (Pin 7), Blue Wire – GND (Pin 5) The only modification you must perform is to add a pullup resistor between the output pin on the IR transmittor (connected to the white wire) and “In” on the 78l05 (the pin on the main IC closest to the red wire). Seems to work great.

Note: I (Tim) have personally used these instructions and can confirm that they work. With the white/data wire tied to DCD as above, make sure to select “DCD Device” rather than “Rx Device” in the (Win)LIRC serial receiver settings.

Reviewer: Mike from SAN ANTONIO, TX US
Just received this module and started playing around with it. This is what i figured out for the wiring. Yellow and Blue- ground, Red and Green- positive(around 9-12VDC), White- IR out, Black- IR in, 3.5mm jack- External IR emitter If you jumper the white and black together whatever is received from the ir receiver is transmitted out the four IR emitters on the board.(IR amplifier)Or plug in an IR emitter to the jack and controll hard to reach equipment.I have thought up many ways of using these modules.

Solved: Can’t connect to high (>10) Windows COM ports / cleaning out unused COM ports

Problem: Windows, and many Windows apps that use serial (COM) ports, have various problems accessing “high” numbered COM ports. I cannot find an authoritative or quantatative definition of “high” (and it may depend on your app), but I have seen apps start failing after COM8, COM9, COM15… anything in the 20s is asking for trouble. If you are a developer and routinely plug in different “serial” devices (including USB gadgets with virtual COM support, Bluetooth dongles, Arduinos etc.) Windows will happily assign a new port number to each one until something breaks and you go hunting for this post.

Depending on the application, the “s**t-the-bed” breakover often depends on a hardcoded number (e.g. only supports up to COM8), or going to double digits, etc.

Solution1: Some apps may let you enter the COM port number in a special way (UNC path) that lets higher-number COM ports be used, e.g: \\.\COM25
(that is, precede the port name with a double backslash, dot, and then another backslash). If the app uses backslashes as an escape character, try doubling the backslashes, e.g. \\\\.\\COM37

Why this form? Why only some applications? Why does the number where this form becomes necessary differ between applications? (avrdude.exe requires it for COM10 and higher; pyserial will work without it up to at least COM15 or so, but not COM25. Of course, this all may just depend on the phase of the moon and your results may vary.) Beats the hell outta me. If anyone knows what this is all about, please post in the comments!

Solution2: Clean out those rusty, dusty old unused COM port numbers (you know, for that silly dongle you plugged in exactly once years ago and never touched again) so you can recover those “working” low COM port numbers for new devices. Trouble is Windows will not show it in Device Manager unless the device is plugged in, which is a problem if the thing got lost or broke long ago. To see the hidden allocations and remove them:

1. Open a command prompt as Administrator. (Start->Run, type cmd ). Or, right-click Start->Programs->Accessories->Command Prompt and choose “Run as administrator”

2. At the command prompt type set devmgr_show_nonpresent_devices=1

3. At the command prompt type start devmgmt.msc to start Device Manager. For this to work you MUST start it from this command prompt – don’t mouseclick your way into it or try to use an already open copy.

4. When device manager opens, select View -> Show hidden devices

Now when you expand the COM ports section, every COM port ever allocated will be shown (all the ones for nonexistent devices will be grayed out). Now you can right-click all the defunct ones and uninstall them.

NOTE: Without the magic incantations above, you will still have a View -> Show hidden devices option, but it won’t actually show the nonexistent COM port eating devices.