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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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: Sat Dec 21 18:01:29 2024 UTC