programming advice needed....


 
Thread Tools Search this Thread
Operating Systems Linux programming advice needed....
# 1  
Old 02-08-2004
Question programming advice needed....

i'm a grad student taking a UNIX course and a networks course (i have a background in C++ and JAVA). i'm trying to combine the two classes.
My questions stems from a networks programming homework assignment below:
"Using the operating system and language of your choice, develop a program to set and monitor a serial interface. Display the interface status at the start of the program. Initialize the interface (DTR, RTS, 8 data bits, no parity, 19,200 bps). Report all interface status changes."

first question:
I want to try this on Linux RedHat (newbie)....can this program be done using shell commands (bash or korn)? Or are those too 'low-level' and i should write it in JAVA on the linux machine?

second question:
once i do start the programming (regardless of language)....if i compile and run it on the RedHat linux machine any idea whether i can connect serial ports (RJ-11 connection) to a computer running Windows XP Pro and not have any interference with the different OSs?
# 2  
Old 02-09-2004
trostycp, this isn't meant to sound condescending in any way, but it is gonna be a bit unhelpful ... please look at the site rules. Esp number 6.

I was and still am a student and I know the best thing you can do is try till you get stuck, and then turn to your teacher...

But from first glance at your question, are you sure you aren't thinking this through too hard? If your networking class doesn't require you to know java to take the class, then they shouldn't expect you to use java for the assignment. Same with c++...
# 3  
Old 02-09-2004
is advice on a homework problem shunned?

I didn't want anyone to code for me....I just wanted to make sure I wasn't wasting my time trying to fit the cylinder shape in the opening to the triangle shape.
I was hoping to expand my horizon in Linux and bash....but I didn't want to spend more than 48 hours wasting my time. The class is already demanding enough.
What class in graduate school doesn't expect you to know some form of high level programming language?

Just because arithmetic isn't a pre-requisite to calculus....doesn't mean you don't have to know it.
# 4  
Old 02-09-2004
Re: is advice on a homework problem shunned?

Quote:
Originally posted by trostycp
is advice on a homework problem shunned?
In a nutshell, yes; instructors won't see this site as credible if it is a place for students to just have their homework done.

I'm not talking about your specific question though; I mean in general.
Quote:
I didn't want anyone to code for me....I just wanted to make sure I wasn't wasting my time trying to fit the cylinder shape in the opening to the triangle shape.
There're questions that having nothing to do with hmwk, questions that are flat-out attempts to just have homework completed by someone here, and a whole lotta gray in between. I'm sure if someone feels inclined, they'll point you in the right direction or help you along... esp since you appear to know quite a bit about what you're doing.
# 5  
Old 02-09-2004
i understand where your coming from...

I think there are a lot of grey areas in that department...but I think if no code is posted....the question is simply "directional".
solving general issues.

yes....i could and maybe should just approach my prof.
# 6  
Old 02-10-2004
Quote:
originally posted by trostycp
(i have a background in C++ and JAVA)
In java for instance, use the javax.comm API


Quote:
originally posted by trostycp
I want to try this on Linux RedHat (newbie)....can this program be done using shell commands (bash or korn)? Or are those too 'low-level' and i should write it in JAVA on the linux machine?
bash or korn may have a API. The choice is yours. What do
you feel more comfortable programming in. Also, some API's
might be better in some languages then in others.

Java (javax.comm API) is just ok for what you want. If this
were a real app and not HW. C would be better.

Quote:
originally posted by trostycp
second question:
once i do start the programming (regardless of language)....if i compile and run it on the RedHat linux machine any idea whether i can connect serial ports (RJ-11 connection) to a computer running Windows XP Pro and not have any interference with the different OSs?
JAVA is platform independent for one thing. It is more the way
you transfer the data. In the end it is all binary anyway.

If you need examples of using javax.comm API go to sun. HINTSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Issue with ACL's (Help/Advice Needed)

Hi Experts,,, Need your help/advice on how to fix this I have 2 users under same group (primary group) and i want to give 777 permissions on a directory to one dir owned by user1 when granted i can see than from getfacl but when i actually login as user2 i can touch a file . ... (3 Replies)
Discussion started by: maddyfreaks1
3 Replies

2. Shell Programming and Scripting

[Solved] Permission problem, programming advice needed, Perl

Hi all, I have written a wrapper script in Perl which will be used on AIX, Linux and Windows and I do not want to change any code for the needs for a specific OS if avoidable. It works fine so far on all 3 OSes, not blowing up any stacks any more, but I am unsure how to handle writing log files... (7 Replies)
Discussion started by: zaxxon
7 Replies

3. Shell Programming and Scripting

Need Advice for This Programming way

Hi All, I am working in production support environment And I have a lot of checks done daily on system And depended on values I take specific decision I am going to develop script to do general operation task But my problem is this script will be a running process 24 hours I... (5 Replies)
Discussion started by: maxosmanpad
5 Replies

4. Programming

System + Network Programming, your advice required???

Dear friends, Before putting my questions forward, I would like to put some data infront of you, hope you will help me at the end. This website Cray-Cyber - Welcome provides free access to many supercomputers and mainframe computers. When you login through ssh, they provide you with a screen,... (5 Replies)
Discussion started by: gabam
5 Replies

5. UNIX for Advanced & Expert Users

System + Network Programming, your advice required???

Dear friends, Before putting my questions forward, I would like to put some data infront of you, hope you will help me at the end. This website Cray-Cyber - Welcome provides free access to many supercomputers and mainframe computers. When you login through ssh, they provide you with a screen,... (0 Replies)
Discussion started by: gabam
0 Replies

6. Linux

Scripting advice needed

Evening all, Im trying to get a script that will: Select the most 3 recent files in a specific directory Run a command on them (like chmod) Ask of you would like to continue Copy the files to another directory If a linux guru could help me out, it would be very much appreciated. Thanks... (2 Replies)
Discussion started by: Wiggins
2 Replies

7. UNIX for Advanced & Expert Users

'for' loop advice needed....!!

Scenario: Command used to capture IPs on a host: /usr/sbin/ifconfig -a | grep "inet" | egrep -v "inet6|0.0.0.0|192.168.100.2" | awk '{print $2}' Following for loop used to capture interface names: for INTERFACE in `/usr/sbin/ifconfig -a | nawk '$1 ~ /:$/ && $1 {sub(":$", "", $1); print... (3 Replies)
Discussion started by: ak835
3 Replies

8. Shell Programming and Scripting

Advice needed on using Script with NOHUP

All, I would like to know my below requirement can be achieved in any way in Shell Scripting? I will make this requirement of mine as understandable as I can. Requirement: I wrote a script 'my.script' which gets user-input tablenames and puts the same into an array. Also I get other inputs... (6 Replies)
Discussion started by: bharath.gct
6 Replies

9. Shell Programming and Scripting

'for' loop advice needed ....!!

/usr/sbin/ifconfig -a | grep "inet" | grep -v "inet6" | grep -v "127.0.0.1" | grep -v "0.0.0.0"|grep -v "192.168.100.2" | awk '{print $2}' I use above command to get IP addresses on AIX boxes.Values coming here are set to a variable "Host IPs.IP Addresses" in my fingerprinting engine. ... (4 Replies)
Discussion started by: ak835
4 Replies

10. Programming

urgent advice needed - gcc

what does the statement : static char a = "a"; store in the executable image. ?? I need to make a command line parameter exist AFTER the program finishes execution.. so that when i run the code next time ( without recompiling ).. i can work with the paramter.. for example: ... (5 Replies)
Discussion started by: a.k.aFireknight
5 Replies
Login or Register to Ask a Question