🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: php.install
Article #1

how connect USB to Serial(RS-232) on php for get weigh bridge data

#1
From: Sudhakar A
Date: Tue, 23 Apr 2024 10:59
46 lines
5821 bytes
--0000000000004925230616c176b6
Content-Type: text/plain; charset="UTF-8"

Hi,

Recently I have been trying to connect and get data from the serial
port(Weigh Bridge) . But I could not do it.
Am using PHP version 8.3 & windows os and port is 'COM3', baud rate - 9600.
Existing weighbridge software works fine. I want to move existing(from .net
to php) software.
I tried the 'php-serial' library but it is too old and also not working.

i tried below link code but not working :
https://gist.github.com/gravataLonga/6c89821b845d15e939a0
https://stackoverflow.com/questions/11680339/access-serial-port-via-php

Can you give me the correct one library or send me for php 8.2 versions.
Is it possible to get data from the serial port on the latest php version?


Regards
Sudhakar
PHP developer

--0000000000004925230616c176b6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,=C2=A0<div><br></div><div>Recently I have been trying t=
o connect and get data from the serial port(Weigh Bridge) . But I could not=
 do it.<br></div><div>Am using PHP version 8.3 &amp; windows os and port is=
 &#39;COM3&#39;, baud rate - 9600.</div><div>Existing=C2=A0weighbridge soft=
ware works fine. I want to move existing(from .net to php) software.</div><=
div>I tried the &#39;php-serial&#39; library but it is too old and also not=
 working.=C2=A0</div><div><br></div><div>i tried below link code but not wo=
rking :<br><a href=3D"https://gist.github.com/gravataLonga/6c89821b845d15e9=
39a0" target=3D"_blank">https://gist.github.com/gravataLonga/6c89821b845d15=
e939a0</a><br></div><div><a href=3D"https://stackoverflow.com/questions/116=
80339/access-serial-port-via-php" target=3D"_blank">https://stackoverflow.c=
om/questions/11680339/access-serial-port-via-php</a><br></div><div><br></di=
v><div>Can you give me the correct=C2=A0one library or send me for php 8.2 =
versions.</div><div>Is it possible to get data from the serial=C2=A0port on=
=C2=A0the latest php version?</div><div><br></div><div><br></div><div>Regar=
ds</div><div>Sudhakar=C2=A0</div><div>PHP developer</div></div>

--0000000000004925230616c176b6--
Technical Details
Message-ID: <CACME-ud4ZEfrPSH2rw-4Ld3b5kkVnMjM2bk3iyhoo6Eq1vpBDg@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!news.php.net

Show Full Headers
Complete Article Headers
Message-ID: <CACME-ud4ZEfrPSH2rw-4Ld3b5kkVnMjM2bk3iyhoo6Eq1vpBDg@mail.gmail.com>
Subject: how connect USB to Serial(RS-232) on php for get weigh bridge data
Date: Tue, 23 Apr 2024 16:29:58 +0530
From: php@bullmachine.com (Sudhakar A)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!news.php.net
Newsgroups: php.general,php.install
X-Original-To: php-general@lists.php.net
Delivered-To: php-general@lists.php.net
Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5])
 by qa.php.net (Postfix) with ESMTPS id 98C001AD8EC
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail;
 t=1713870072; bh=RDDPmr7+OkBFr8lMk6w7ELitEzk13glIEooL+lpAnhg=;
 h=From:Date:Subject:To:From;
 b=BY3wU+G5lDAZvgIqhW1W6MIt5wX0LzbFWnOMw8+CIDqa6u5/eNRUIVeMxs/MqvUKU
 4PrydWsMNFg6cDr6/c2tu12q9lrWgP3O1W9q60JOYa53PKB3Srh9Kcajc4faw196O0
 lDk2Eh9uLzottCkjC/OBRtWPsiPj2AQfKlmLqEUozBx0qT0NiOqX/MUaFmdmdNbRc3
 NN39ZixEYXRqHy6fgHi5Ur6sGMvMimthZUXb3ui+WmlayD6whh3k0hd7UMyy6QLSva
 R/YXbFocHC4uleCawCtZgF7zyL9XaFcsjpo7C6wI/nRaYrxPtG0tQt0IkpeC/+AxV2
 l3yTnwFr0/5Mw==
Received: from php-smtp4.php.net (localhost [127.0.0.1])
 by php-smtp4.php.net (Postfix) with ESMTP id 5D223180570
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED,
 DKIM_VALID,DMARC_MISSING,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,
 RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR
 autolearn=no autolearn_force=no version=4.0.0
X-Spam-Virus: No
X-Envelope-From: <php@bullmachine.com>
Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by php-smtp4.php.net (Postfix) with ESMTPS
Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2dd19c29c41so36289971fa.3
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=bullmachine-com.20230601.gappssmtp.com; s=20230601; t=1713870029; x=1714474829; darn=lists.php.net;
    h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
     :date:message-id:reply-to;
    bh=RDDPmr7+OkBFr8lMk6w7ELitEzk13glIEooL+lpAnhg=;
    b=2lIo6yjoI7NOnbHDMYU/wyMEZggAYDGI0o0q+RStFtmj7o1BnDPywTnSrLsOXe9zlH
     Au82tlq8h1pU66x/wYxqZwoBR9PscOKqaLNdKa/xs3g9CMJR7a1gCeEl96hfCTj32oaC
     maJ2xHLk9XsN64vet/kut4gDFH/ZlbUN2z62zKRhOixqPSJYxSeis2G3cUdo8hwnckzz
     TIUyY4P5i8UnhrkoNG4dVbwO20xijOqifsVXsZWDxYKvbTjAp2Hrx8HZFBchzKBoUG40
     m1R5VDzREw+Cem3ryosGqOZl/7lWFHiCLUzUtHD66SpUJiHzaJoID/4DWjWBuswcSgE6
     JtgQ==
X-Gm-Message-State: AOJu0Yy1MArpnpb/sMkAzTgptL+MdfNAFtxbR76JiQflPSFnUZw+BPqK
 3wt+MiImDwichpiITGQ1SPl3JOTny9rHZ8e1jN4+bFgSPbHcuv8Lse5mkDnxAfjODlViqkMVg5V
 aXTeYn4bv0sMlJJr0+BULtHxZnaHLHp41MKJfN0xHPFyg0pei/lK3
X-Received: by 2002:a19:6443:0:b0:51b:45fd:ee2 with SMTP id
 b3-20020a196443000000b0051b45fd0ee2mr3363448lfj.15.1713870029259; Tue, 23 Apr
Precedence: bulk
List-help: <mailto:php-general+help@lists.php.net
List-unsubscribe: <mailto:php-general+unsubscribe@lists.php.net>
List-post: <mailto:php-general@lists.php.net>
List-Id: php-general.lists.php.net
MIME-Version: 1.0
To: php-general@lists.php.net, php-webmaster@lists.php.net,
 php-install@lists.php.net
Content-Type: multipart/alternative; boundary="0000000000004925230616c176b6"