PHP Classes

getting 7 times FF at start of transmission - how to get rid of?

Recommend this page to a friend!

      PHP Serial  >  All threads  >  getting 7 times FF at start of...  >  (Un) Subscribe thread alerts  
Subject:getting 7 times FF at start of...
Summary:Unwanted FF at beginning of transmission
Messages:1
Author:samuel brauns
Date:2013-05-30 08:06:54
 

  1. getting 7 times FF at start of...   Reply   Report abuse  
Picture of samuel brauns samuel brauns - 2013-05-30 08:06:54
Hi all,

using php_serial.class.php with great success, but there is one remaining problem:

At beginning of my transmission i have 7 bytes of hex FF, which i can't get rid of:
FFFFFFFFFFFFFF1B5B324A1B7B21654E64

my php code looks like:

<?php
$cls = chr(27)."[2J"; // clear screen

include "php_serial.class.php";
$serial = new phpSerial;
$serial->deviceSet("/dev/ttyAMA0");
$serial->confBaudRate(38400);
$serial->confParity("none");
$serial->confCharacterLength(8);
$serial->confStopBits(1);
$serial->confFlowControl("none");

$serial->deviceOpen();
$serial->serialflush();
$serial->sendMessage($cls);

[...]

do you have any suggestions?

looking forward for your answer!
thx in advance