It may be that you want to use a USB cable, or it may be that just like me you forgot your USB to serial adapter, and now your faced with connecting to a Cisco switch with a USB cable rather than the serial cable on OSX.
Well how do we go about this, with Windows we could simply look up the port number in device manager, with OS X they do not use this reference, instead referring to the device as a TTY USB modem.
First we need to look up the device, which is contained with other devices in the folder /dev/, we also want to limit it to devices of the USB type so we are going to limit the command to that. Open terminal and type the following command;
ls -ltr /dev/*usb*
This will list all devices in the /dev/ directory (the devices directory) where it contains the key phrase usb within it, with all information, in a list with the most recently modified device (and therefore most likely the device we are looking for)
Your device will show up as something such as
Now we have the path to the device, we need to open a console using it. In OS X the console utility screen is built in, so lets open it utilising this utility and a baud rate of 9600 which most devices will happily handle. To do this type;
screen /dev/tty.usbmodem.12a1 9600
What this command is stating is open screen on device /dev/tty/usbmodem.12a1 utilising a 9600 baud rate, no settings for stop bits etc are input, you can also utilise other baud rates if needed.
Your terminal will now connect to the console of the Cisco device, this should also however work for any other devices that utilises a USB chipset to communicate via serial emulation.
I have now got some of the equipment for my SafeDuino, as has been mentioned previously I have selected Freetronics for much of my kit for this, sure I could make most of it manually, but I do prefer it being on a circuit board to make it that bit easier to mount.
So far I have obtained the following from a local Jaycar store
- Freetronics EtherMega
- RGB LED, This may yet be changed, as something I would like to do would be easier if I just had the RGB LED itself without the board, well rather easier without the IC on it, the board is prefered however.
- Humidity sensor, Freetronics board mounted, however it is a “common” DHT22
- Reed Switch, this came from my stash of components, but was originally from Jaycar as well
- 2000 Ohm and 8000 Ohm resistors to make a voltage divider
- NDriver Transitor relay, this is to allow me to turn on/off the LED light strip
Good news is all parts have so far passed testing, now its just a matter of waiting for the rest of the items to arive, in the mean time however I will not be slacking I will be using a simulator (Simulator for Arduino from Virtronics) and the components already at hand to start work on this project.
Whats worse is I have already decided on my next project, several (as we have several locations on the property that require it) water tank level sensors, based upon the Freetronics EtherTen, this one has been chosen for that project as I can use the Cisco POE switches I have at home to power it from the network, meaning no external power requirements
Arduino, an easily programmable microcontroller has been around the traps for several years now, but having been out of this “game” since high school I have not given it a second thought until recently when I have wanted to start doing a little home automation, or rather monitoring (for now at least) for my own purposes. Out of this has been born my first Arduino project, SafeDuino (cliché, sure but hey).
As the project name may have led you to believe, it is to keep things safe, but in this case I am not talking about physical security, I am talking about things that need to have temperature and humidity controlled, recorded and alerts sent when needed. Whilst there are commercial products that can do this, and probably by the end of it, will have been cheaper than building my own, the ability of the Arduino to do other things as well is where my interest lies.
Currently what I am planning on achieving with the setup is as follows;
- Dewpoint (as its a calculation based on humidity and temperature
- Magnetic Reed Switch (Door to the cabinet where it is house opening so I can track changes in humidity relative to the door opening)
- 2 Buttons, used in conjunction with LCD Panel
- Turn on 12vdc LED Strip Lights upon the door opening (hey I might as well put the action of door opening to good use to use)
- Turn on a 240VAC Dehumidifier (Ultimately)
I am also determined to output the data to an web feed, either private or semi-public so I can log it and do long term analysis on the data., to this end I have determined to use the EtherMega from freetronics for the base Arduino board, as well as their humidity sensor, perhaps there RGB LED, their N Channel Transistor to drive the LED array, the reed switch is a Jaycar special, the LCD panel and a LCD shield will be coming from makershed.
Let the fun begin….
Had an issue today that required me to connect via Console to a 3Com (Now HP) Baseline 2948 switch, however the “usual” settings didn’t work, they required an increased baud rate, otherwise the output was totally screwy the settings that work are below
Baud Rate: 38400
Data Bits: 8
Stop Bit: 1
Flow Control: None
For this work to be carried out I needed to reset the password through command mode similar to how you would a Cisco devices (ROMMON) to enter this mode you reboot the switch (after you have established a console connection) and press Control + C until the menu comes up
this prompt will show you the available commands, in my cases I needed to use the command passwd and then had to reset the system by using reset -sysreset at which the switch rebooted and I could log into the web and console interface of the device using the default username/password (admin/blank) combination