Mailing List Archive

FTDI Consoles appear down
Hi all

After trashing with some traditional console servers (old refurbished
cyclades), I discovered conserver and give it a try to test it as a
replacment.

Good software, almost everything I need and easy to access, so I started
to migrate my serial connections to conserver to finally power down the
cyclades and have a quite silent room ;)

Although I'm having some console issues, some consoles are considered
'down' while they're not. If I launch minicom (also tried screen)
directly to the serial port it works perfectly. I'm not using any
special configuration for any serial port (either on minicom or
conserver) a part from de baudrate.

After some tests and tried new devices/serial, identified that the the
consoles that are shown as 'down', all are based on FTDI chip, while the
ones that work are based on the Prolific PL2302 chip.

As all the 'down' FTDI devices work with minicom (but not with
conserver) I supose is due some obscure setting or some check that does
conserver that makes it consider them down although they are not.

So what can I try? How conserver decides a console is down? Is there any
special setting required for FTDI? or how can I check what is doing
minicom that doens't do conserver to open the serial port?

Thanks much


_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: FTDI Consoles appear down [ In reply to ]
Is conserver using DCD as a method? This is how I detect cable disconnects in 7.2.X.

> From: "Marc Franquesa via users" <users@conserver.com>
> To: users@conserver.com
> Sent: Friday, April 1, 2016 6:45:26 PM
> Subject: FTDI Consoles appear down

> Hi all

> After trashing with some traditional console servers (old refurbished
> cyclades), I discovered conserver and give it a try to test it as a
> replacment.

> Good software, almost everything I need and easy to access, so I started
> to migrate my serial connections to conserver to finally power down the
> cyclades and have a quite silent room ;)

> Although I'm having some console issues, some consoles are considered
> 'down' while they're not. If I launch minicom (also tried screen)
> directly to the serial port it works perfectly. I'm not using any
> special configuration for any serial port (either on minicom or
> conserver) a part from de baudrate.

> After some tests and tried new devices/serial, identified that the the
> consoles that are shown as 'down', all are based on FTDI chip, while the
> ones that work are based on the Prolific PL2302 chip.

> As all the 'down' FTDI devices work with minicom (but not with
> conserver) I supose is due some obscure setting or some check that does
> conserver that makes it consider them down although they are not.

> So what can I try? How conserver decides a console is down? Is there any
> special setting required for FTDI? or how can I check what is doing
> minicom that doens't do conserver to open the serial port?

> Thanks much

> _______________________________________________
> users mailing list
> users@conserver.com
> https://www.conserver.com/mailman/listinfo/users
Re: FTDI Consoles appear down [ In reply to ]
Can you share your configuration for your serial ports? Esp the FTDI
ones? I suspect you just need to tweak the settings a bit, but it's
hard to make suggestions until we see what you're using.

You can also look in the conserver archives for some hints. I found
one that *might* be useful:

console ttyb {
type device;
device /dev/term/b;
protocol raw;
baud 9600;
parity odd;
options cstopb;
}


But it gives you the idea... maybe.

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: FTDI Consoles appear down [ In reply to ]
Conserver doesn't do anything with carrier detect and such (for better or worse). A lot of times, however, there is both a "tty" device and "cu" device created for serial ports (maybe always on UNIX-type systems, not 100% sure). If you're using the tty device, switching to the cu device might successfully bypass a carrier detect-type issue. Just a random thought.

As was said already, more specifics to the list might help.

Bryan

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: FTDI Consoles appear down [ In reply to ]
> From: "Bryan Stansell via users" <users@conserver.com>
> To: users@conserver.com
> Sent: Saturday, April 2, 2016 1:08:54 AM
> Subject: Re: FTDI Consoles appear down

> Conserver doesn't do anything with carrier detect and such (for better or
> worse). A lot of times, however, there is both a "tty" device and "cu" device
> created for serial ports (maybe always on UNIX-type systems, not 100% sure). If
> you're using the tty device, switching to the cu device might successfully
> bypass a carrier detect-type issue. Just a random thought.

I probably modded my version for -CLOCAL.
Re: FTDI Consoles appear down [ In reply to ]
On vie, 2016-04-01 at 20:16 -0400, John Stoffel wrote:

> Can you share your configuration for your serial ports? Esp the FTDI
> ones? I suspect you just need to tweak the settings a bit, but it's
> hard to make suggestions until we see what you're using.

Sure, here is my configuration (with some added comments for
clarification):

config * {
primaryport 3109;
defaultaccess rejected;
logfile /srv/con-buffer/local-server.log;
}

default * {
timestamp 1hab;
baud 115200;
parity none;
logfile /srv/con-buffer/con-&.log;
logfilemax 2m;
motd "----- Out-Of-Band Management Console Server
-----";
options unloved;
rw *;
master localhost;
protocol raw;
}

# This console doesn't work (it shows as down)
console plug {
aliases ender;

device /dev/serial/by-id/usb-FTDI_SheevaPlug_JTAGKey_FT2232D_B_FTVB6MLG-if01-port0;
master localhost;
type device;
}

