Is it possible for a modem to connect to an APN using GSM only, not GPRS? - gsm

Using a 2g/gprs modem (BGS2T), it seems like we are able to connect to an APN and communicate data though it with only a GSM connection. Is it possible we are doing this without a pdp context being active between the the modem (mobile station) and the SGSN (Serving gprs support node)/ actually using GPRS?

If you mean a TCP/IP connection over the circuit switched GSM voice network then the only way you can do normally is by using a data modem over the speech path.
It is possible to do that but it would be an unusual way to do data, especially with the different network options available today.
The modem you mention is a GPRS modem however, so it is much more likely you are actually using a GPRS connection.

Related

ESP8266 connection to a Arduino Nano

I am trying to connect a WiFi module (ESP8266) to a "funduino" development board (Arduino Nano) but I have no success. Since I tried so much schematics I've found on the internet about the connection between them two, I kindly ask here if is anyone who succeed in "pairing" this two devices.
I am asking for the schematic and a functional source code.
Regards
The ESP-01 by default comes with nonOS SDK bootloader that communicated via AT commands, you can find the complete command set from Expressif here. This is designed for an MCU (like Arduino Nano) to use it purely as an WiFi module rather than using it as a stand-alone MCU (for which it will require NodeMCU SDK).
If you ever upload an Arduino sketch up to the ESP-01, it will erase the AT Command firmware.
Assuming your ESP-01 is still having the AT Command firmware. What #Ben provided is a sketch that allows you to type AT commands via the Serial Monitor to internact with the ESP-01, it is manual, and good for testing if ESP-01 is working (you type AT and press return on Serial Monitor, the ESP-01 will ack with Ok) but not practical as a real application. The minimum commands required to established an WiFi connection with ESP-01 is listed below.
AT+CIPMUX=1 - Enable single (0) or multiple connection (1) to the web server.
Multiple connection is a good option if you are repeatedly sending
out or reading data from the Internet.
AT+CWMODE=3 - Set WiFi mode: 1 is station mode (ESP8266 is client), 2 is AP mode
(ESP8266 acts like a WiFi router where your phone or PC can connect),
3 is AP+station mode (make the ESP8266 do both)
AT+CWJAP=“<your-ssid>”,”<your-pw>” - Connect to your WiFi. Provide your SSID name
and password inside the double qoutes.
AT+CIFSR - This returns the IP address of the module, indicating that it has
successfully connected to your WiFi router.
Once the WiFi connection is established, you can further communicate with the ESP-01 via the connection, like accessing a website for example:
AT+CIPSTART=0,"TCP", "www.example.com","80” - Start TCP or UDP connection. The
0 is the id of the connection.
AT+CIPSEND=0,16 - Command to tell the module data is ready to be sent. 0 is the
connection id, and 16 is the length of the data to be sent.
After this command, the ESP8266 will reply with the “>”
character to tell us that it will be waiting for the data to be
sent. If successful, the module will reply with “SEND OK”
GET / HTTP/1.1 - Send the http header, and other data, etc...
You can write your own sketch to automate those AT commands for interacting with with ESP-01 once you understand the AT commands required for establish a WiFi connection.
Here are two resources that I personally found extremely useful for doing more than connecting to WiFi.
STM32-ESP-01 Web Server - although this is for interfacing with STM32, the main difference is the pin assignment, so you should be able to port to Arduino easily.
MQTT via ESP-01
As for hardware interface, please noted that what #Ben provided is correct in principle, but you need to be aware that the ESP-01(ESP8266 to be precise) is a 3V3 MCU, so the connection is depended on what kind of host board you are using. If you are using Arduino Uno/Nano, both are having a 5V MCU, you will need a voltage divider (two resistors to drop the voltage to 3v3 before connecting to ESP-01) or a level shifter chip at least for the ESP-01 Rx pin to avoid the potential damage to the ESP-01.

Is running HM10 on a soft-serial enable the Low Energy charecteristics ? If so, how can the UUIDs and GATT profiles be tweaked in this case ?

