Hyperterminal to serial port

I use the hyperterminal to communicate and send commands to serial port COM1.
On the hyperterminal window, I used to type such a command:
AT+ZV SPPCONNECT.......
This command is sent to the device connected to the COM1 port.
Now I want to cancel the hyperterminal, and sue a Java program.
I used the javax.comm library to build a java application that communicates with the COM1 port.
Inside that program, I connected to the COM1 port. How do I send that text command from inside the java program to the COM1 port. There is a method called (send) inside the (serialport) class, do I just say:
serialport.send "AT+ZV SPPCONNECT.......".
I mean, is sending text commands through the hyperterminal simply equivalent to sending those text commands to the COM1 port using the java application described above.
Message was edited by:
lrantisi

I wouldn't see how it could be otherwise.
Did you try it?

Similar Messages

  • I want to transfer data through the serial port in the same coding that hyperterminal uses. How can i do it?

    The serial port seems to be working, and labview seems to be sending the data, but the problem is in which format does it send the data, because in hyperterminal i just input the string "JDX" and it sends it to my device, with labview it sends something but my device does not recognize it.

    nobuto wrote:
    > I want to transfer data through the serial port in the same coding
    > that hyperterminal uses. How can i do it?
    >
    > The serial port seems to be working, and labview seems to be sending
    > the data, but the problem is in which format does it send the data,
    > because in hyperterminal i just input the string "JDX" and it sends it
    > to my device, with labview it sends something but my device does not
    > recognize it.
    Hyperterminal adds the carriage return/line feed to the string which is
    generated by the return key to send out the current line. LabVIEW simply
    sends out what you tell it, so try to set the string to "Show \ Display"
    format and add a \r or \n or \r\n to the command you want to send out.
    Assumes of course that you set the right baudr
    ate/bits/parity etc in
    LabVIEW with the VISA property node, when opening the serial port.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • I'm having trouble communicating with a transducer (Keyence LS-3100 laser scan micrometer) via the serial port. It works in Hyperterminal. Any suggestions?

    Its not a simple baud-rate or parity error. If I issue the command to send data (X1) in hyperterminal I start to get data. If I then switch to Labview I still get data. However if I try to issue the send-data command via Labview I get nothing (i.e. I can read from the device, but not write to it).
    I am on a Windows 98 (version 2) PC, running Labview 5.1.1

    Try adding a carraige return to the end of your command.
    "djb" wrote in message news:[email protected]..
    > I'm having trouble communicating with a transducer (Keyence LS-3100
    > laser scan micrometer) via the serial port. It works in
    > Hyperterminal. Any suggestions?
    >
    > Its not a simple baud-rate or parity error. If I issue the command to
    > send data (X1) in hyperterminal I start to get data. If I then switch
    > to Labview I still get data. However if I try to issue the send-data
    > command via Labview I get nothing (i.e. I can read from the device,
    > but not write to it).
    > I am on a Windows 98 (version 2) PC, running Labview 5.1.1

  • Error 37 with serial port / no with hyperterminal

    I have added to my Pc a card with two serial port, I can access to them by hyperteminal or by labview but only at port 0 and 1 at the same time or 2 and 3, if not I have an error 37. What can I do?

    Error 37 means that LabVIEW cannot find the appropriate serial device. This indicates that one of the following conditions exists:
    LabVIEW cannot open the specified serial port;
    LabVIEW cannot find the file serpdrv.
    Make sure that the serial driver was installed before the board, and that the com ports appear normally in the control panel. If you cannot get it working, contact NI through either phone or email support. Since there are several potential causes, this is difficult to diagnose without more information. You can contact NI using the following webpage.
    http://sine.ni.com/apps/we/niae_asc.main
    Kim L.
    Applications Engineer
    National Instruments

  • Using a PS/2 keyboard on a Sparc workstation through the serial port

    We have recently migrated an application that used to run on a PC, to now run on a Sparc Workstation. This is a SunBlade 1500, running Solaris 8. The application is running in a dedicated console which has a fitted keyboard and trackerball that have PS/2 connectors and cannot be changed.
    We need a way of connecting the PS/2 keyboards to the serial ports of the Sparc workstation. We already have a piece of software that will read ascii values from the serial port so we definately want to go through the serial ports.
    Can someone please suggest what converters will be required to get the output of the keyboard and trackerball as ascii input to the serial port.

    Actually, that's not a bit perverse, at all.
    Jonathan's suggestion is a standard method of connecting to a server.
    (null cable between the computer serial ports)
    ... see the Solaris man pages.
    man tip
    TeraTerm and Hyperterminal are customarily used on a PC running some dialect of Windows.
    The 'tip' command is all that's necessary between Solaris systems.
    PS/2 is not a serial connection, but is a keyboard/mouse interface 'invented' by IBM when they offered their XT-class PS/2 line of desktop systems, back in the 1980's.
    I found this next link by using Google:
    http://members.chello.at/theodor.lauppert/computer/ps2/
    The smaller DIN ports were more compact than the AT-class keyboard ports and the mouse moved from a serial port to a dedicated mouse port.
    Serial communication devices are not keyboards, per se,
    and keyboards are not serial communication devices.
    You need other hardware in between to translate what the human being sends, and another computer is a common method to accomplish that translation.
    Having said all that ...
    Since you cannot change the dedicated console hardware,
    I suggest you go to the manufacturer of that console equipment
    and have them suggest some sort of serial-to-serial interface lash-up.

  • Reading/writing to serial port w/ VISA in Labview

    I'm writing a Labview program to control and to read data from a Varian vacuum pump controller. It is connected to the serial port in my computer, and I have been trying to open a VISA session to communicate with the instrument. So far, however, the computer cannot see the instrument--I get the same error messages reading and writing to the instrument as I do to an empty serial port. Does anyone have any suggestions on what the problem might be? Thank you.

    There are a lot of possiblities. Is the cable correct? You probably need a crossover cable (TX and RX) swapped. You also need to check and make sure the serial ports on both ends are set the same (i.e. baud rate, handshaking, stop bits, etc.). Make sure that the port is enabled. I've seen people try to use a comm port only to find that a modem card installation caused the port to be disabled. You could also try using hyperterminal to talk to the instrument. If you can communicate there, you can eliminate any hardware problem.

  • USB to serial port

    Hi all,
             I am working on a VI to acquire data external to computer. The data is
    being acquired via the serial port of the computer. When i first built
    the software in labview , i tried it in my desktop( which had serial port) and it
    worked fine, i was also able to generate messages in labview and send
    it serially out.
    However now i tried it in my laptop which didnt have serial port. So i
    bought a USB to serial adapter. I can see the data from the in hyperterminal. But i cant get labview
    to work with the simulated serial port. Labview doesnt display the
    readings and gives an error: "unknown system error". I cant figure out
    why, there must be no mistake in the labview program as it works fine
    in my desktop, and also no mistake in the data being sent cause i can
    see it in the hyperterminal window in the proper format.
    Please help.
    Thank you.

    No, I am using Windows Xp only, however it has started to work today when i again tried, I do not know why!,  but thank you all for your replies, i should have posted my query after testing it thoroughly. My apologies.
    vinay
    Message Edited by raybuzz on 07-27-2009 05:58 AM

  • I pull fiftyfour bytes of data from MicroProcessor's EEPROM using serial port. It works fine. I then send a request for 512 bytes and my "read" goes into loop condition, no bytes are delivered and system is lost

    I pull fiftyfour bytes of data from MicroProcessor's EEPROM using serial port. It works fine. I then send a request for 512 bytes and my "read" goes into loop condition, no bytes are delivered and system is lost

    Hello,
    You mention that you send a string to the microprocessor that tells it how many bytes to send. Instead of requesting 512 bytes, try reading 10 times and only requesting about 50 bytes at a time.
    If that doesn�t help, try directly communicating with your microprocessor through HyperTerminal. If you are not on a Windows system, please let me know. Also, if you are using an NI serial board instead of your computer�s serial port, let me know.
    In Windows XP, go to Start, Programs, Accessories, Communications, and select HyperTerminal.
    Enter a name for the connection and click OK.
    In the next pop-up dialog, choose the COM port you are using to communicate with your device and click OK.
    In the final pop
    -up dialog, set the communication settings for communicating with your device.
    Type the same commands you sent through LabVIEW and observe if you can receive the first 54 bytes you mention. Also observe if data is returned from your 512 byte request or if HyperTerminal just waits.
    If you do not receive the 512 byte request through HyperTerminal, your microprocessor is unable to communicate with your computer at a low level. LabVIEW uses the same Windows DLLs as HyperTerminal for serial communication. Double check the instrument user manual for any additional information that may be necessary to communicate.
    Please let me know the results from the above test in HyperTerminal. We can then proceed from there.
    Grant M.
    National Instruments

  • Instrument I/O Assistant refuses to save serial port settings

    (I'm using Labview 7.1 on
    Windows XP)
    I have a problem communicating with a device over a serial port using my lab
    computer. The serial port is the only port on the device.
    I have successfully communicated with the device on this computer using
    windows HyperTerminal.
    I have successfully communicated with the device through Labview on another
    computer.
    I am using the Instrument I/O assistant to get things up and running, this
    worked fine on the other computer, but on this computer there are problems.
    When I click on COM1port "properties"  in the "select
    device" pane I get the "Edit vesa resource" dialog, but it comes
    up with a "port settings conflict", it says:
    "The Vesa port settings are different from the Windows port settings. Select the
    settings you want to keep."
    Whichever settings I choose, when I hit save I get a dialog box with the
    message "could not write specified port settings to the operating
    system." So it won't save the settings and so it won't work when I run the
    vi. (I know the right settings and they work in HyperTerminal, Labview just
    won't accept them.
    Can anyone help?
    thanks,
    Luke
    Luke_A_P

    I have solved the problem!
    It seems that admin rights are needed to save the settings, this seemed odd to me since HyperTerminal did not need them and I could change settings in device manager (which didn't help in itself). But, trying Labview with an admin logged in allowed the settings to be saved.
    Luke
    Luke_A_P

  • HP Mini - Is there a serial port?

    On the HP Mini 110-1030NR, I need to use software that communicates through a serial port but the Mini does not show any serial ports. Is there any way to enable the serial port? I have looked in the BIOS and the Advanced section is not listed which is where the HP website support says to go to enable serial ports. Am I out of luck?
    Thanks-

    HI,
    DaleWA wrote:
    Sorry I mixed too many issues in the last message. 
    I think the simpler question is:  Can I use a USB to serial adapter with the HP Mini 110-1030NR?
    If so, how do I get it to work? I have installed the driver that came with the adapter. I know the adapter worked on an old Dell laptop. So, the issue must be the HP.
    Do you still have the manual that came with the adapter?
    Does the device show up in Device manager?
    which OS is installed on your mini?
    look under Device Manager of the System Properties screen.  (Go there by Start-Setting-Control Panel-System Properties-Hardware-Device Manager-Select View-Device by connection).
    The device should have installed as a “USB Serial Port (COMx)” attached to “USB High Speed Serial Converter”.
    Change COM Port Properties & COM Port Number
    This feature is particularly useful for programs, such as HyperTerminal, which only work with COM1 through COM4.  Please ensure that you do not change the COM Port Number already in use.
    To change the virtual COM port properties:
    Select the “USB Serial Port”
    Click “Properties”
    Select “Port Setting”
    Select “Advanced”
    Click the drop down arrow on COM Port Number and scroll to the required COM port.
    Select “OK”
    Return to the Device Manager Screen.  You will see that the USB Serial Port installation has been changed to the new COM Port Number.
    Best regards,
    erico
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • NOKIA serial port

    hi,
    i want to connect to NOKIA cell phones from serial port (RS232) but i couldn't connect to my cell phone(NOKIA 7210) from my applications and HyperTerminal with data cable.i can connect from Oxygen Phone Manager II.And also with the same application,you can connect to sony ericsson modem from serial port and i can read the datas.How can i connect to NOKIA 7210 from serial port and HyperTerminal by the same way

    What has this got to do with Java

  • Serial port: Input/output signal errantly combined

    I am currently in the process of using LabView to replace another user interface for a scientific instrument.
    LabView is connected to this instrument through a serial port.  The instrument streams 25 bytes of binary data every second to the computer.  I can read the binary string (VISA Read) and save contiuously to disk using a while loop.  In addition, there are a few instructions I can send to the instrument that will do various functions (start logging, turn LEDs on/off, etc).  I can successfully send these instructions to the instrument using the previous interface, and in a stand-alone vi using VISA Write, but when I place the VISA Write function into the larger interface vi, signals go haywire.  Specifically, there are two separate LEDs that I can toggle with two different commands, but when in the larger interface vi, both commands toggle the same LED.  Also, it appears that the singal I send to the instrument (a single ASCII character) immediately bounces back to the computer into the 25 bytes of streaming binary data.  In other words, after I press the LED "on" key, one column of my streaming data changes when it is not supposed to (ex: after Binary to ASCII conversion, it changes from a single digit to a twenty digit value).
    Initially, I thought the problem was the sequence of VISA Read/Write.  In the current configuration, I read all data, then allow for Write commands.  Both the VISA functions are within the same While loop to continuously monitor the data.  Is it possible the Write signal output is not leaving the while loop and being read as input?  What would make the instrument read two different commands as the same one?  My goal is to run an interface that displays the streaming data as ASCII, and allows for a few different toggle options while the interface is running - is there are more efficient/elegant way than a while loop?
    ~Going Bananas
    Solved!
    Go to Solution.

    New replies now in gray.
    CodeMunkee wrote:
    1.  If you keep giving me good advice like this, I'll be tempted to change the background to Baltimore prison purple.
    I'll ignore this statement.
    2.  The buffer now lives outside the loop.  I understand clearly.  Part of the problem might be my instrument - when I cycle power the 19 digit number that was 'echoed' disappears.  Forget about that display stuff, it works properly - I accidentally removed the time delay when editing the vi.   But you do bring up an interesting point...
    Without the delay, the loop ran much faster.  If the bytes weren't at the port, the read statement would have returned nothing when it read zero bytes, thus blanking out the indicator rather quickly.
    Yes, Hexadecimal display shows 04 to indicate the end of the 25-byte data sample.
    Doing a bytes at port read is not always a good idea.  If not all the bytes had arrived yet when you ask for the read, you won't get all the data.  The remaining data being sent in that stream from the instrument will show up at the front of the buffer on the next read command. 
    While this isn't a common occurence, it does happen.  How can I prevent this from ever happening?
    Since you know each commands ends with a hex 04 (ASCII character for EOT), you could enable the termination character when you configure the serial port.  Set the termination character to be 4.  Then when you execute the VISA read, read a large number of bytes such as 25 or more.  The read will terminate at either the timeout, the requested number of bytes, or when the termination character is read.  With this setup, you could eliminate the wait statement and also not request the number of bytes as the port.  The VISA read will control the pacing of the loop.  Any extra bytes after the termination character are part of the next frame of data and will wait around until the next time you read the VISA port.
      3.  Implementing your ideas for the latch button works better.  I am still encountering issues with these commands however.  Attached is the new vi.  There are two commands I want to send, 't' turns on the LED light (they blink for 30 sec then time out), and the latch works perfectly for that, 'p' turns on the magnetometer light (an additional 'p' is required to turn it off), but I cannot get the command sent to the mag while the loop is running.  It turns on either at the beginning of the vi, or at the end of the vi (after Finish button is pressed).  This leads me to think the command 'p' is stuck inside the loop.  I tried adding another film strip (see attached vi) for the toggles to force the issue, but it didn't work. Additionally, the 'p' command effectively works as a 't' command, and the LED lights begin to blink when I press the 'p' button.  This isn't supposed to happen, and leads me to believe the 'p' command does in fact exit the loop but in the wrong manner.
    The "film strip" is another frame of a flat sequence structure.  It enforces the order of execution.  The next frame can't execute until everything in the prior frame has completed.  It isn't necessary in your case because the Error and VISA wires determine the order of execution with respect to the other VISA statements.  But it shouldn't hurt.
    There is no reason the "p" case structure should behave any differently than the "t" case structure.  Although you should wire the error wire through in the False case of the "p" structure like you did for the "t" structure.  There is no "exiting of the loop" in either case.  The loop runs until the stop button is pressed.  I would check the manual to see that t and p commands do what you think they should do.  Do they need a termination character of their own when they are sent?  Should they be upper case letters rather than lower case?  You can run NI Spy on your serial port and see the operations occurring with it and see the data coming in and what data is going out.  I would be suspicious that the device is not handling the command properly.
    Any ideas?  I think I've tried to put the toggle buttons outside the loop before, but then could only toggle once before the loop took over.  Ideally, these toggles would be available at any time while the data is streaming, so therefore inside the loop?
    The toggle buttons need to be within the loop so that they can be read on every iteration of the loop.  Outside the loop, as you discovered, they are only read once at the very beginning before the loop is started.
    4.  Thank you for the suggestion about the Selection Mode for the Open/Create File option.  It is annoying to create a file first.  I made the change, but I still get error messages when I use a file that does not yet exist.  LabView takes me to the first Open/Create/Replace vi when the error occurs.  Is there something else I must do?
    On the open file VI, there is an input that is Open as default when unwired.  Create a constant there and change to Replace or Create.
    Remember, if you have any questions about the way LabVIEW is handling something with serial ports, close the port within LabVIEW.  Open Hyperterminal and try the commands from there.
    Message Edited by Ravens Fan on 01-13-2009 03:55 PM

  • Strange init serial port issue

    Hello:
    My Labview application is reading data from the COM1..COM6 ports (I have
    added a MOXA serial board to get 4 more ports). I am using RS232 reading
    on each port (old legacy Vis, 9m long communication cables). The devices to which I am connected are weigh scale that continuously send weight readings to the Labview app through 3-wires RS232 (RD, TX and GND). Everything goes well for hours and hours. Then after a while (maybe after power is cut and restarted on the PC side?) I restart the PC and launch Labview. If I try to init the serial port that I use to connect to the weigh scale I get an error 37. I also tried to init thru HyperTerminal right after restarting the PC and could not. The only thing that works to unlock the port is
    this:
    - unplug the weigh scale communication cable from the Moxa connector
    - restart the PC
    - relaunch LV or HyperTerminal
    Unplug then restart Labview or HyperTerminal is not sufficient.
    To the same Moxa board I connect other devices such as PLC or PC through serial ports but never see any problems even after restarting the Host PC. So there is something strange with weigh scales (I tried two different brands) but what? I cannot use the built-in serial port as it is already in use by another application.
    Does someone out there have an explanation and ways to avoid this very annoying problem?
    Thank you very much, I am completely lost,
    Christophe

    Chris:
    Thank you for your help. I investigated the problem further and this is what I found. I am still clueless so if you think of other tracks that I might explore I would be glad to hear them.
    - Hard boot (power off, remove power cord, restart) does not release the port
    - I change the port ie. I used the built-in COM1 PC port, got the communication, could read char, then restarted the PC and fell into the same trap: could not init the port (Labview). I did the same after restarting and could not open the port with HyperT. Hence it is not a Moxa issue.
    - The question is: how can I resolve that, is it an HW or SW issue, a combination of the two, has it got something to deal with WIndows 2K, are there some tools that allow to diagnose whi
    ch service or application grasps the serial port during the boot sequence? Or is it a problem during the shutdown sequence that the port is not released properly?
    TIA,
    Christophe

  • Executable does not release serial port after being stopped

    Greetings:
    I have created an executable that communicates through a serial port.  However, if I stop the executable (not close it), the executable still has control over the COM port.  This causes issues if I need to jump on Hyperterminal to send a couple quick queries to my system.  In order to send the queries, I have to actually close the executable in order to release the COM port.  It's problematic because I then have to start the executable back up, go through another configuration query, etc. and there are parameters from the previous run I would prefer to not lose.
    Is there a way to force a LabView executable into releasing it's hold on a COM port after it's stopped, without closing the executable completely?  If it makes a difference, I'm using LV 7.1 on a WinXP machine.  Thanks for any help!

    Gumby_Dammit wrote:
    I changed the settings to have the stop button visible in the menu bar along with the start button.  This is because the user has to select their COM port before continuing.  
    Raven has already said it but I'll say it a different way.  No user should ever interact with the front panel unless the VI is running.  And when it is running the user should never have access to the abort button in the toolbar.  When you open Internet Explorer do you first need to click the run button?  No it runs when you run it.  Write your program so it is always running, and doesn't have an abort so if the user closes the program you can run the proper clean up like closing COM ports.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • How can i delay the line and charactor rate of my serial port transmisio​n?

    In hyperterminal I can pick the line and charactor rate , but I can't seem to slow down the rate when using the serial port by itself.
    Attachments:
    remod_chan_4.txt ‏1 KB
    serial_INT_chan3.vi ‏31 KB
    read_text_file.vi ‏20 KB

    There's nothing built into the VISA or old serial functions but it's pretty simple to program yourself. Here's a VI for specifying a delay between characters. It uses VISA but you can easily swap that out with the old serial write if you want. It just breaks out the text string character by character and adds a delay before each character is written. To add a line delay, just add another delay after the entire string is written.
    Attachments:
    Serial_Write_With_InterCharacter_Delay.vi ‏45 KB

Maybe you are looking for

  • Where to see the code of enhanced field

    Hi experts, there is field called ZZEDATU , for 2LIS_12_VCITM i want to see the coding for it where do i see Thanks in Advance, Nitya

  • My Safari browser is blocked by a virus warning.  What can I do?

    My Safari browser is blocked by a virus warning.  What can I do?

  • IDCS3- Importing Word Body Text: Best Approach?

    Hi all, first post here. Am relatively new to the wonders of InDesign in my new occupation, and during the current quiet period have decided to look at some areas of our DTP department and how our lives could be made easier. Currently we receive the

  • Problems with Standard Apps views (eBusiness Suite)

    Hi all, I am working with Oracle Application Express and Oracle eBusiness Suite 11.5.10. We have integrated OAE with EBS, but now we are having problems with the standard views (owner APPS). I would need the help from somebody that works with OAE and

  • Unable to create recovery disks

    Hi,i just purchased a HP Probook 4320s and i would like to create a recovery disk set as soon as possible so if i need to go back to factory settings i can do,however when i followed the instructions to do so on this site it says go to start>all prog