# This one works
console cubie {
aliases wigan;
device /dev/serial/by-path/pci-0000:00:1d.7-usb-0:4.3:1.0-port0;
master localhost;
type device;
}

# This is a RaspberryPi, it works
console pi2 {
aliases mona;
device /dev/serial/by-path/pci-0000:00:1d.7-usb-0:4.1.4:1.0-port0;
master localhost;
type device;
}

# Router, it doesn't work
console mikrotik {
aliases ax-ginza;
baud 115200;
device /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AI0388XH-if00-port0;
master localhost;
type device;
}

> You can also look in the conserver archives for some hints. I found
> one that *might* be useful:
>
> console ttyb {
> type device;
> device /dev/term/b;
> protocol raw;
> baud 9600;
> parity odd;
> options cstopb;
> }

This configuration shouldn't work for me, I need no parity, a 1 stop
bit.


As addtiional info (also for the rest of replies which I'm very grateful
for), some facts:

- None of the devices is a 'real/pure' serial (RS232), all are USB
serial devices based on Prolific PL232 or FTDI2232 variants.
- Maybe (not sure of this) this is the reason I have not 'cu' device (in
reference to the reply given by Bryan Stansell
- For the same fact I think they didn't implement any DCD, CTS, or any
other serial feature. I think they simply work as 'null-modem' RxTx

From my point of view, the most important fact is that with a very basic
(simply configured speed, no parity, 8bit, 1stop) configuration for
minicom and conserver, one works and the other don't, so I think more
about some pre-check conserver is doing that minicom not.

In reference to the comment by Chris Fowler, I don't know if conserver
is using DCD, didn't found any thing in the configuration neither the
documentation.

Thanks much for feedback and the quick responses.

Regards


_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: FTDI Consoles appear down [ In reply to ]
So have you tried just bringing the console up with the ^Eco command?
Does that work?

Have you tried printing out the status of the port when using minicom?
You might try starting up 'console' with the -v option to get more
info. And also turning on the debugging output.

Does the log file have any output?

John
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: FTDI Consoles appear down [ In reply to ]
Hi,

Finally worked!, I'm quite sorry as finally was due a permissions problem:

When I tried to launch the conserver daemon with debug enabled I've seen that all prior non-working consoles shown now as Up. After supicious checks I realized that I was 'debugging' conserver as root user (instead of the usual 'conservr' user), so I checked and:

crw-rw-r-- 1 root plugdev 188, 3 Apr 4 16:48 /dev/serial/by-id/usb-FTDI_SheevaPlug_JTAGKey_FT2232D_B_FTVB6MLG-if01-port0
crw-rw---- 1 root dialout 188, 6 Mar 17 16:11 /dev/serial/by-path/pci-0000:00:1d.7-usb-0:4.3:1.0-port0
crw-rw---- 1 root dialout 188, 9 Apr 4 17:30 /dev/serial/by-path/pci-0000:00:1d.7-usb-0:4.1.4:1.0-port0
crw-rw---- 1 root dialout 188, 7 Apr 4 17:29 /dev/serial/by-path/pci-0000:00:1d.7-usb-0:4.1.1:1.0-port0
crw-rw---- 1 root dialout 188, 8 Mar 17 15:18 /dev/serial/by-path/pci-0000:00:1d.7-usb-0:4.1.3:1.0-port0
crw-rw-r-- 1 root plugdev 188, 5 Apr 4 17:42 /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AI0388XH-if00-port0
crw-rw-r-- 1 root plugdev 188, 4 Apr 4 17:42 /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AL00LUS9-if00-port0

~# id conservr
uid=111(conservr) gid=20(dialout) groups=20(dialout)

The fact that it only happened with FTDI devices made me, erroneoulsy, suspect of HW/driver/serial issue. Although really was due the fact the FTDI devices are configured in conserver.cf by dev ID while the rest by path, and some udev rules (which give dialup permissions) didn't worked over them.

Yes, novice mistake. Big mistake from my side.
I'm very sorry for the time, but thanks for the hints which although pointing to some other reasons, allowed me to find my error.


Thanks All

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: FTDI Consoles appear down [ In reply to ]
As a matter of more information, after finding that conserver user
didn't have permissions over the serials in question, found that all
worked except for one.

The scenario was almost the same: it worked with minicom but not with
conserver.

After some 'debugging' found that conserver didn't have permissions over
the logfile for that console ;).

Thanks all for the help



_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: FTDI Consoles appear down [ In reply to ]
>>>>> "Marc" == Marc Franquesa via users <users@conserver.com> writes:

Marc> As a matter of more information, after finding that conserver user
Marc> didn't have permissions over the serials in question, found that all
Marc> worked except for one.

Marc> The scenario was almost the same: it worked with minicom but not with
Marc> conserver.

Marc> After some 'debugging' found that conserver didn't have permissions over
Marc> the logfile for that console ;).

Sounds like conserver could use some better error logging in those
cases to help find the problems.
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users