About Archive Tags RSS Feed


Entries tagged opengear

I feel like Wedding-Day Barbie

18 March 2008 21:50

I spent a while yesterday playing with an OpenGear serial console device. It presents an interface to a number of devices via TCP.

Unfortunately it is a little flawed for our purposes. We'd like to be able to telnet directly to a serial console of a connected device, like so:

telnet $ip 2000+N

That would give us the serial console of the device in port N.

However rather than dropping us straight into the serial console it instead presents a login: + password: prompt. We'd like that removed.

The solution according to the manual is to enable the use of RFC 2217 - but that will be a pain.

Apparently downloading the CDK will allow a new firmware to be built, and I could fix this problem. Unfortunately the firmware produced by this built fails to flash - failing with an error "Error: Firmware is for a different product".


Still I have got a partial solution. / is mounted read-only. But /etc/config is writable and /etc/config/rc.local is executed at boot-time.

My file contains this:

if [ ! -d /tmp/bin ]; then
  mkdir /tmp/bin

# fake login which won't prompt for username / password
echo '#!/bin/sh' > /tmp/bin/login
echo 'pmshell -l $4' >> /tmp/bin/login
chmod 755 /tmp/bin/login

# fake inetd which exists with the modified PATH so our
# fake login will be invoked.
echo '#!/bin/sh' > /tmp/bin/inetd
echo 'PATH=/tmp/bin:$PATH /bin/inetd $*' >> /tmp/bin/inetd
chmod 755 /tmp/bin/inetd

# use our inetd
kill -9  $(ps -f | grep [i]net| awk '{print $1}')
/tmp/bin/inetd &

Suprisingly this solution works, but it is nasty.

If anybody has any success rebuilding firmware for a CM4148 (running stock 2.3.1u3 firmware currently) I'd appreciate pointers. Unfortunately the source contained upon the opengearweb.org website also fail to flash, when rebuilt.

ObQuote: Shooting Fish

| No comments