OT:Java help

May 17, 2007 12 Replies
Jump to replies (12)

I just looked for a NG to post my query on Java. Talk about OFF TOPIC, all the groups I scanned had nothing about Java. If somebody could point me to a group that answers newbie questions on Java, I'd be most interested.



My query of the moment, I installed java from sun:

formatting link
It won't hardly run on my PC. The machine acts like its locked up - 30 seconds or more between each mouse click and a reaction on the 'puter. I've had to use the "three finger salute" and kill the app cause its not responding several times. What should I investigate?



Karl


Maybe comp.lang.java. I'm not sure how friendly they are with newbies, but I don't think they are all that off topic, mostly. What kind of systems/applications are you building? The answer will change depending on the answer. For servlet and jsp stuff the tomcat mail group is a great resource.

formatting link
as a place to get started.

Adam Smith Midland, Ontario, Canada

comp.lang.java.* or more specific: comp.lang.java.help

Nick

I'm managing to make a BIG job out of a little one. My temperature sensor and logger (need accurate info to grow apples) put out radio interference. Because the Twins changed radio stations, I'm having to turn it off for every game (we listen to ALL broadcasts) and I'm losing too much data when i go to sleep on the game and don't turn it back on before morning.

Anyway, there's a standard called 1-wire for weather data sensors. These don't have radio trouble, and I'd really like to add a leaf moisture sensor (only availble with 1-wire AFAIK) I found a book on doing this, "Weather Toys" and all the examples are in Java.

All I'm looking to do is read two sensors once every five minutes and log the result to a file. (Another program uses this data for disease modeling) Its getting to be a huge job, I'm in over my head. I'm close to pulling the plug on this whole idea.

Karl

============= google on for about 346M hits

to start see

formatting link
these look interesting also:

formatting link
IBM's DeveloperWorks features "zones" of interest, focussed on: Linux, Unicode, web architecture, Java technology, security, and XML. The developerWorks site provides an online resource for developers working on "open, cross-platform applications".

URL:

formatting link
Dobbs Online

The Dr. Dobb's Journal has a web site covering a wide range of topics including: XML, Java, C++, Linux, graphics, algorithms, networking, computer security, data compression. Each topic includes a discussion group.

URL: Programmers Resources

formatting link
URL: Dr. Dobb's
formatting link
URL: XML topic section
formatting link
Journal (was Gamelan)

Commercial, advertising supported journal concerned with Java. Includes news, articles and software downloads, now part of Earthweb.

URL:

formatting link

URL:

formatting link
mailing list

Send message: SUBSCRIBE in the subject field

URL: mailto: snipped-for-privacy@luke.org ================= Java IDL mailing list

Send message: subscribe idl-users in the body.

URL: mailto: snipped-for-privacy@java.sun.com =================== from

formatting link
. comp.lang.java. comp.lang.java.programmer. comp.lang.java.advocacy.
formatting link
=========

Unka' George [George McDuffee] ============ Merchants have no country. The mere spot they stand on does not constitute so strong an attachment as that from which they draw their gains.

Thomas Jefferson (1743-1826), U.S. president. Letter, 17 March 1814.

What does the communication with the sensor look like? Socket? Serial? Shared memory? (I realize you already answered this "1-wire", I'm asking what that entails in terms of the environment. If serial, I have quite a bit of experience with serial via java, so I might have useful stuff to add. If network, you won't need expertise: it is easy to do with the native library stuff.)

The "log result to file" part of what you want to do should be trivially easy. The tutorials at java.sun.com are an excellent resource for beginners (and not-beginners as well, in some cases). The old versions of the development kits, docs, and runtime environments are also available from java.sun.com, you want to be sure that you run what your sensor is expecting (ie version 6 might not be what you want).

Adam

The1-wire interface is a hardware device that plugs into the serial port and then connects to various sensors via 1 wire (plus ground). There is an API that makes it look like serial data I/O for your program.

That's what I thought. After four evenings of struggle, and no result, I don't know. A LOT of my trouble is this ridiculously slow Java app. I get tired of waiting, hit another key and then lock the whole thing up.

Karl

I have 1-wire sensors strung around my place, but I talk to them directly with a little microcomputer and a C program. The 1-wire protocol depends heavily on precise timing, and I doubt if the serial port adapter contains enough intelligence to hide that requirement. If your computer slows to a crawl just when it actually begins communicating with the 1-wire bus, I'd guess it is just very busy polling the serial port adapter.

If you are using a USB-to-serial adapter to get a serial port, that may be your problem. It seems random whether a particular adapter will work for such time-critical purposes. Even if you have a real serial port, the particular version of Windows (if you're using it) you have can make a huge difference. Personally I can't imagine the combination of Java, Windows, and RS-232 ever doing what my little micro does with C and a couple of hardware I/O lines, but I know they sell those serial adapters so there must be a way...

The other possible problem is the bus itself. Proper arrangement of metal content is required! "1-wire" makes it sound like any old connection should work, but in fact it is very sensitive to your cable and connection design, and needs to run on a twisted and terminated line - they recommend CAT5 cable. For initial testing, use just one sensor on a short cable, not your whole system, and even then you may need termination. Look for their "Tech Brief 1 MicroLAN Design Guide". Loren

Would you, by chance, be interested in a little custom Job?

Sun Java is quality stuff. I use it here or the rather - the software uses it.

I suspect you have a setting wrong that the software you read stuff with is over-active.

Do a control-alt-delete and see what is running and the cpu usage.

Mart> I just looked for a NG to post my query on Java. Talk about OFF TOPIC, all

Karl, email me at peterdotwileyataaddotgovdotau. I design, build and run Java based scientific logging systems. Nearly all of ours run over ip networks but one of my design engineers knows a lot about hardware, and I know a lot about Java. Been programming in it for 10 years.

PDW

Karl Townsend wrote:

I just received another query about 1-Wire communication, and did a bit of research. Looks like a lot has changed since I set up my system. There are now lots of commercial 1-Wire adapters, including some that go directly from USB to 1-Wire:

There is actually a USB solution from Maxim - the DS9490, DS9490B, DS9490R USB to 1-Wire/iButton Adapter:

Maxim really does support Java:

Their API overview description still says XP support is incomplete (but maybe the documentation lags behind the code state):

Here's someone with freeware and shareware weather station software (doesn't mention whether it uses RS-232 or USB):

Here's a free software package that claims to export 1-Wire data via DDE and support XP (you may need to use "Save Target As" to download):

(If there's a way to get that site to a language other than Spanish, I missed it...)

They mention an OPC server, but there is no link for download or info. Notes on using the DDE server:

Instructions for the buffering adjustment David mentioned:

----- For the 'userial' builds, the communication is between a UART and the DS2480B chip. A large portion of the packets sent to and from the chip are only a few bytes long. Thus is not desirable to have a large FIFO on the UART because it will introduct a delay in getting the packet. If the OS being used supports changing the FIFO settings then it is recommended to disable or reduce the depth of the FIFO to the smallest settings.

In Windows, the modification is made in the 'Control Panel' under 'System'. Select the 'Device Manager' tab and choose the 'properties' for the desired port. Click on the 'Port Settings' tab and go to 'Advanced settings'. Slide the FIFOs to the minimum settings.

-----

The "Link" adapter claims to act as a network sniffer as well as a data reader - might help in debugging the OP's problems:

----- The LINK also has features not found in a Dallas DS9097U. Used with any terminal program, the LINK can serve as a network sniffer and diagnostic tool. See Dallas Application Note #244.

-----

Or there is the Link TH which includes sensor reading software and might be a $52 solution to the OP's problem:

Hope this helps someone!

Loren

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required