LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-05-2011, 12:47 PM   #31
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,582

Rep: Reputation: 2312Reputation: 2312Reputation: 2312Reputation: 2312Reputation: 2312Reputation: 2312Reputation: 2312Reputation: 2312Reputation: 2312Reputation: 2312Reputation: 2312

Your correct per the specification the max number of receivers is 32 and understand how it works electrically. I've used RS-485 for both home and work projects but have never exceeded the limit.
 
1 members found this post helpful.
Old 07-05-2011, 01:55 PM   #32
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 313

Original Poster
Rep: Reputation: Disabled
to Post 20 of the TheNbomr it looks like first cut I will be using a local interface of I guess a window variety. I am shying away from using the internet for system control purposes as if the interface was broken into a lot of damage could occur. The internet will at this point only be used for getting data and graphs. I will also use the internet to send update code to the boxes. The boxes will have a boot loader and the update could take place at night when evapotrasporation is low. The code sent over the internet will be encoded as well as that transported over the serial bus to the boxes. Could I do html to a http server locally? That would solw the window interface problem. Alvin....
 
Old 07-09-2011, 02:41 AM   #33
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You can use IP (Internet Protocol) for communication without being connected to the Internet. That is done routinely. You can therefore host a local-only HTTP server to serve HTML and communicate with your control system.

--- rod.

Last edited by theNbomr; 07-09-2011 at 12:08 PM.
 
1 members found this post helpful.
Old 07-09-2011, 10:29 AM   #34
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 313

Original Poster
Rep: Reputation: Disabled
If I did a local http server as well as one over the internet (the same) would people on the net be able to access the local html and thus have control of my internal system? It look like now I will only allow people on the net to capture statistical and my greenhouse status information from the database. Also, I am leaning to using a database for inter routine communications (FIFO) as it would survive a crash where data in memory would not. Alvin...
 
Old 07-09-2011, 01:19 PM   #35
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
An HTTP server answers HTTP requests from clients. The secure-ness of your HTTP server and the applications it supports is wholly dependent on how you set it up. It is possible to make web-based applications very secure, but it does take some knowledge to do so. Web-based systems are used to convey financial transactions routinely and securely all the time.

There are two real and distinct levels of network hardening which are in the domain of control systems. First is the resiliency of the system to nonconformant behavior. This includes the whole gamut of things such as
  • network upset due to device failure or misconfiguration
    • What happens when a router/switch/hub fails?
    • What happens when some software-based component fails or is misconfigured?
    • What happens when a cable is disconnected or improperly connected?
  • undesired traffic, either legitimate or not
    • What happens when someone sends non-native traffic on a shared network segment?
    • How to defend against intrusive attackers?
It is no accident that defending against hackers is the last item on the list. All of the other items are much more likely to occur and provide equal or greater risk to your control system.

Secondly, within the framework of a fully functional control system there is also a potential for access control. What I mean by that is somewhat akin to the access control features provided by a Linux filesystem. There are distinct actions and behaviors defined by a control system, and access to these can be limited or granted based on many different criteria that your system will define. You may wish to allow certain people/groups access to some functionality, or restrict access
based on needs, expertise, system state, etc.

Consider the control system for a large commercial building. It will have control-points/process-variables for many different things such a various room temperatures, air-flows, building security, elevator status & control, fire & smoke alarming, various mechanical system matters, etc. Who gets what kind of access to what process variables and under what conditions is a function provided by the control system. The building security staff would need access to security systems, but not room temperatures or boiler controls. The building mechanical engineer would probably be given full access to all mechanical systems. Some people might get read-only access, while others get read-write access. Some access might depend on where/when the access is from; local access might be fully read-write, but off-site access read-only. You get to define what if any of these kinds of controls are necessary.

The direct answer to your question is that it is possible to set up a web server on a router host, where internal and external clients can access it. This can be done securely.

--- rod.

Last edited by theNbomr; 07-09-2011 at 01:21 PM.
 
1 members found this post helpful.
Old 07-09-2011, 01:40 PM   #36
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 313

Original Poster
Rep: Reputation: Disabled
Thank you TheNbomr for your detailed answer to my question. Alvin....
 
