I need to communicate with a device with a rs232 out put,but my laptop doesn't
have a rs232 port,then i bought a rs232 to USB converter and now i want to listen on the
usb port for data,can i use jssc to achive this. ???
I know this is months old, but I see no answers. The answer is yes.
You can test your cable by going to the JSSC google code project page and access the Wiki tab's JSSCTerminal link. It's a Java Applet Terminal program that allows you to connect a device via your cable, set port, speed, stop bits, etc., and then send commands and receive data.
I am successfully using JSSC to write Java programs to download data from Blood Glucose Meters and GPS trackers to my Linux and Windows 7 desktops and my Windows 7 laptop. My serial-to-USB cable uses an older Prolific chipset. The FTDI chipset should work too.
Once the appropriate drivers are loaded in your OS the OS sees the connected cable as a COM port in Windows and usually as the serial device /dev/ttyUSB0 in Linux/Mac. At this point you can use any Terminal/Comm program or library to interact with them including JSSC. You can download and run the examples unchanged from the JSSC project.
this lib is used by arduino ide on that purpose https://github.com/arduino/Arduino/blob/master/arduino-core/src/processing/app/Serial.java
Related
I have an iOS application with a tableview which I would like to send text strings via bluetooth to my Macbook indicating which cell was selected by the user. Both have bluetooth 4.0. This information will be fed into a Java application. From a CoreBluetooth perspective, the iOS device will be a peripheral and my Mac would be the central.
The problem I'm having is around setting up the central. Apple documentation gives a lot detail around building a central manager within a Mac OS X application (xcode, CBCentralManager). However, I'd like the data to be pulled into a Java application running on my Mac.
Do I need to build a Mac OS X application to wrap my Java application to build this type of communication? Should I consider another method of bluetooth communication i.e. BluetoothManager.Framework? I do not need to submit this to the Apple Store. Is this a TCP/IP problem?
I figured it out. My solution is based on Ray Wenderlich's Network Tutorial for iOS. I created the python server, tethered my iOS device via bluetooth to my Mac, and transmitted messages via port 80 on my Bluetooth PAN IP address. Then I created a Java client to connect to the python server to receive the messages!
So what i'm trying to do is get the serial number for a usb to serial converter. I have an FTDI FT232 usb to serial computer connected to a Mac OSX and i would like to read the metadata for that usb to serial interface.
In Mac OSX the FTDI FT232 usb to serial converter shows up under USB subsection in System Information.
Is there a way to read this metadata information that is presented here, using Java.
Under windows similar information is presented in the device manager and can be accessed through the windows registry. I am wondering if there is a way similar to that for accessing this metadata.
Thanks.
You can iterate over the USB hierarchy using a command line tool. I described the process in another post.
I would like to transfer data from a USB Host (of my Laptop or Android Device) to Serial COM port (of a Desktop PC) through a USB - Serial port(DB-9) adapter.
Is there any library existed to do this task??
i have already studied and tried http://developer.android.com/guide/topics/connectivity/usb/host.html but failed.
Can i send data by a using a java program or Android App from my Laptop or Android Device ??
Can i receive data by an app in Desktop PC and show us????
If so please guide me how.
Yes, this is possible, the implementation will depend on what device you pick.
Check out the usb-serial-for-android project for the communication from Android to the USB device. This has support for most major USB to UART Bridge devices such as a Silicon Labs, Prolific, FTDI and CDC Class devices.
You can talk to it as a serial device from your laptop computer using normal serial communications such as POSIX method for Linux or OSX or the Commuincations API for Windows.
I want to read sms from sim which is connected to my laptop by dongle(USB connector) using java code, I know that I have to use AT commands but I don't know which commands and how ???
If you are using Windows 7 and a reasonably new modem, you don't have to use AT commands. You can use the Windows Mobile Broadband API (it is available from Win 7 onwards).
It includes interface functions for SMS.
You need to enable a serial data connection via the USB connector to your GSM device/phone.
You will also need some type of terminal emulation software to connect and communicate to your phone.
You did not say what Operating system/Hardware you were trying to do this from, or what model of phone, this can affect the AT command set you need to use to access the SMS info, so I can't be more specific.
I have done this a few years ago using a bluetooth connection to a Motorola Razor from a mac Laptop, using a small Realbasic program to send and recieve SMS messages as a proof of concept for sending server monitoring messages to IT staff via sms. You can google the AT for GSM command set.
I wish to connect 10 usb modems to a windows/linux pc and send AT comments to them to send sms and receive sms from them. Is this possible in Java?
I think it is possible. You just have to know the COMM port ID for each modem. I do not know pure java way to discover these IDs. So, you need some platform specific way (e.g. WMI on windows or some command on Unix). But once you have ID it should not be a problem.
Assuming the USB modem implements a serial interface, it should get a COMM port id. If so, you can use RXTX to talk to the model.
afaik, you can use serial communication while talking to usb devices as long as device hardware contains an ftdi chip or so. I used a c++ serial lib in a Qt project, talking to an Arduino connected on a usb port. arduino appears as a com device.
otherwise, you may look at the jusb project: http://www.ibm.com/developerworks/library/j-usb/index.html