ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Click here to see the post LQ members have rated as the most helpful post in this thread.
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....
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.
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...
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.
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...
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).
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 ...
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.
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....
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.