Old 07-12-2011, 01:15 PM   #37
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 313

Original Poster
Rep: Reputation: Disabled
I have incorporated some features down into the devices on the serial network. This will make them available to single users (single device) systems which translates to mass market. Unfortunately mass market means that the uses will have a high probablility of being Windows users as I loose control that I would have over big users forcing them to buy a pc and run Linux. Thus I must make 1) a windos program to communicate to the box to set such things as time and date and a small set of other things I can't go into here. 2) I will need to make or find a USB to RS485 interface. The one positive things about windows is that I can still can use html to simplify graphics programming (full screen programming) to communicate to the windos program that talks to the serial box(es). But I guess if I have a windows program that means GUI interface; it is just that writing a program with a GUI is hard (only did it back in 1985 on a Lisa / MAC XL using the apple toolbox.) Your thoughts are appreciated. Alvin...
 
Old 07-12-2011, 01:52 PM   #38
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
If you estimate your market to be truly large, then farm out the programming job. You don't want to ship crappy software to a gzillion Windows users. If you do it right, you may be able to create a cross-platform product (think Java).

--- rod.
 
Old 07-16-2011, 12:10 AM   #39
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 313

Original Poster
Rep: Reputation: Disabled
IF I wrote a java jre6 gui would it work on linux?
 
Old 07-16-2011, 12:24 AM   #40
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 313

Original Poster
Rep: Reputation: Disabled
Is there a visual java like visual basic?
 
Old 07-16-2011, 12:30 AM   #41
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
Not sure whether IBM still make VisualAge for Java or not; and if they do
I don't know whether it's available for Linux. But yes, if you built a
java program most aspects of it should work on Linux ...


Cheers,
Tink
 
1 members found this post helpful.
Old 07-16-2011, 10:52 AM   #42
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I don't know anything about any visual Java, but there are two cross-platform IDE's that include GUI designer/builder tools: Eclipse & Netbeans. I don't do any real Java programming, but people I know and trust are happy programming in Java with these products, and use them on at least Windows and Linux, perhaps also Solaris and Mac.

--- rod.
 
Old 07-26-2011, 10:17 AM   #43
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 313

Original Poster
Rep: Reputation: Disabled
Windows (UGH)

It looks like I will have more small users than large users. Thus I cannot force the user to use Linux. They will most likely be windows users. But I would like to stay with Linux and only write for one operating system. I have heard that there is a package the runs Linux under Windows. Would this be a viable route. My major concerns are: A) can I communicate with the serial port ? (most likely an RS232 to USB with a virtual COM: device) and B) would Apache work in that environment again to the outside world? Thanks. ALvin....
 
Old 07-26-2011, 10:36 AM   #44
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Sounds like you mean Cygwin. Apache should run okay as a cygwin application. I think your serial IO will work, but I've never tried this. Now that you've brought this up, I think I will try it as soon as I get access to a Windows host.

I would be a bit concerned about requiring Windows users to install Cygwin to run your application.

--- rod.
 
Old 08-03-2011, 01:10 AM   #45
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 313

Original Poster
Rep: Reputation: Disabled
Update on the project. With some changes to the device it has been found that a larger audiance will most likely be available. It will be difficult to force this audiance of small systems to install linux. Thus they will mostlikly be using a version of Windows. It has been suggested that I use JAVA to provide cross platform viability. I still need the windows version of a daemon. This I have found out is a SERVICE. I have also found out that software called JAVA SERVICE WRAPPER exists that can take a java program and turn it into a service. I will continue to explore these new developments and any comment you would like to make would be greately appreciated.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Enterprise LAMP Summit & Big LAMP Camp LXer Syndicated Linux News 0 09-21-2009 01:51 AM
LXer: LAMP vs. LAMP Rematch LXer Syndicated Linux News 0 11-08-2006 03:03 AM
A program for FC4 to communicate with a Windows Hyperterminal Program at other end vhasun Linux - Software 2 05-19-2006 02:54 PM
My C Chat Program is unable to communicate. mcp_achindra Programming 1 03-20-2004 10:04 AM
program to communicate directly with ethernet sabby Programming 4 12-18-2002 11:37 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration