From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934122AbdKBSoY (ORCPT ); Thu, 2 Nov 2017 14:44:24 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:36812 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933129AbdKBSoW (ORCPT ); Thu, 2 Nov 2017 14:44:22 -0400 Date: Thu, 2 Nov 2017 18:44:11 +0000 From: Alan Cox To: "Theodore Ts'o" Cc: Paul Menzel , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Is 115200 still the maximum baudrate? Message-ID: <20171102184411.4f760de0@alans-desktop> In-Reply-To: <20171102171355.onz27qoczedq7jpv@thunk.org> References: <20171102171355.onz27qoczedq7jpv@thunk.org> Organization: Intel Corporation X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Nov 2017 13:13:55 -0400 "Theodore Ts'o" wrote: > On Thu, Nov 02, 2017 at 04:42:56PM +0100, Paul Menzel wrote: > > > > The Linux serial console documentation [1] says that 115200 is the maximum > > supported baudrate. > > > > > The maximum baudrate is 115200. > > > > Is that still accurate? If yes, where should I look to support higher > > values? > > See the setserial man page and the spd_* options: Those have been obsolete for over a decade and doesn't work on all devices. The core Linux code supports arbitrary baud rate setting. Although it was designed with the glibc maintainers at the time it seems they never adopted it so you have do the following Linux specific: struct termios t; iotl(tty, TCGETS2, &t); t.c_flag &= ~CBAUD; t.c_flag |= BOTHER; t.c_ispeed = input baud; t.c_ospeed = output baud; ioctl(tty, TCSETS2, &t); and it'll let you ask for any speed you want including things like midi baud rates. 76Kbit for ESP8266 devices and so on. After the calls check the c_ispeed/c_ospeed to see what you got. Alan