Sending SMS through GSM modem in Objective-C - objective-c

My project is a full program to communicate with a USB modem via serial port. What I am working on now is sending the SMS. What I can't figure out is what to tell it to actually send the message. I know that in terminal you would hit CTRL-z to send the message. Does anyone know how to do this?

I finally figured it out using a combination of these two websites:
Escape Sequences (C)
ASCII Table
The ASCII escape sequence in C is '/xhh' where hh is the hexadecimal sequence, and the ASCII hex sequence for CTRL-Z is 1A, so it's just '/x1a'.

Related

concox GPS device sending special characters on the port

I tried to integrate with few CONCOX GPS devices but I am receiving special characters (below) on the port. Am I doing something wrong? I tried checking it on netstat but still getting the same special characters. Following are the 4 different data:
"?%U!5g?f2"
"xxU!5g?f2ΣΎ"
"xxU!5g?f2*A"
Is there any setting changes required on port level? I should be getting data in hexadecimal rather special characters

Java and its signed bytes: Sending hex information via UDP possible?

I am currently working on an application to change my RGBWW light strips by a Java application.
Information has to be sent via UDP packages in order to be understood by the controller.
Unfortunately, the hex number 0x80 has to be sent - which is causing some problems.
Whenever I send a byte array containing only numbers fron 0x00 to 0x79 (using DataPacket and a DataSocket), I do get an UDP Package popping up on my network monitor.
As soon as I include the number 0x80 or any other higher, I see two things Happen:
1: I do not longer get only UDP protocols, but messages are displayed as RTP / RTCP most of the time
2: The method Integer.hexToString() does not display "80", but gives me a "ffffff80".
My question: Is there something I am missing when it comes to sending hex info by UDP? Or is there another way of sending it, possibly avoiding the annoyingly signed bytes?
I unfortunately did not find any information that would have significantly helped me on that issue, but I hope you can help me!
Thanks in advance!

create a program that communicate with the arduino using VB.net

I have to create a program that send comand to the arduino;
The program must be the client and the arduino the server.
So the question is: what is the code to start the communication?
P.S. the arduino obviously have an ethernet shield on it.
I have searched on google, i found this :
For Arduino :
https://www.arduino.cc/en/Reference/Ethernet
For Windows :
http://www.nullskull.com/articles/20020323.asp
I've not used Arduino myself but a have a look at Arduino Playground:
CmdMessenger is a messaging library for the Arduino Platform (and .NET/Mono platform). It uses the serial port as transport layer. To use CmdMessenger, we define a list of command identifiers, then attach callback / handler functions for received messages.
The message format is: Cmd Id, param 1, [...] , param N;
The library gives the following functionality:
Sending and receiving commands
Calling of associated functions on received commands
Sending and receiving zero to many arguments per command
Sending and receiving of all primary types. This includes bytes, longs, ints, floats and doubles.
Sending and receiving in plain text form (human readable, robust) or in binary form (efficient)
The library can be downloaded through the Arduino or PlatformIO library manager, or downloaded as a stand-alone package, see the read-me page.

XBee S1 read values from API mode

I have two XBees S1-one attached to a temperature sensor. This Xbee reads analog values, converts them into digital values thanks to the ADC and transmits them.
The other XBee - the receiver, is connected to a computer via a USB Explorer.
This XBee works in API mode. The XBee connected to a computer receives the data send by the transmitter. I monitor the received values with the X-CTU software, version 6.2.0. Up until this point, everything works fine.
However, the problem that I encounter is that the data received on the computer is coded: there are bits corresponding to the address of the receiver, bits corresponding to the address of the sender, the data itself, acknowledgment bits,etc. My question is how can I extract only the data bits without all th other information send by the transmitter?
I tried to read the values with a USB to TTL cable, connecting this cable to the Tx, Rx,GND and 5V(there is a 5V input in the USB Explorer despite that the XBee works at 3.3V) of the receiver XBee and using the screen command in Linux. However, in this way I receive ASCII characters and I want to receive the binary code.
I want to put those values in a database in order to be able to treat them later.
Thank you for your assistance.
With a library like this one, you can use function to get the data from your Xbee in python ;) (if you use linux)
You just have to initialise the port (should be on /dev/tty...) and than catch the data with a loop which check if new data is coming.
If you need more help I can send you part of my code (doesn't have it near me, it's on my raspy)
I hope I've help you ;)
Thana

Unicode Character Corrupting Text

I have a weird situation that has been puzzling me for weeks. My project, Textual, is an IRC client for Mac OS X. It works great except one problem. DCC SEND messages via the DCC protocol do not work properly. For some reason the first section of the IP address sent for which connections will be established is always cut off. For example, the correct message sent would be "DCC SEND file.png 72.218.77.160 1097 4699" but once sent is viewed as "DCC SEND file.png .218.77.160 1097 4699"
I have isolated this to the Unicode character 0x01 which is sent along side the message to distinguish it from a standard message. If this character is removed then no stripping occurs. I simply cannot figure out why it does this. It could be a result of sockets or not. Not my strong area on that one. If anyone has time to help it would be appreciated.
After more investigation this appears to be a server-side problem and not an actual problem with the client itself.
A DCC SEND message should not contain the IP address formatted as a dotted quad - it should be formatted as an unsigned 32 bit decimal number. For the address 72.218.77.160, the message should be:
DCC SEND file.png 1222266272 1097 4699
Could be a BOM (Byte Order Mark). Which programming language are you using?
Depending on the Unicode flavor you're sending, certain meta-characters may be sent over to the other side. A good rule of thumb is to never send any flavor of Unicode to an endpoint that isn't capable of reading Unicode (some people compromise in the case of UTF-8 which is nearly identical to ISO-8859-1 for English text, but I'm not a big fan).