Com,unicting on Serial Port using RXTX on Mac System!

Hi,
I have written an application which acts as an interface between the GPS device and Mac System. I have used rxtx api for communicating on Serial Port. The communication works well for some time. This device gives NMEA output and its proprietory sentences as output too. It is a GPS data Logger. I have to pass different commands for communicating. For instance for login purpose I have to pass the command $PLSC,231,1*FF. And on passing this command the device stops giving NMEA sentences. And responds back with $PLSR,231,1,1,00000000,GPSLOG*33. Sometimes this output and NMEA output both gets mixed up such as $PLS,$GPRMC,00000GPS,,,,.
The devices windows application which is not developed in Java works fine. Is it the problem with Serial API or some other issue. The device operates at 4800 baud rate.
Can anyone over here help me out?
Thanks & Regards
Sunil

This is just a shot in the dark.
Try right-clicking on the VISA write and select "do I/O syncronously".
If this works, please let me know. I have been trying to figure a good reason to do serial I/O "syncronously" but was not able to come up with one until I read your question.
Curious,
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • How to transfer file from PC to PC via serial port using labview

    I need to transfer files(.txt, .doc, .xls) from PC to PC via serial port using LabVIEW. Is it possible to transfer files, if so how to transfer?
    Solved!
    Go to Solution.

    Yes, it is possible to transfer files with the serial port using LabVIEW.  Files are just collections of bytes and the serial port is pretty good at shipping bytes from one PC to another.  You need to connect the serial ports together with a null modem cable.
    First, take a look at the example for serial communication.   In LabVIEW, go to the Help menu and select "Find Examples...".  From there you can search for "serial" or navigate to Hardware Input and Output >> Serial.  Select the "Basic Serial Write and Read.vi".  Experiment with that example to gain confidence on the serial communication methods.
    Next, it's time to learn about how to read and write files.  For that, the examples could be somewhat confusing since they all deal with files that are presumed to have data of a specific type in them.  I would recommend just getting familiar with the functions on the File I/O palette.  Specifically, get to know the following functions.
    Open/Create/Replace File - On your destination side, you'll need to create the copy of the file that you are trying to transfer
    Close File - When you are finished reading from or writing to a file, you should close it.  It cleans up the memory being used and finalizes any write operations that are still floating in the write buffer.
    Read From Binary File - The best way to read from a file when you do not really care what type of file it is.  In your case, you just want to get those bytes read and sent out so they can be written down at the destination.
    Write to Binary File - At the destination side, this is what will store those bytes to the file you created with number 1.
    Get File Size (under the Advanced File Functions sub-palette) - You need to know how big the file is so you know when you are finished.
    OK, so once you are able to create files, write bytes to them, and read bytes from existing files you can move on to transferring.
    The basic method I would suggest is to have the user specify a source file on the source PC and a destination folder on the destination PC.  Then, find out the size of the source file using number 5.  Divide that size number by the number of bytes you feel like transferring at once.  The serial buffers are usually around 32k (if I remember correctly) so do not exceed that.  Now begin sending data by reading some number of bytes and wiring that string output to the VISA Write function.  On the destination side, you'll want to be monitoring the serial port for bytes and reading them when they arrive.  Wire that string to the Write to Binary File function to add them to your destination file.
    That is the basic outline of how to do it.  You have to be careful not to overload the write and read buffers on the serial ports.  Initially you can use delays on the sending side to make sure the reading side has enough time to digest.  To get things moving faster, you can bring in some flow control.
    If all that sounds a bit intimidating, there are Alliance Member companies out there (such as PrimeTest Automation) who can write such code for you and even provide a turnkey solution for you.
    Happy wiring,
    Dan Press
    Certified LabVIEW Architect
    PrimeTest Automation

  • Any way to communicate with Serial PORT using JavaScript

    is there any way to communicate with Serial PORT using JavaScript ??
    Dont tell me to do it in java because I need to this on client side not on server side.
    such as when client pressed the button, a javascript function will be called and in that function I need to communicate with the serial port of that client... That action will not go to server side.

    Is there any way to send a string of bytes to the serial port from the client side ?
    Just a button on the web page that sends out stuff to the comport.
    I was hoping to do this using java script also ..

  • Problem connecting N79 to serial port using blueso...

    Greeetings to All,
    I have a big problem, when i connect my n79 using bluesoleil v3.0, i got File transfer, dialup networking and object push services only.
    If i try to start serial port service to connect my n79 to a serial port it displayes error "can not start service".
    i have tried various bluesoleil versions but the problem remains same everytime. on the other hand i can connect my sony k750i to a serial port without any problem.
    can someone tell me how to connect n79 to a serial port using bluesoleil
    OR
    Does N79 not support bluetooth serial port connectivity?
    or is there any other way to connect n79 to a serial port using blesoleil and my bluetooth dongle on a WINXP SP2 system?
    Thanks in Advance

    Yes, PCSuite supports a great deal of Bluetooth drivers. These are all built in so, give it a try.
    Windows Vista x32 en x64 editions:
    Microsoft Windows Bluetooth stack
    Toshiba Bluetooth stack, driver versie 5.10.12
    IVT BlueSoleil Bluetooth stack, driver versie 5.0.5
    Windows XP x64:
    Microsoft Windows Bluetooth stack
    Toshiba Bluetooth stack, driver versie 5.10.12
    IVT BlueSoleil Bluetooth stack, driver versie 5.0.5
    Windows XP:
    Microsoft Windows Bluetooth (enkel in Service Pack 2)
    Toshiba Bluetooth stack, driver versie 4.0, 5.0 and 5.10.12
    WIDCOMM Bluetooth stack, driver versie 1.4.2, 3.x, 4.x and 5.x
    IVT BlueSoleil Bluetooth stack, driver versie 2.x, 3.x and 5.0.5
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • Unable to capture data from Serial port using LVRT2010 in single core pentium 4 machine

    I am using application written in Labview using windows Labview
    Runtime environment 2010. Application creates a tunnel to intercept data from
    Serial port.
    My problem is, Currently, I am using single core Pentium
    processor. When I am trying to intercept the data between COM1 and COM7 (COM 7
    is a virtual port) it is not able to capture data.
    When I am running Labview RT environment using dual core
    processor machine it is running normally. I wonder whether it could be the compatibility issues with
    single core Pentium processor.

    Hi Magnetica
    Are both of the machines running the same runtime engine,
    drivers ect?
    Have you had RT applications running on this
    machine before?
    Is the development computer a 64bit machine?
    The processor is a supported model (See link below).
    http://zone.ni.com/devzone/cda/tut/p/id/8239
    Regards
    Robert
    National Instruments UK & Ireland

  • How can I read a serial port using XCode?

    Hello,
    I'm using an iMac 2009 with Mac OS X 10.6.7. I have a USB to Serial cable and I want to connect a hardware I made using a microprocessor Microchip PIC to my mac. I'd like to read values from the serial port and also write values to it. I'm already able to do this using the Terminal with the following command:
    screen /dev/tty.usbserial 9600
    I'd like to build my own application now. Does anyone could send me any sample code?
    I'm using XCode 3.2.5 and I'm a beginner on XCode.

    I looked at Dev Center for sample code, and I found this link:
    http://developer.apple.com/library/mac/#samplecode/SerialPortSample/Introduction /Intro.html%23//apple_ref/doc/uid/DTS10000454-Intro-DontLinkElementID_2
    I downloaded the sample Xcode project and, when I click on "Build and Run" button, it generates an error with the following message:
    "GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file SerialPortSample.c)"
    Maybe, it occurs because the code is too old (2005). I didn't find any newer sample.
    Could you help me?
    Thank you.

  • Problem in Accessing serial port using java comm Api

    I have installed java comm Api in my pc.
    i have gone through the instalation instruction which comes on this package.
    I have done the instalation like this
    Copy win32com.dll to my <JDK>\bin directory.
    Copy comm.jar to my <JDK>\lib directory.
    Copy javax.comm.properties to my <JDK>\lib directory.
    and restart the system.
    But when i run the BlackBox , it is giving me message
    "serial port not found".
    Can any one tell me , what is the exact problem ?

    I'm not sure what you mean by BlackBox, but I have used the COMM api extensively.
    The majority of problems is that the api cannot see the serial port (which is what you are describing) and this is caused by incorrect placing of the javax.comm.properties file.
    As well as <JDK>\lib, try putting it into <JRE>\lib as well. That has often solved problems on my setup.

  • How to access serial port using servlet

    I want to communicate with a microcontroller connected to the serial port of my computer.
    *I am using the following:
    Windows 98 operating system
    Tomcat web server 4.1
    *The directory structure is as given:
    Tomcat 4.1/webapps/myjsp/web-inf/classes/remoteservlets.
    I have placed my jsp files in my jsp folder and classfiles in remote servlets folder.
    **my java program has compiled correctly.**
    ** my simple java application which accesses the serial port works fine.***
    *when I start tomcat I am able to access the sevlet as the servlet responds with the button name i have pressed.
    **** I have also tried the following
    Copied file comm.jar in <JAVA_HOME>\jre\lib\ext
    Copied file javax.comm.properties in <JAVA_HOME>\jre\lib
    Copied file win32com.dll in <JAVA_HOME>\lib and also in c:\windows\system32 and c:\windows\system
    ***************which helped me do away with errors.
    still I don't get any output. I dont get any errors either.
    PLEASE HELP. URGENT. i am at my wits end.
    Thank you.

    Servlet is the one which runs in the server side...if u want to comunicate with the serial port of the server in which ur servlet is running can be done but making use of Communication api available....
    U can download the Api from http://java.sun.com/products/javacomm/index.jsp
    There are three levels of classes in the Java communications API:
    High-level classes like CommPortIdentifier and CommPort manage access and ownership of communication ports.
    Low-level classes like SerialPort and ParallelPort provide an interface to physical communications ports. The current release of the Java communications API enables access to serial (RS-232) and parallel (IEEE 1284) ports.
    Driver-level classes provide an interface between the low-level classes and the underlying operating system. Driver-level classes are part of the implementation but not the Java communications API. They should not be used by application programmers.
    regards
    shanu

  • Control Camera Attibutes through serial port using VISA commands

    Hi there,
    I'm using a Basler acA2000-340kc camera through an PCIe-1473R FPGA as frame grabber.
    I would like to be able to configure the camera through the serial port just in LabView, not using a third-party as Pylon (which I can do now).
    According to this forum post 
    http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/My-Basler-acA2040-180km-NIR-is-not-visible-in...
    this is possible just taking the VI posted here
    https://decibel.ni.com/content/docs/DOC-5049
    and converting from IMAQ to VISA, as RIO frame grabbers cannot use IMAQ. I have been trying to do this by changing the IMAQ vi to their VISA equivalents, but I have no good results.
    Does anyone know which are the steps to go from that piece of code to one that can be used to control the camera in my case?
    Thanks a lot,

    Hi i.popa,
    Basler makes the Basler Binary Protocol Library for serial communication with their cameras. If you make sure you're running the serial server section of your FPGA code to keep the serial port open, you should be able to use calls from this library to communicate with your camera. We have a community example with more information on using the Call Library Function Node to call a DLL. This DLL will take care of all the processes needed to write from and read to the registry, so this implementation will probably be similar to the example program you listed above, using calls to this library instead of the IMAQ Serial functions.
    Good luck with your application!
    Emily C
    Applications Engineer
    National Instruments

  • Problems with access to serial port using reentrant code

    Hi,
    I have a VI that send commands and receive answers from an instrument using
    de serial port.
    This VI runs perfectly when used alone.
    However I'm trying run two instances of that VI simultaneously using
    reentrant code and I'm facing some problems.
    Sometimes everything is OK but sometimes, in the process of writing to
    serial port the following error happen:
    Error code 36.
    Invalid refnum device.
    What is this?
    Does someone know how to prevent this?
    Thanks in advance for any help.

    "Paro, Paula [CMPS:2721:EXCH]" wrote:
    >
    > Hi,
    >
    > I have a VI that send commands and receive answers from an instrument using
    > de serial port.
    > This VI runs perfectly when used alone.
    > However I'm trying run two instances of that VI simultaneously using
    > reentrant code and I'm facing some problems.
    > Sometimes everything is OK but sometimes, in the process of writing to
    > serial port the following error happen:
    > Error code 36.
    > Invalid refnum device.
    >
    > What is this?
    > Does someone know how to prevent this?
    >
    > Thanks in advance for any help.
    You can't use reentrant vi's vith serial vi calls without supervising of
    driver.
    Use VISA instead and you have to control the VISA session opening and
    closing. Another word is that the only one serial port sess
    ion should be
    opened at a time.
    Reentrant vi's for serial port without checking serial port session is a
    mistake of program algorithm. Change it in any convenient way.
    Sergey Krasnishov
    Automated Control Systems
    National Instruments Alliance Member
    Moscow, Russia
    [email protected]
    http://acs.levsha.ru

  • RT, calling serial port using a C-DLL?

    Is it possible in RT to directly call the serial port (not using VISA or Serial) using a C-DLL?
    I have existing C-code for a xmodem protocol and I'd like to build a DLL from this.
    Greetings,
    VDB

    You can call a C DLL from Labview using the Call Library Function Node found in the Advanced function palette.  There are many things to be aware of.  Like an int in C is a I16 in Labview and such.  You cannot pass Labview strings into a C DLL without first converting the string into an array of bytes(U8).  Clusters and C-structures don't quite match up, some things to learn here also.  Go to the NI website and search for "DLL".  You will see links to many white papers and such that can get you started.
    I am assuming that RT has the same Call Library Function Node function call available as regular Labview.
    If you are having problems, list your DLL parameters and I will try to match them up to Labview types.
    - tbob
    Inventor of the WORM Global

  • "how to read serial port using labview 6.0"

    sir i am doing a project and is in a need to extract data from serial port. can anyone help me

    This link, and the links from it, are a great place to start:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/8DECBF3E0B714BF3862568F9006E7851?opendocument
    2006 Ultimate LabVIEW G-eek.

  • Using Serial Port as Console (not Mac OS X Server)

    Folks using other Unix-y operating systems, as well as Mac OS X Server, can use a terminal plugged into their machine's serial port as a console to access the shell. I've searched high and low for a way to do this with regular Mac OS X Leopard with no luck. None of the solutions for Linux/*BSD/etc... work.
    Any ideas?
    (FYI: I'm using a USB to 9pin RS-232 cable. I've confirmed that my Mac can talk to the machine attached via this interface.)

    I fixed it. It turns out that the Leopard -> Snow Leopard Migration screwed up the Subversion repository various credentials for user/group and other during the migration copy. Fortunately I had "cloned" my entire Leopard disk. I copied the cloned repository into the Snow Leopard disk and everything works. It looks like this was the fault of the Apple Migration process.

  • Serial Ports using HyperV in Ubuntu guest OS

    I need to run a terminal session (term) from within the guest OS, Ubuntu 12.04.3 LTS to a serial port on the Windows 8.1P host. In my case a USB to serial adapter that Windows has mapped to COM5.
    I don't really know where to start.  In HyperV, under Settings, I see a Com1 and Com2 under hardware. The two options are None or Named pipe.  Not all that clear what to do here.
    Presumably this is what will be visible to Ubuntu as  /dev/ttyXX   ??
    Can anyone point the way to map a serial port into Ubuntu?   Or a suitable workaround?
    Thanks.

    "How can a VM be so cut off from the hardware like that?"
    Well, for the most part, it's been a long time since I have even seen a machine with a serial port on it.  It is so uncommon that one generally needs to buy an add-on card or do something like USB to serial.  That trend has been going on for a
    long time - that's why network based serial devices have tended to the solution for this.  This is nothing new.  Even Microsoft's Virtual Server, the precursor to Hyper-V (which was released five years ago) did not have access to serial ports.
    Since you are asking in the Hyper-V forum, the answer is you can't get to a physical serial port on your host.
    .:|:.:|:. tim

  • How to read and write from the serial port using java

    can anyone tel me how to capture data from a serial port and display on the screen and also store it in a database.

    Java Comm API, JDBC

Maybe you are looking for