Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi all,
I have DNS-323 fw 1.10 with fonz plugin 0.5 and USB to serial convertor with chip PL2303.
I'm trying to connect USB to serial convertor FROM DNS-323 TO cisco router (I'm building small home cisco lab and would like to have remote connection). I found some threads regarding PL2303 kernel modules and this is where I got so far.
insmod /ffp/system/usbserial.ko vendor=0x03eb product=0x204b insmod /ffp/system/pl2303.ko mknod /dev/ttyUSB0 c 188 0
Here is place where I downloaded kernel modules
http://dev.skcserver.de/dns323/modules_ … bserial.ko
http://dev.skcserver.de/dns323/modules_ … /pl2303.ko
From dmesg I see that drivers has been loaded.
usbcore: registered new driver usbserial drivers/usb/serial/usb-serial.c: USB Serial support registered for Generic usbcore: registered new driver usbserial_generic drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0 drivers/usb/serial/usb-serial.c: USB Serial support registered for PL-2303 pl2303 1-1:1.0: PL-2303 converter detected usb 1-1: PL-2303 converter now attached to ttyUSB0 usbcore: registered new driver pl2303 drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver v0.12
Now I need to connect with some terminal emulation SW like minicom (or putty or hyper terminal on Windows) to that serial port.
I've checked all packages from fonz plugin but minicom or other terminal emulation program is not there.
Google didn't help me much as well with this.
Of course I could cross-compile minicom but that would be very time consuming task for me.
Does anybody have compiled minicom for DNS-323 or any other terminal emulation program which I could use instead?
I'd be very grateful for that.
Thanks in advance for any hints.
Offline
What exactlyis the purpose of this arrangement? You would have to telnet into the DNS-323 to connect to the router via the USB/Serial/Console and it would probably be a lot simpler to telnet directly into the router completely bypassing the DNS-323 - this type of "remote" access is, for want of a better way to put it, not only the norm with routers, but the expected method of access - I maintain my clients' "country-spanning WANs" from a single location without having to drive from site to site, and I've also participated in implementing "globe-spanning WANs" for a number of international firms - site visits are typically made only for the initial hardware installation or in case of equipment failure.
This is not a Cisco forum so I will not go into any depth on this, but if you're unable to telnet into the router from a remote location, you need to check the ACLs that control the VTY interface and/or the WAN interface - one of those (or the firewall) will be blocking your connection.
Last edited by fordem (2012-09-19 17:40:51)
Offline
You can 'convert' the serial data into network using netcat:
nc -l 5000 </dev/ttyUSB0 >/dev/ttyUSB0
Now you can connect on port 5000 of your nas using telnet.
The baudrate should be set previously. You can use stty for that.
Offline
Hi fordem,
fordem wrote:
What exactlyis the purpose of this arrangement? You would have to telnet into the DNS-323 to connect to the router via the USB/Serial/Console and it would probably be a lot simpler to telnet directly into the router completely bypassing the DNS-323 - this type of "remote" access is, for want of a better way to put it, not only the norm with routers, but the expected method of access - I maintain my clients' "country-spanning WANs" from a single location without having to drive from site to site, and I've also participated in implementing "globe-spanning WANs" for a number of international firms - site visits are typically made only for the initial hardware installation or in case of equipment failure.
I'm system admin and would like extend my knowledge to cisco world. I'm supporting about 100 servers which each have remote console (HP servers with built in ILO or OA modules) in case if NW connection from any reason is not available. I'd like achieve similar functionality for my cisco router.
This is my first try with combination of DNS-323, USB to RS232 (PL2303 chip) and cisco router (model 1721). The approach is not the best perhaps.
I've googled and found that cisco switch 2909 (up to 8 devices possible to connect) would provide me what I'm looking for but it would cost me about 200EUR (ebay)! DNS-323 and PL2303 I have already that's why I started thinking about using it.
fordem wrote:
This is not a Cisco forum so I will not go into any depth on this, but if you're unable to telnet into the router from a remote location, you need to check the ACLs that control the VTY interface and/or the WAN interface - one of those (or the firewall) will be blocking your connection.
I agree that I should search remote access on cisco forum and google. You bet I will. Thanks for the hints.
Offline
Hi Mijzelf
Mijzelf wrote:
You can 'convert' the serial data into network using netcat:
Code:
nc -l 5000 </dev/ttyUSB0 >/dev/ttyUSB0Now you can connect on port 5000 of your nas using telnet.
The baudrate should be set previously. You can use stty for that.
You missed -p parameter.
It should be
nc -l -p 5000 </dev/ttyUSB0 >/dev/ttyUSB0
I see on port 5000 is listening telnetd.
/ # netstat -an |grep 5000 tcp 0 0 127.0.0.1:5000 127.0.0.1:3041 ESTABLISHED tcp 0 0 127.0.0.1:3041 127.0.0.1:5000 ESTABLISHED / # lsof -i :5000 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME nc 2094 root 3u IPv4 2970 TCP localhost.localdomain:5000->localhost.localdomain:3041 (ESTABLISHED) telnet 2110 root 3u IPv4 2990 TCP localhost.localdomain:3041->localhost.localdomain:5000 (ESTABLISHED)
And it works like a charm!
System Bootstrap, Version 12.2(7r)XM2, RELEASE SOFTWARE (fc1) TAC Support: http://www.cisco.com/tac Copyright (c) 2003 by cisco Systems, Inc. C1700 platform with 131072 Kb Self decompressing the image : ##################################################################################################### ##################################################################################################### ##################################################################################################### ##################################################################################################### ### [OK] Smart Init is enabled smart init is sizing iomem ID MEMORY_REQ TYPE MainBoard 0X000xxxxx 1721 0X000xxxxx public buffer pools 0X002xxxxx public particle pools 0X0039 0X0000xxxx Card in slot 0 0X0012 0X0001xxxx Card in slot 1 TOTAL: 0X00xxxxxx If any of the above Memory Requirements are "UNKNOWN", you may be using an unsupported configuration or there is a software problem and system operation may be compromised. Allocating additional 6459293 bytes to IO Memory. PMem allocated: 124261939 bytes; IOMem allocated: 9955789 bytes Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software - Restricted Rights clause at FAR sec. 52.227-19 and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec. 252.227-7013. cisco Systems, Inc. 170 West Tasman Drive San Jose, California 95134-1706 Cisco IOS Software, C1700 Software (C1700-ENTSERVICESK9-M), Version 12.4(15)T5, RELEASE SOFTWARE (fc4) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2008 by Cisco Systems, Inc. Compiled Wed 30-Apr-08 11:30 by prod_rel_team Image text-base: 0x800081D0, data-base: 0x82899858 This product contains cryptographic features and is subject to United States and local country laws governing import, export, transfer and use. Delivery of Cisco cryptographic products does not imply third-party authority to import, export, distribute or use encryption. Importers, exporters, distributors and users are responsible for compliance with U.S. and local country laws. By using this product you agree to comply with applicable laws and regulations. If you are unable to comply with U.S. and local laws, return this product immediately. A summary of U.S. laws governing Cisco cryptographic products may be found at: http://www.cisco.com/wwl/export/crypto/tool/stqrg.html If you require further assistance please contact us by sending email to export@cisco.com. Cisco 1721 (MPC860P) processor (revision 0x400) with 121349K/9723K bytes of memory. Processor board ID FOCxxxxxxxx (1xxxxxxxx), with hardware revision 0000 MPC860P processor: part number 5, mask 2 1 Ethernet interface 1 FastEthernet interface 2 Serial(sync/async) interfaces 32K bytes of NVRAM. 32768K bytes of processor board System flash (Read/Write) Press RETURN to get started!
Thanks a lot Mijzelf. It was the last piece of the jigsaw!
Offline
Hello again after 2years.
I found some reference to this thread and would like to update some info about netcat which might be handy for someone.
I have found issues with stty settings which caused me headache.
I wrote this script but the issues were never overcame.
Code:
#!/ffp/bin/bash
#
# Purpose of this script is to restart USB serial service
#
# v0.1 20.09.2012 Initial version
#
# Make sure only root can run this script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# General variables
PATH=/ffp/bin:/ffp/sbin
MOD_LOC='/ffp/system'
DEVICE='/dev/ttyUSB0'
MODULE1=usbserial
#MODULE1_PARAMS="vendor=0x03eb product=0x204b"
MODULE2=pl2303
MODULE1_CHECK=`lsmod |awk '{print $1}' |grep $MODULE1`
MODULE2_CHECK=`lsmod |awk '{print $1}' |grep $MODULE2`
#STTY_OPTS="9600 -parenb cs8 -cstopb -ixon -clocal -ignbrk -icanon -brkint -icrnl ixoff -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke -hupcl "
NETCAT_IP='10.x.x.x'
NETCAT_PORT=5000
eval parm1=$1
# Help to display the options
function help {
echo "USB serial service v0.1"
echo ""
echo "USAGE"
echo "console [start|stop|restart|status|terminal]"
echo "-h Invoke this help"
echo ""
#exit 0
}
# Wrong usage. All not allowed options.
function wrong {
echo "Wrong USAGE! See allowed syntax below."
echo ""
echo ""
help
}
# Check if kernel modules are loaded
function status {
echo "Modules loaded: $MODULE1_CHECK $MODULE2_CHECK"
}
# Unload kernel modules
function stop {
if [ "$MODULE2" == "$MODULE2_CHECK" ] ;then
rmmod $MODULE2
echo "Unloading module $MODULE2"
else
echo "Module $MODULE2 is not loaded"
fi
if [ "$MODULE1" == "$MODULE1_CHECK" ] ;then
rmmod $MODULE1
echo "Unloading module $MODULE1"
else
echo "Module $MODULE1 is not loaded"
fi
# Clean variables
MODULE1_CHECK=
MODULE2_CHECK=
}
# Load kernel modules
function start {
if [ "$MODULE1" == "$MODULE1_CHECK" ] ;then
echo "Module $MODULE1 is already running"
else
insmod $MOD_LOC/$MODULE1.ko
echo "Loading kernel module $MODULE1"
fi
if [ "$MODULE2" == "$MODULE2_CHECK" ] ;then
echo "Module $MODULE2 is already running"
else
insmod $MOD_LOC/$MODULE2.ko
echo "Loading kernel module $MODULE2"
fi
device
netcat
terminal
}
# Create device file
function device {
if [ -c $DEVICE ]; then
echo "Device file $DEVICE already exist"
else
mknod $DEVICE c 188 0
echo "Device file $DEVICE has been created"
fi
}
# NetCat
function netcat {
echo "Starting NetCat."
#nohup nc -l -p 5000 </dev/ttyUSB0 >/dev/ttyUSB0 &
nc -l -p 5000 </dev/ttyUSB0 >/dev/ttyUSB0 &
}
# Restart
function restart {
stop
sleep 1
start
}
# Setup stty values
function terminal {
echo "Configuring terminal settings"
#stty -F $DEVICE cs8 9600 time 1 -ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke -noflsh ixon ixoff -clocal -crtscts
#stty -F $DEVICE 9600 -parenb cs8 -cstopb -ixon -clocal -ignbrk time 1 -icanon -brkint -icrnl ixoff \
#-imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
stty -F /dev/ttyUSB0 9600 -parenb cs8 -cstopb -ixon -clocal -hupcl -ignbrk -icanon -echo
#for option in $STTY_OPTS ;do stty -F $DEVICE $option ;done
#echo "Terminal set"
}
if [[ $# -eq 0 ]]; then
echo "Missing parameter!"
echo ""
echo ""
help
else
case $1 in
start) start;;
stop) stop;;
restart) restart;;
status) status;;
terminal) terminal;;
netcat) netcat;;
-h) help;;
*) wrong;;
esac
fi
Now I tried to compile latest version of minicom 2.7.1 on my NAS (I'm on FW 1.10 and FFP 0.5) and it went fine and relatively fast (about 15min).
Minicom works fine for me and now I don't have reason to use netcat any longer.
I will try contact Fonz to publish it under section 0.5 on his site if will agree.
BR,
Peter
Last edited by PeterZ (2014-11-21 16:23:02)
Offline