Monthly Archives: January 2015

Connect to Lantronix Spider from Ubuntu RS232 Serial Port or USB

If you need to connect to the Lantronix Spider or SpiderDuo KVM-over-IP Devices via a serial connection, for example to change the configuration or reset the password, you need to use a serial console to do this. I was using an Ubuntu machine with a standard serial / com port ( DB9/RS232 ) and had one of the $4 RJ45 to DB9/RS232 cables To get connected I ended up installing picocom which I like better than using screen as it seems to be more forgiving if something goes wrong and not lock up the system. Then I used the command picocom -b 9600 /dev/ttyS0 to connect to the device and got prompt so I could reset the device: Welcome! Choose a command for the following features: -Initial IP configuration: “config”. -Reset device: “reset”. [(none) spider]> If you don’t have a RS232 you can also use a ~ $10 USB to RS-232 DB9 Serial Converter in order to get a serial port. The device will show up in /dev/ as something like /dev/ttyUSB0 which will change your picocom command to be: picocom -b 9600 /dev/ttyS0 To exit picocom use control+a, control+x. To install picocom on Ubuntu / Debian linux systems use apt-get install -y picocom A few notes from the Lantronix page: How do I perform the reset? See details on the lantronix page – you will need to use the reset button on the back of the device in combination with a terminal connection described above. What is the default … Continue reading

Posted in Server Admin | Tagged , | Leave a comment

hombrew: brew install gxargs

The xargs utility on Mac is not the same as the one on linux. In particular, searching for files with the mdfind utility will not properly escape files to be processed. Using homebrew you can install the GNU version of xargs as gxargs, and you can use the syntax you’re accustomed to from GNU/Linux. For me this is equivalent to something like: mdfind -name “conflicted copy” | gxargs -d ‘\n’ -P 4 echo To remove the files you can then replace echo with rm – but be careful!

Posted in Mac | Tagged , | Leave a comment

How to send F2, F8, F9, F12 to a VNC Remote PC from Mac OS X

When recently using Intel Active Management Technology (AMT) I was remotely connected via the RealVNC client, but was having trouble sending keystrokes like F2 to enter the BIOS, F12 to select a startup device, or F8 to access the Windows startup menu. This setup is complicated for a few reasons – first I’m using a Mac keyboard. Secondly, OS X remaps the function keys to do things like dashboard, expose, brightness, and volume by default. After a little searching and trial and error, I found that I can use the free utility included with Mac OS X – AppleScript – to send keycodes to the VNC connection. Here’s the code for the applescript you can use to send the F12 key: tell application “VNC Viewer” activate tell application “System Events” to key code 111 end tell This is what it should look like in the editor: To send key combos, like holding down alt and pressing F4, the syntax would be something like this: tell application “System Events” to key code 118 using {command down} We use command instead of alt because that is how Real VNC Viewer translates the “alt” key for a remote windows system by default. To send other keyboard F-keys to the remote Windows machine, use the table below to find the appropriate key – make sure to reference the “Mac” column even if the remote machine is a Windows box. What about JAVA? But what happens if you are running a java applet for … Continue reading

Posted in Tech Tips | Tagged , , , | Leave a comment

How to set the Date & Time for photos and videos taken with a Quadcopter such as the Dromida Kodo

If you’ve taken photos and videos with the a RC Quad Copter such as the Dromida Kodo, the X5C, or one of the many Quad Copters sold on Amazon you may have noticed that when you get finished taking photos and videos you have a result like this: Oct 1 01:03:40 2013 MOVI0000.avi Oct 1 01:04:04 2013 MOVI0001.avi Oct 1 01:04:20 2013 MOVI0002.avi Oct 1 01:04:20 2013 MOVI0003.avi Oct 1 01:00:52 2013 PICT0000.jpg Oct 1 01:00:56 2013 PICT0001.jpg Oct 1 01:04:08 2013 PICT0002.jpg Oct 1 01:04:12 2013 PICT0003.jpg All of the dates and times seem to be on October 1, 2013 shortly after 1:00. To get the correct timestamps, you can save a file to the SD card named time.txt with the date in the format “yyyy/mm/dd” Use notepad or another text editor to create the file, and name it time.txt with the timestamp all on one line, and then a newline (press ‘enter’) after it. This will be used to set the camera’s clock as long as it has power. Here are some examples for different timezones – and you can also download files with the current timestamps:

Posted in Uncategorized | Leave a comment

How to tell if PL-2303HX ( PL-2303 ) is 3.3v or 5v

If you have a USB adapter and would like to use it when working with Arduino or Raspberry Pi you may wonder if it is safe to use with a 3v3 system. Purchasing these on eBay can be cheaper than buying from someplace like Adafruit but the listings often have no documentation on if the chip can be used with 3.3v devices. You can measure some of the pins to make your own determination. The unit I was working with several pins labeled: I measured voltage between the GND pin and the TX pin which gave around 1.8 – 2.5V without any data being transmitted. When I sent data to the device the voltages went intermittently to around 3.3 volts or maybe 3.4 volts. But I wanted to make sure that the chip was actually setup for 3.3v and so I found the datasheet for the PL-2303HX Make sure to get the correct datasheet for the chip you have – some of the chips are slightly different, like the HXD version. On page 11 of that datasheet it showed the pinout diagram – notice the small circle indicating “pin 1” which should correspond to the small dot on the actual chip: Pin 4 is labeled VDD_325 and the note says: RS232 VDD. The power pin for the serial port signals. When the serial port is 3.3V, this should be 3.3V. When the serial port is 2.5V, this should be 2.5V. The range can be from 1.8V~3.3V. Use this information at … Continue reading

Posted in Linux | Tagged , , | Leave a comment