I have 2 gprs/gsm modems with me at the moment one of them is huawei and the other is a prolink modem. I have no problem sending or receiving SMSes via AT Commands. However I am trying to receive automatic notification using this command AT+CNMI and I am not able to get it to work but when I try this command the modem replies with ok with no errors.
Procedures that I have performed so far
Tried numerous combination for the AT+CNMI commands 2,1,0,0,0, 2,2,0,0,0 and etc but to no avail
I have set the preferred message storage to sim card and I am able to receive message and extract it as well using various AT commands.
I tried in hyperterminal as well as using C sharp but to no avail. The built software that comes with the modem are able to receive the notification. Can someone guide me on this.
Many of these types of devices use different commands. Some use proprietary commands. Since it works fine with the included software, I would recommend figuring out how that works.
The easiest way to do this is to fire up some free serial port monitoring software. Once you get it set up, start up the software the device came with and see what commands it sends. Then, you can use those same commands yourself.
I managed to figure out the problem already :) . Basically the modem that i used makes use of several different ports and the new message notification will be received by another port. Problem solved.
Related
I want to make a simple desktop app that receives data from my phone and does certain stuff accordingly. I don't need to send any more than 1 byte. I tried UDP but it requires firewall bypassing which is a spooky popup to click on. I also tried Bluetooth but I couldn't get it to work because most of the documentation is about BLE not Bluetooth Classic. Is there any other way I can communicate with another device from a short distance even if I'm just limited to sending 1 byte? I would like topics to research but code samples are also welcome, preferably in C#.
I'm trying to communicate with a microcontroller CL3-E from Nanotec using the Modbus module with the RS232 connection. The program I've been able to develop lets me send messages to the microcontroller and receive messages from it.
Doing this and giving some tries to the program, I've seen that I constantly receive the same error with the same Exception Code (2). Searching in the Internet, I've seen it has something to do with the addresses and the mapping of them, but I'm not being able to see it. It is my first time programming a communication between devices, so, if apart of solving my question, you know some bibliography I could check, I would appreciate it!!!
The register number I'm trying to access is the 0x6060, and the function number is 0x10.
I'm looking into developing software that would be able to listen for commands sent across the COM1 serial port, interpret them and send back unique data based off of that command.
ex) if the listener reads a command sent as 0x05, it would send back 0x10.
We currently have software in C# that sends commands across COM1 to our hardware products, but during development we are not guaranteed to always have hardware available to test on and ensure the GUI controls are functioning properly. This listener would help alleviate that issue. My coworker has been refining a python script that utilizes the Pyserial package which I plan on using to handle command protocol.
So ultimately, I am expecting my C# application to have COM1 open and sending commands while the listener program reads any data sent, interprets it and sends back the correct response. Is this the correct way of going about this?
com0com creates virtual com ports on the computer so you can run both programs on the same computer without multiple com ports and loopback cables. This could be handy when doing this kind of things.
Is this the correct way? It sounds to me like it would be easier to add a emulate mode to the C# software when it returns it's own answers without making a complex thing with serial ports and another piece of software that needs maintaining.
I developed a c# application which is read the device through serial port. I achieve write to it but not properly. Now my sceneraio is the formatting the device through serial port automatically. First of all i have to send a keypress when the device wait for it(when i see in the richtextbox "hit any key to stop autoboot"). How can I do that? I achieve this with writing to the serial port (serialport1.write("xxxx\r\n")) when i get the hit message in the richtextbox but i think it is not a good idea to fallow the richtextbox. Can you suggest any other way?
My important question is let's think about we handle the hit message and stop autobooting. Now we have to send commands to the device for formating. For example first one is fdisk command, second one is ext3format and third one is fatformat. These commands takes time when you send these to the device. how can i sync my commands and the device, because when i trying to do that i got some problems. The problem is i have to send other command after the first command sent and device finished its job. I can only fallow the richtextbox and according to the output i m trying to send the fallowing commands. Can you suggest any other way? Do i have to fallow richtextbox outputs, is there any other way to understand the device finishes its job after sending commands?
THANK YOU
Apparently, you are using a remote console into the device via a serial port connection (telnet?), and the device is using linux. so basically you are simulating user input and output in your program.
You need to recognize the output the device is sending byte by byte, first of all. Do not focus on the "richtextbox", you are only using that to display what you get from the device.
You need to process the serial data as it comes in and look for patterns of data that you recognize (for example, the result code from the format command, the text sent over when the command prompt is visible again, etc).
When it says "hit any key", you need to send a character over the serial port that the device recognizes.
you also need to know which terminal mode emulation (google this) the device is expecting you to use, because this affects how you should format codes sent to the device and how you should interpret characters you receive from it.
What you want to do is straightforward, basically you are writing an automated remote terminal for the device, but it does require some reading on your part, and stop focusing on what a textbox displays and start focusing on the data bytes going into and out of your device.
I need to create a program that lets me send a string of data or a file through modem, like hyper-terminal does. Im trying to create a program that lets me send electronic billing data to Medicare, and since Medicare only accepts e-bills through modem, only hyper-terminal or another program called PC ACE Pro32 can be used.
I want to create my own program, since hyper-terminal is not user friendly, and the other program has too many things for just sending data.
I've never before had experience creating code for data communication. Can somebody please help me?
There are a lot of pieces here, so let me break this down into sub questions for you:
1) How do I do serial communication in C#?
There are plenty of examples on the internet. A quick search turns up this one and this one, both of which seem to be ok. There are also lots of questions here on SO about C# serial communication.
2) How do I control a modem?
Modems are operated by some version of the AT command set. If you're familiar with manually operating a modem in HyperTerminal, you're essentially doing the same thing, but in code. For example, to test if your modem is paying attention (i.e., that your serial line is talking to the modem properly), you send AT, and see if the modem replies with OK. To dial, you send the modem ATDT <phone number>. Once a modem establishes carrier, then whatever you send down the serial port is transmitted to the remote computer.
3) How do I communicate with medicare's electronic claims system?
This one is up to you! I'd be surprised if they didn't have a web-based claims service though. I would expect that would be a lot easier than doing it over a modem.
Define a receiving connection in remote computer.
Set up a connection to remote computer just like any dial-up connection.
Use socket programming (TCP) to send/receive data to/from remote computer. Note that you must create a client/server application that resides in both remote and local computer.
Seth, your answer is actually very promising. Ill be taking a look at those suggested links right away.
(yes, medicare should be moving to ethernet, but reality is that they are stuck in dialup because they say that "it's more secure than ethernet", when in reality it's not.