reading text message through matlab using AT commands and bluetooth - matlab

I want to read text message using Matlab as hyperterminal using AT commands and bluetooth as connection medium since I am new in it could somebody suggest that how can I do it.
I am using nokia c2-03 for sending the message but if you suggest any other phone i can that too
I connected my phone through USB, saw the Port name then connected it through matlab using
s=serial('COM1');
and then opened the port
fopen(s)
now I don't know what to do I mean now how can send at command to control the device.
PS I am sure that my device supports serial communication.

Related

How Can I send AT commands to GPS module connected to a raspberry pi

My GPS module doesn't automatically turn on its GPS to receive data. The module uses AT commands to turn on GPS and the the GPS shuts down when you remove it from its power source.
The problem is I can turn on the GPS with PUTTY serial monitor when connected directly to my laptop for testing, but I don't know how to turn it on when connected to my raspberry pi because I don't know how to send the AT command through the raspberry pi to power it up.
Is there a way i can send AT commands to a connected device on my raspberry
I have tried the cu method but it doesn't seem to work as I receive no response when I input the AT code
So if I understand it correctly, you can connect the GPS module to your laptop directly and send the AT commands to it but, you are unable to do the same with your RPi.
Think of it like this, how is the computer being able to send the AT commands? Through a UART right? So that means you need a UART like connection between the 2 devices to be able to send AT commands.
Now, lets just replace the computer with the RPi, again you would need a UART connection between the GPS module and the RPi module, lets say a simple RS232 connectivity. Once you have this connection established, you will have to program your RPi to send the appropriate commands to the GPS modem via this connection. So probably what you need to google now is "RS232 communication using RPi". And of course you will need the Tx and Rx connections to be proper between the two devices.

Ionic 4 & 5, thermal printer library for Epson model, needs to have automatic printing in Android device

I have a thermal printer that needs to be connected into my Android device via WiFi connection. I need it to be automatically print whenever a button is triggered (without the printing dialog)
Currently, I am using Ionic 4, but I cannot find any library which supports ESC/POS language. Any library that I could use?
Note:
The following solution works for Ionic 4 and 5.
I managed to find the solution via TCP/IP port connection from ionic into my WiFi connected thermal printer
In order to create a TCP/IP socket connection from ionic, I used sockets for cordova and send byte into my thermal printer IP. Depending on each printer, each printer has different set of ESC command (CMIIW) which mean we still need to convert the byte code one by one and send them into the thermal printer.
Also, I have fork a repository https://www.npmjs.com/package/esc-pos-encoder-ionic which can be used as a wrapper to encode ESC command into byte code. Then the result can be sent into the printer using TCP/IP socket.
Hope this helps others too.
Demo source code: https://github.com/Ans0n-Ti0/esc-pos-encoder-ionic-demo

Forward Bluetooth socket to serial port

I've been trying to figure out how to turn my Raspberry Pi into a USB to Bluetooth serial adapter. I want to be able to send data over Bluetooth to the Pi which has a USB thermal printer registered at /dev/usb/lp0.
Using only standard command line apps such as hciconfig, hcitool, rfcomm, and sdptool I have been able to see the Pi as visible, and pair to it from an Android tablet using a Bluetooth SPP app on the Store. However, the tablet disconnects immediately, and no data is sent. rfcomm listen /dev/rfcomm0 1 also waits for a connection forever.
I think I'm able to achieve what I need without custom code, using solely standard command line apps, but I'm not entirely sure. socat will likely be of use to finally connect the sockets.
Figures that I'd get it right after posting. To anyone else looking to do something similar:
Pair with bluez-simple-agent
Create your serial port channel with sdptool add --channel=x sp
Listen for a connection on that channel with sudo rfcomm listen /dev/rfcomm0 x
Cross the streams with socat /dev/rfcomm0 /dev/usb/lp0
Beautiful. It's all so simple now.

Sending serial data without RS232 port

I want to send data serially from MATLAB, but my laptop doesn't have a serial port. Do I have to use a USB-to-RS232 converter? Will my program remain the same?
I have some RS232-USB-Converters and never had any trouble. I need adapters for embedded devices and embedded development.
If your driver is properly installed and works then it is presented as an serial device to the OS.
The device presented (on linux) is named differently (ttyUSB) but that doesn't matter.
And using stdio functions like fopen/fclose is one more layer above (libcall, not syscall).

Exchange data between Iphone (App) and gsm modem

Im' trying to implement an App which is able to conect to a remote GSM Modem.
To etablish something like this I need a dialin process in the app which call the "Phone number" of the remote Modem and exchange data with it. On the GSM Modem is no posibility to connect the web. It can only accept incoming calls and response.
Does anyone know if there is a practiacal solution?
No not really, there is no way to use the any of the phone functions (meaning voice/data) other the internet connection.
You can't dail a number and then send data of the line, because as soon as you dail the phone app closes you app (or backgrounds it) and takes over.