Author Topic: Serial Port on LAN PC data to/from Web Server  (Read 16636 times)

Parappa

  • Member
  • ***
  • Posts: 4
Serial Port on LAN PC data to/from Web Server
« on: November 03, 2010, 12:15:12 am »
Hi all,

I am new to this forum :)

If anyone can help I would be very grateful.

I would like t work out how to control a device which is connected to the Serial Port my PC (running XP) from a NAS based Web Server on the the same LAN.

The idea is to have a web page being served on my NAS Web Server that has a simple page with a few radio buttons that when pressed will turn on/off whatever is connected to my XP PC.

At the moment I have managed to get a PIC to talk to my PC - this was a really big achievement for me as I am not a software/hardware professional and I have limited experience with these things.

I can use Telnet on the XP machine to turn on and off a LED via the PIC which is connected to the Serial Port. Another example would be to get the PIC to send simple data like temperature to the Web page just for fun.

I am really excited that I have started this hobby and really want to improve and be able to do more simple things like this. It is my hope that I can improve and enjoy this new hobby. But I am finding that stuff like PHP and Visual Basic is way outside of my abilities at this stage so I consider myself as a total beginner. The learning curve is very steep and trying to figure these things out on my own is not proving to be very productive...(spent days trying to write a VB app to read and send serial port and ended up getting nowhere!).

Any help is really appreciated!


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Serial Port on LAN PC data to/from Web Server
« Reply #1 on: November 03, 2010, 08:46:52 am »
Take a look at the Lantronix Device Server and other serial servers. I have links here:

http://www.janaxelson.com/ethernet.htm

Jan
« Last Edit: June 27, 2015, 09:49:04 am by Jan Axelson »

Parappa

  • Member
  • ***
  • Posts: 4
Re: Serial Port on LAN PC data to/from Web Server
« Reply #2 on: November 03, 2010, 10:24:13 am »
Hi Jan,

Thank you so much for your reply and that is a really good link.

I did not know it was possible to have such a box and it certainly is a really good idea because you do not need to have the PC switched on. And I can just plug these boxes in to the ethernet wall sockets and put a serial device straight on to the LAN with an IP!

Because I can not afford to buy a Lantronix unit yet I still wanted to to try and be able to control the serial port on my LAN XP from the web page.

So I looked on Sourceforge and found a program called 'SerServ' but I do not know how to run the files on my PC. I do not know what to do with the Win32.MAK file... (I tried to Google .MAK files but could not find out how to run them)

Also I managed to run Any Serial Port but I do not know how to populate the program to make it do what I want.

I would really like to learn how to understand these things....

Thanks for your help :)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Serial Port on LAN PC data to/from Web Server
« Reply #3 on: November 03, 2010, 09:21:17 pm »
You'll need to know how to do three things:

1. Communicate with the PIC. It sounds like you have that figured out.

2. Create a web page and place it on the server. Many ways to do this. 

3. Place active content on the web page. Java servlets and CGI programming are two options for this.

Jan

Parappa

  • Member
  • ***
  • Posts: 4
Re: Serial Port on LAN PC data to/from Web Server
« Reply #4 on: November 03, 2010, 11:23:48 pm »
Hi Jan,

Thank you for the reply,

1. Yes, so far I am pleased with the PIC side of things
2. Thanks for explaining this step - I was over complicating this before:)
3. Brilliant :) This makes a lot of sense to me and I think it is a good way to pull data in to and out of the web page.

Your breakdown has helped out a lot.

Also, I have done a lot of looking in to the Lantronix boxes and they are perfect - so thanks again for the idea.

Bypassing the networked XP PC and going straight on to the LAN with a network addressable serial device is a much better way of getting data on the network for the web server to pick up from. If only for the reason that the alternative is to have a dedicated PC switched on all the time just to send low baud rate serial data.

I just need to get skilled up on the programming side of the web server now :)

Parappa.