I have a BS microcontroller sending data over the serial port to a pc with php. the data is indeed sent as it is displayed within the terminal window. So I have sent and received data over the serial link. But I cannot seem to capture the data using php, all I want to do is capture the data and display it on a web page. I Have used fread, fgets, looked into the uart fifo buffer and also looked into data streams, but there is so much I'm a bit lost.
When I try to fread, the web page just freezes any of you php gurus have any good ideas.
Thanks.
From the nubee
boonboy
4 17825 code green 1,726
Recognized Expert Top Contributor
all I want to do is capture the data and display it on a web page
This is quite a specialised subject. Before you can start to process the data you need to be able to read the data stream and understand its protocols.
I Have used fread, fgets, looked into the uart fifo buffer and also looked into data streams,
These are FILE commands. You are trying to read a serial port. You need the address of the port to start with, then an understanding of the HI and LO ports and whether using 16 bit or 32 bit. I recommend reading through the port using C, into a file, then read the file and output to web page using php. You have a long way to go
Motoma 3,237
Recognized Expert Specialist
What environment (OS) are you using?
It is unlikely that the user Apache runs as will have permission to access your serial port by default. You will probably need to modify the permissions (or the user) which Apache is run as.
What environment (OS) are you using?
It is unlikely that the user Apache runs as will have permission to access your serial port by default. You will probably need to modify the permissions (or the user) which Apache is run as.
I am using debian. My web page writes to my device using fopen & fwrite as linux treats all devices just like files, i changed the permissions of the port to read,write,execute for all using chmod 777. Device is also replying back (The returned value from my device shows in the debug window) all I need to do is take the value that has been sent & display it. Could it be an issue where the fread command is missing the data being sent.
I have a BS microcontroller sending data over the serial port to a pc with php. the data is indeed sent as it is displayed within the terminal window. So I have sent and received data over the serial link. But I cannot seem to capture the data using php, all I want to do is capture the data and display it on a web page. I Have used fread, fgets, looked into the uart fifo buffer and also looked into data streams, but there is so much I'm a bit lost.
When I try to fread, the web page just freezes any of you php gurus have any good ideas.
Thanks.
From the nubee
boonboy
Have a look at this, it may help
http://hardware.newsforge.com/article.pl?sid=06/02/02/1647248&tid=87
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: ^CeFoS^ |
last post by:
Hello to everybody,
I've done an application that draws in a frame the trajectory of a
robot. The robot position is readed through the serial port, and
several commands are wrote through the...
|
by: collinm |
last post by:
hi
i send a command to a led display, the led display is suppose to return
me some character
i write a string on a serial port
void ledDisplayExist()
{
char msg={'\0', '\0', '\0', '\0',...
|
by: Kevin |
last post by:
Hi all
I am having a problem reading from a serial port, first of all I have now resorted to using the MSComm ActiveX control on my Windows Forms to provide me with the interface to my serial...
|
by: joe bloggs |
last post by:
I am writing a mobile application to interface with a legacy system and I am
planning to use web services to communicate with this system. The legacy
system receives data through a serial port. ...
|
by: Mircea |
last post by:
Hi everybody,
I have a big problem. I am trying to use serial communication in C# 2. The
problem is that the event DataReceived is never fired. I have tried on two
computers and it does not...
| |
by: Rob |
last post by:
Hi all,
I am fairly new to python, but not programming and embedded. I am
having an issue which I believe is related to the hardware, triggered
by the software read I am doing in pySerial. I...
|
by: naveen.sabapathy |
last post by:
Hi,
I am trying to use virtual serial ports to develop/test my serial
communication program. Running in to trouble...
I am using com0com to create the virtual ports. The virtual ports
seem to...
|
by: Hal Vaughan |
last post by:
I've done a fair amount of Googling for information on reading the serial
port in C++ (and in Linux). Unfortunately, out of every 4 hits, 1 seems to
be an unanswered question, 1 is someone saying,...
|
by: terry |
last post by:
Hi,
I am trying to send a character to '/dev/ttyS0' and expect the same
character and upon receipt I want to send another character. I tired
with Pyserial but in vain.
Test Set up:
1. Send...
|
by: lutherchp |
last post by:
A baffling end to my week! I open my serial port on my Debian PC (Debian version 5.0.1) I have a decent Null Modem lead going to another PC (I'll call it PC#2), with its port open with the same...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |