php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59478 Set higher bitrates on serial (USB) ports
Submitted: 2010-10-27 07:40 UTC Modified: 2010-10-27 17:49 UTC
From: evert at hetbeest dot nl Assigned:
Status: Not a bug Package: dio (PECL)
PHP Version: 5.3.2 OS: Linux (Ubuntu 10.04)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: evert at hetbeest dot nl
New email:
PHP Version: OS:

 

 [2010-10-27 07:40 UTC] evert at hetbeest dot nl
Description:
------------
DIO seems to be limited to a baud rate of 38400. I need to 
connect to my USB device with a speed of 115200. If I try that 
now I get:
PHP Warning:  dio_tcsetattr(): invalid baud rate 115200

Reproduce code:
---------------
  $fd = dio_open('/dev/ttyUSB0', O_RDWR | O_NOCTTY | O_NONBLOCK);

  dio_fcntl($fd, F_SETFL, O_SYNC);

  dio_tcsetattr($fd, array(
    'baud' => 115200,
    'bits' => 8,
    'stop'  => 1,
    'parity' => 0
  )); 


Expected result:
----------------
The settings applied as stated in the code above.

Actual result:
--------------
php index.php

PHP Warning:  dio_tcsetattr(): invalid baud rate 115200 in 
/var/www/zwave/index.php on line 11

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-27 17:49 UTC] evert at hetbeest dot nl
It does work with fopen().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 08:01:29 2024 UTC