Closed Thread
Results 1 to 4 of 4

Thread: talking to the serial port

  1. #1
    aloishis89 is offline Newbie
    Join Date
    Aug 2008
    Posts
    12
    Rep Power
    0

    talking to the serial port

    I am trying to use php to talk to a microcontroller via the serial port. As far as I know, there are 3 ways of doing it: using fopen(), using the serial class, and using the serial extension. I know my microcontroller code works because I can manually send stuff over the serial port and it responds as expected. I want to send a single ascii character at a time. I just want to make sure that each of the methods work the way I think and was wondering if there are any more ways. Can you talk to the serial port just using fopen()? And can I just send over ascii characters with the serial class and serial extension? I have noticed that using the serial class takes much longer than the other 2 options.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20

    Re: talking to the serial port

    In Linux you can do just about anything using fopen. I can't say the same for Windows. However, I can't begin to understand why you would want to do this using a programming language designed to implement websites.

  4. #3
    aloishis89 is offline Newbie
    Join Date
    Aug 2008
    Posts
    12
    Rep Power
    0

    Re: talking to the serial port

    I am actually trying to control the serial port over the web, so I can remotely control my microcontroller. I am not limited to php, if there is a better way to do that, then I am certainly open to it.

  5. #4
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20

    Re: talking to the serial port

    I would probably use a NetBurner Embedded Ethernet Board that directly supports TCP/IP. However, if you must use a PC as a middle man, C++ (CGI) would be your best bet, but Python is also fully capable of communicating with a serial port.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. General Serial Port
    By mebob in forum Assembly
    Replies: 11
    Last Post: 12-16-2010, 03:08 PM
  2. serial port problem
    By sandro76 in forum C and C++
    Replies: 3
    Last Post: 12-17-2009, 05:17 AM
  3. serial port problems
    By infineonintern in forum C and C++
    Replies: 0
    Last Post: 06-01-2009, 08:48 PM
  4. serial port problem
    By mld in forum Pascal and Delphi
    Replies: 1
    Last Post: 08-27-2008, 08:44 AM
  5. Bluetooth Serial Port
    By TcM in forum Technology Ramble
    Replies: 2
    Last Post: 02-27-2008, 09:22 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts