pyserial with 250000 bit/s



  • Hi together,

    i want to use the usb connected to a usb2serial adapter with 250000 bits/s. But the pyserial packet allows only 115000. Can anyone give me a hint to upgrade the packet? There are a few informations about this problem using a rpi (http://www.alexenglish.info/2014/04/patching-pyserial-fix-baud-rate-limitations) but as far as I understand this only happens in older versions of pyserial. Since 2.7 it should be solved. I use 3.4.
    So mybe it's not a problem with pyserial but with a kernel modul?

    Thanks for help



  • Short update to my question. As far as I understand the problem isn't the pyserial library. It seems like the problem is how linux works with serial devices. Often the tty port itselfs don't allow more than 115kbits. So normally you can modify the port to support higher speeds. Some informations are here: https://discuss.96boards.org/t/linaro-ttymsm1-uart0-dmx-250000-baudrate/887
    So I have to execute the following commands:
    apt-get install setserial
    setserial -a /dev/ttyUSB0 spd_cust
    setserial -a /dev/ttyUSB0 divisor 96
    stty cs8 -parenb cstopb -F /dev/ttyUSB0 38400
    setserial -a /dev/ttyUSB0

    But unfortunately setserial and stty are not availible in the repros. But I found them in some newer repros at openwrt. Next problem I have is, that setserial is not working. I get the following error:
    root@Omega-11E7:~# setserial -a /dev/ttyUSB0 spd_cust
    Cannot get serial info: Not a tty

    Some additional infos I have found: https://www.downtowndougbrown.com/2013/11/linux-custom-serial-baud-rates/
    But I don't understand how I can use this formations. I am not a C developer.

    Hopefully someone can help me with this new informations.
    Thanks a lot.



  • I'm having this problem as well.
    As far as I can tell I should have 250k baud rate support.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.