I've been tinkering with the HM-10 board for a few weeks now, trying to push data from phone to module and vice-versa. The ultimate goal was to enable the BLE mode and tweak with the characteristics and GATT profiles. I'm pretty new to this domain so can anyone help me out ?
And is there any way we can interface the HM-10 with the hardware rx-tx channel instead of soft-serial ?
Your question is still not very clear, but i think you mean sending AT-commands over BLE-radio.
To make this possible you have to change the MODE using serial connection.
In standard mode the device can only be configured over the serial connection (pins RXD and TXD) using AT commands.
AT+MODE0: It only accepts AT-commands over the serial connection (RXD/TXD)
until a central device connects to the module.
AT+MODE1: Same as MODE0, once a connection is established,
AT-commands can be sent over BLE and manipulate some PIO pins on
the device.
AT+MODE2: Same as MODE0, once a connection is established,
AT-commands can be sent over BLE.
To test it just send a string to hm-10 as "AT\r\n" and it will respond with OK.
Update:
You cannot change the services and characteristics with AT-commands.
There are a lot of other things you can change,like advertising, setup a beacon and change a lot of settings.
For a full list of AT commands and more see the official data sheet:
http://www.jnhuamao.cn/bluetooth41_en.zip

How to connect Arduino with Internet?

I have gone through several links online but I have not found any appropriate solution to it. I am wondering if there is a way to connect an Arduino with WiFi without using any shield or any other external hardware. My laptop is connected to WiFi and the arduino board is connected to the laptop with an USB cable. I want to access/run the data for the Arduino using WiFi. Is there a way to do it?
Hope my query makes a sense.
Thanks.
Let's restate your question for clarity - you want to share the laptop's Internet connection (e.g. via WiFi) with the Arduino connected to the laptop with a USB cable, with no additional hardware?
Assuming I restated it correctly, the Arduino's USB connection provides a virtual "serial port" for communication. This means you can use an "IP over serial" solution for Internet access. One such common and widely supported solution is PPP.
However, programing the Arduino with IP over PPP stack requires significant amount of memory and is probably an overkill for whatever it is you're trying to do.
You're probably better off designing a custom-tailored protocol for the serial communication between the Arduino and a small gateway program you can program and run on the laptop.
If you're bent on a complex solution that provides full Internet access to the Arduino, the steps to achieve what you're after are:
Program the Arduino with a TCP/IP over PPP protocol stack, running on the serial port. You'll probably need an Arduino MEGA.
Setup the laptop to be a PPP endpoint on the Arduino's serial port. For a Windows machine you can refer to this page for information on how to do that.
Once the PPP link is up, you can setup the laptop's OS to share Internet access to the PPP link.

Developing my own modem

I would like to develop my own modem for a custom communication network that will be detectable on the serial port by PC automatically. What I'm uncertain about is the protocol part of the AT commands and how to make it work seamlessly so that computer will detect the modem automatically.
I plan to use ftdi UART to USB converter to interface my microcontroller with the PC using standard serial interface. The PC will then use AT commands to communicate with the microcontroller that will in turn connect to another microcontroller over radio tranceiver and establish a two way serial connection over radio. The idea is that the PC on the other end will run PPPD and listen on it's own modem connection for incoming call and then bridge the connection with it's other internet interface that is connected to internet. The first computer will get it's own IP address using PPPD and will be connected to internet over this custom microcontroller based modem.
But how do I implement the communication protocol between my controller and PC? What commands do I absolutely need to implement? How do I make sure that the computer recognises my controller which is connected over ftdi usb to serial adapter as a functional modem?
Where can I find a speciffication of the minimum command set that is required of a modem?
In practice linux usually discovers a 3G modem automatically for example. Does that have to do with the actual USB identifier of the modem? Is it possible to have linux automatically discover an ordinary serial port modem? I'm thinking that the modem will be sending an AT idle ping repeatedly when it's plugged in so that linux should be able to detect it.

Fetch data from url using SIM900 ATC modam

I have Sim900 modem which have TCP/IP stack. I have developed website which return data in json. like if you hit my url;
http://mywebsite.com/?id=8&certkey=Hljhph895D5
then it will return value like
{'name':'Ali', 'Age':23}
I would like to know how to fetch data using Sim900 modem. any help would be appreciated.
The GSM (GPRS, UMTS etc) connection is lower level than the IP connection. So you need to make a GPRS or UMTS data connection from your modem to the operator's network, and an IP connection on top of that (usually both connections are done with one single connect command to the modem).
Then you can use this IP connection like any normal internet connection, and retrieve your json data.
How you make the GPRS/UMTS and IP connections, depends upon your platform.
As you are using C#, I guess it's Windows.
If the modem supports newer Windows interfaces, you can use Windows Mobile Broadband API on Win 7 or 8(desktop).
If the modem doesn't support Mobile Broadband API, then you can use AT commands. There is lots of help on the internet for that.

Resources