1-wire API Java/.NET/Serial/USB?

rappa

Member
I'm considering purchasing some 1-wire devices but I'm confused a bit as to which host adaptor I should buy. I'd like to keep my options open and be able to program in either .NET (windows) or Java (windows/linux). As I understand it, if you want to program in .NET, you can use the serial or usb adaptor and develop with the high-level, 1-Wire API

http://www.maxim-ic.com/products/ibutton/s.../tmex/index.cfm

The .NET API appears to be written in J# and interacts with the host adaptor via the low-level TMEX API, although you should be able to use any .NET language with it.

The Java API http://www.maxim-ic.com/products/ibutton/s...e/1wire_api.cfm
appears to rely on RXTX, which is a serial driver implementation, available for a variety of platforms (linux, mac, windows). My understanding is that it's not possible to use Java with the USB driver, on any platform.

Any help would be appreciated. Thanks
 

ericvic

Active Member
The Java API will use either RXTX or TMEX on Windows. It will only use RXTX on other platforms. So if you are targeting platforms other than Windows then you would need to use a serial adaptor. But if you are on Windows (any programming language) you can use either serial or USB.

Eric
 

rappa

Member
Thanks for the clarification. I think I'll go with the usb version and keep my serial port available.
 

dhayner

New Member
ericvic said:
The Java API will use either RXTX or TMEX on Windows. It will only use RXTX on other platforms. So if you are targeting platforms other than Windows then you would need to use a serial adaptor. But if you are on Windows (any programming language) you can use either serial or USB.

Eric
I've been trying to run Tim Bitson's SimpleWeather on a Linux (Fedora Core 6) platform, but haven't been able to get it to see the serial port.

I think I have the Java Comm API correctly installed per Java Comm Serial API How-To for Linux.

I am new to Java, though, and may not have the correct code to connect to the serial port. I'm basically using SimpleWeather as-is, with the serial port name "ttyS0" (my Linux user account is a member of group tty). Can someone please provide me with an example?

Thanks,

Denis
 
Top