GSM modem code through serial port - c

I have been trying to interface GSM modem with serial port (RS232). I access the serial port as /dev/ttyS0 (COM1).
I am unable to send the AT commands to the device using C. I use Linux OS.

Related

Sending data serially from USB/RS485 to RS485 C code in Windows

I'm trying to setup half duplex communication in Windows10 in my program. I have my USB connected to COM3 which is converted to a RS485 connection using a converter. Most of the available information out there are using Linux systems which does not work in Windows. How do I send and receive data from the COM port to the hardware connected by RS485?

Replace a printer with a pc using serial port

I have to update my question (May 4th). The male db25 connector misled me to the parallel port so I rephrased it.
I have an old computer system that sends live data (temperature from some external devices) to a parallel dot printer. This computer must not be changed.
Instead of printing I would like to connect the printer cable in an (ubuntu os) pc serial port in order to receive those data and redirecting them in stdout.
Checking the db25 pins I discovered that it is used as RS232 serial cable. There are only three pin connected:
pin 2 (TXD)
pin 3 (RXD)
pin 7 (GND)
So my intentions are firstly to connect those pins to a db9 serial connector in order to plug it in a pc serial port and secondly to open and read the input data using:
chmod o+rw /dev/ttyS0
cat -v < /dev/ttyS0
I believe that it is a simple solution and it is going to work.

Microcontroller not recognized at USB port when connected via pins

Im having issues with my TI LAUNCHXL-F28379D. I have it connected to the laptop I am trying to send data to/from via pins P19 (SCIBRxD) and P18 (SCIBTxD), as well as GND and 5V via J16, using a USB Type B cord to which I sautered pin connectors. I'm sure power is being supplied to the board as when I plug the 5V cable of the USB cable, the RGB lights and 3 other small ones turn on. However, the Computer does not recognize ithe controller at the port - it only recognizes if if it is connected via the board's Mini-USB port. I've also written a C Program which opens the COM port and reads data - but this does not work without my knowledge of the COM port number, usually found in Device Manager. I cannot get any further in my project without the port number and it is very annoying. I will attempt to resauter a new USB cable, but if there are any other possible solutions, or if I'm doing something wrong, please let me know.
Absolutely all feedback is appreciated!
The SCIBRxD and SCIBTxD pins belong to the SCI peripheral in the microcontroller. This peripheral implements a UART port (a.k.a. COM port, a.k.a. TTL serial port). It is not a USB port. Nothing useful will happen if you connect it to a USB port, because it is not compatible with USB in any way.
USB-to-UART adapters (a.k.a. USB-to-serial adapters) do exist. There is one built into the LaunchPad. The UART side of the adapter is connected to the SCIB pins, and the USB side of the adapter is connected to the USB port.

Sending tcp/ip packet( or MQTT packet) from ARM cortex-m4 microcontroller UART to telit modem

I am currently using NXP micro-controller which is ARM-Cortex-m4.
I want to use UART of micro-controller to connect to UART of Telit Modem.
Are there any helpful links where I can get source code or links for sending tcp/ip packet from microcontroller to modem using UART as communication channel.
Can I send directly MQTT packet from UART to Telit modem?(Another sub question)
What protocol should I follow?
Telit modems provide a wide set of AT commands for TCP/UDP, so you can send through them any data based on protocol that is conveyed through TCP/UDP, and this includes MQTT.
Explaining all sockets-related AT commands would be too wide. I can suggest starting with the following command (you can find them in AT command user guide):
AT#SD
AT#SH
AT#SCFG
All commands related to PDP context activation, such as +CGDCONT, #SGACT and so on.

Interface Serial Modem to ttyS0 in AM1808 Embedded Linux

I need to implement the Serial Modem interfacing with the ttyS0 port of the AM1808.
In AM1808 all these three serial ports are interfaced in following manner.This has been predefined in the driver of TI (8250.c)
ttyS0 : Normal Mode
ttyS1 : loopback Mode
ttyS2 : loopback Mode
Now i want to use ttyS0 serial port for GSM modem. For that I need to configure ttyS0 in full mode.
My pins requirements are as following and i have interfaced the pins as following.
UART0_TX
UART0_RX
UART0_RTS
UART0_CTS
UART0_DCD (this pins are right now on GPIO)
UART0_DTR (this pins are right now on GPIO)
What i should do wether i need to change the driver of TI for the same ?
How i can do it ?
Guide me.

Resources