[Interest] Serial Port custom baud rate problem

Stefano Cordibella stefano.cordibella at edalab.it
Mon Oct 21 18:33:32 CEST 2013


Thank you Denis for your suggestion about reporting my problem as issue 
on bug tracker.

I have just reported it in 
https://bugreports.qt-project.org/browse/QTBUG-34212

Frederic, I would kindly suggest you also report your valuable 
experience there! ;)

Stefano.

On 10/18/2013 07:41 PM, interest-request at qt-project.org wrote:
> Hi Stefano, > This could be a serial port library bug or a driver 
> issue??? It is unknown, maybe yes or maybe no. :) You should do some 
> debugging of the library and view the content for the 
> "currentSerialInfo" struct. For us it is interest the value of 
> "currentSerialInfo.baud_base" field, see file "qserialport_unix.cpp", 
> method QSerialPortPrivate::setBaudRate(). You should help to us for 
> quickly resolve of this issue. Also you can do posting this issue to 
> bug-report (it is preffered way, IMHO). Best regards, Denis 18.10.2013 
> 19:15, Stefano Cordibella ?????:
>> >Thank you Fr?d?ric for your suggestion!
>> >I am looking into the datasheet in order to discover these values.
>> >
>> >BTW the QtSerialPort library doesn't report anything and from its side
>> >everithing is working properly...
>> >This could be a serial port library bug or a driver issue???
>> >I think that there is no clear border, but the low level library
>> >implementation (I mean the unix system call invoked from library) may
>> >be better managed in order to check that the port is properly set to
>> >the requested frequency...
>> >
>> >Stefano.
>> >
>> >On 10/18/2013 01:02 PM, Fr?d?ric Marchal wrote:
>>>> >>>Hi list,
>>>> >>>       I am trying to communicate via serial port with a device that use
>>>> >>>125000 bps.
>>>> >>>When I set the custom baud rate the setBaudRate return true without
>>>> >>>error (I also check with debugger and the QSerialPortPrivateData
>>>> >>>inputBaudRate and outputBaudRate are properly set to 125000).
>>>> >>>But when I check with an oscilloscope the frequency of bits that came
>>>> >>>out from serial port the result is that the port is set to 115200...
>>>> >>>After sending data through serial port I print the port baudRate() and
>>>> >>>the value is even set to 125000.
>>>> >>>
>>>> >>>I am using Qt 4.8.4 (for project reason) under linux.
>>>> >>>
>>>> >>>Any ideas about this problem?
>>> >>Is your serial port capable of emitting at a baud rate of 125kbaud?
>>> >>
>>> >>UARTs often produce the requested baud rate by dividing an internal oscillator
>>> >>by an integer number. As such, they can only attain a fixed set of baud rates.
>>> >>
>>> >>For instance, an internal oscillator at 460KHz can be divided by 4 to emit at
>>> >>115kbaud but it cannot generate a clock at 125kbaud.
>>> >>
>>> >>I have seen drivers that reports an error if the requested baud rate is
>>> >>unavailable while other silently selects the closest attainable baud rate.
>>> >>
>>> >>Frederic
>>> >>
>> >


-- 
*Stefano Cordibella*
EDALab s.r.l. - Networked Embedded Systems

Strada Le Grazie, 15 - 37134 Verona - Italy
email : stefano.cordibella at edalab.it
skype : stefano.cordibella
tel. : +39 045 802 70 85
web : www.edalab.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131021/c0921b79/attachment.html>


More information about the Interest mailing list