Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

sending sms using at commands, difference between hyperterminal and visa

Solved!
Go to solution

hi all,

I want to use my mobile phone accesing it using AT commands. When I type the command in hyperterminal it works, but when sending it through rs232 LabView instead of 'OK' I get the same I've just sent. What is the difference between sending chars by HT and visa?

 

When I type  (in HyperT)

AT , I get

OK

when I send

AT (in LabView) get

AT

 

??

 

0 Kudos
Message 1 of 9
(6,319 Views)
Solution
Accepted by topic author przemmo
Are you sending a termination character? Use \n for a line feed or \r for a carriage return. Your string control/constant needs to be set to '\' Codes Display in order for this to work. Look at the Basic Serial Write and Read example.
0 Kudos
Message 2 of 9
(6,316 Views)

Yes, I've forgotten about such a simple thing!

 

Respect

0 Kudos
Message 3 of 9
(6,312 Views)

I'm attempting the same thing and am having this problem as well, LabVIEW 2009 SP1 on Windows XP SP3.

 

I get error -1073807298 from the serial write VI, preventing me from reading the response from the Mod/Dem.  The simple command I'm using (at) works fine in HyperTerminal, I get an "OK" response.

 

I've used every terminator I can in every configuration I can.  I've matched the port settings in LabVIEW to the Hyperterminal port settings.  I've made sure I'm using the '\' Codes Display as suggested.

 

As suggested I've looked at the serial write/read examples with no results.

I've also looked at sending_numeric_page.vi here: http://zone.ni.com/devzone/cda/epd/p/id/2433

 

I see the same error on that VI, the Mod/Dem executes all commands, but the responses are not captured because of the error.

 

I'm convinced that I'm missing something simple here but cannot fathom what it might be.

 

Thank you for any assistance or advice you can offer.

 

Chris

 

Message Edited by ChristopherS on 05-12-2010 12:04 PM
0 Kudos
Message 4 of 9
(5,727 Views)

I've since read these three similar discussions but have been unable to see results from applying the recommendations found there.

 

http://forums.ni.com/ni/board/message?board.id=140&thread.id=40750

 

http://forums.ni.com/ni/board/message?board.id=140&message.id=1249&requireLogin=False

 

 http://forums.ni.com/ni/board/message?board.id=170&requireLogin=False&thread.id=179185

 

I've tried changing the serial write to synchronous/asynchronous.

 

I've confirmed that my COM (9) is available in Devices and Interfaces of Measurement and Automation Explorer, however when I click "Validate" to check my port settings this message is given:

 

Could not open a VISA session to "ASRL::INSTR".

VISA Error Code 0xBFFF0072.

The resource is valid but VISA cannot currently access it.

 

This must be the problem...  I'll search for this error now.

0 Kudos
Message 5 of 9
(5,708 Views)
OK, never mind.  Two minutes later VISA is able to open a session...  LabVIEW must have hung the port...
0 Kudos
Message 6 of 9
(5,703 Views)

Here it is, it's working.  I had to set the TX buffer size.  This VI sends a command to a MOD/DEM reads the RX buffer until empty and displays the response in a string indicator.

 

I added tags explaining each step, hopefully this will save someone else a lot of grief some day.

0 Kudos
Message 7 of 9
(5,678 Views)

Can anyone may please upload the pic of this solution from hardware to software so that one may try it.

Thanks

0 Kudos
Message 8 of 9
(5,114 Views)

A picture of my set up won't help you because the hardware you use (a USB cable that interfaces your computer with the device to which you wish to issue AT commands) is going to vary, without knowing the device you're working with I can't help you.  Drivers are going to be device specific and you will need a version that generates a virtual COM port when the device is connected.

 

Typically one would install the driver package, connect the device to the computer with a USB cable, install and configure the drivers, note the COM port in the device manager (devmgmt.msc from the command line).  The default connection configuration (port speed, stop bits, etc) is usually good enough to get you started.

 

Hyperterminal can be found on Hilgraeve's website, http://www.hilgraeve.com/hyperterminal/.  I set it to echo typed characters so I can verify what I've entered, you might find this helpful as well.

0 Kudos
Message 9 of 9
(5,104 Views)