The end is near for 2G, so that our 3G and 4G devices have more room to spread their legs and allow for faster and newer technologies to grow. The average 2.75G speed is 384 kbit/s for download and 60 kbit/s for upload, while 3G is 7.2 Mbit/s for download and 2 Mbit/s for upload speed. If that is not enough reason to give 3G more room to spread its' legs, 4G speeds reach 100 Mbit/s for high mobility communication and 1 Gbit/s for low mobility communication. Once 2G is out of the way, it will allow 3G and 4G a bigger spectrum for data traffic.
Why ?
Why is 2G being shut down? It is simply outdated. 3G and 4G networks are much faster and to progress with the demand of more / faster data, we must make the change. The newer technologies offer progressively higher data speed rates, which makes it easier for cellular companies to operate efficiently. After this hump in cellular service, we will all be able to experience better coverage, with faster speeds.
When and Where ?
2G will no longer be active on cellular towers as of Dec. 31, 2016 in the US. Other countries have similar dates or at least around the same time. Australia cellular companies have released a date of April 2017, and almost all cellular companies have said as a general rule that you should not purchase 2G devices at all from this point forward. The good thing is, most companies are still supporting many enterprise solutions using 2G until 2020 but say for safety, go with 3G. For the 134 countries that are not phasing out 2G, you're safe.
Does the 3G Work in USA and European Markets?
3G Click
3G Click is great for easy communication over wireless technology with our easy-to-use library. Here is an example of how to use 3G click , here we take a single function to setup, and a single function to answer or hangup the call.
#include "3G_click_lib.h" #include "resources.h" // TFT module connections unsigned int TFT_DataPort at GPIOE_ODR; sbit TFT_RST at GPIOE_ODR.B8; sbit TFT_RS at GPIOE_ODR.B12; sbit TFT_CS at GPIOE_ODR.B15; sbit TFT_RD at GPIOE_ODR.B10; sbit TFT_WR at GPIOE_ODR.B11; sbit TFT_BLED at GPIOE_ODR.B9; sbit GSM_PWR at GPIOC_ODR.B2; sbit GSM_CTS at GPIOD_ODR.B13; sbit GSM_RTS at GPIOD_IDR.B10; bool answer_call = false; bool hangup_call = false; void system_init( void ); void main() { system_init(); display_init(); click_3g_api_init(); while( 1 ) { click_3g_process(); if( Button( &GPIOC_IDR, 9, 80, 1 ) ) answer_call = true; if( Button( &GPIOC_IDR, 8, 80, 1 ) ) hangup_call = true; if( answer_call ) { click_3g_call_answer(); answer_call = false; } if( hangup_call ) { click_3g_call_hangup(); hangup_call = false; } } }
In this example, we setup the system like this...
void system_init( void ) { GPIO_Digital_Output( &GPIOC_ODR, _GPIO_PINMASK_2 ); GPIO_Digital_Output( &GPIOD_ODR, _GPIO_PINMASK_13 ); GPIO_Digital_Input( &GPIOD_IDR, _GPIO_PINMASK_10 ); Delay_ms( 100 ); // UART bus for monitoring UART1_Init( 57600 ); Delay_ms( 200 ); /// UART bus for GSM UART3_Init_Advanced( 9600, _UART_8_BIT_DATA, _UART_NOPARITY, _UART_ONE_STOPBIT, &_GPIO_MODULE_USART3_PD89 ); Delay_ms( 200 ); RXNEIE_USART3_CR1_bit = 1; NVIC_IntEnable( IVT_INT_USART3 ); EnableInterrupts(); }
This setup sets up our GPIOs for power, CTS, and RTS lines, UART 1 for monitoring, and UART 3 for 3G Click communication. At the end we setup the receive interrupt bit for UART3 communication to 1, and then enable the interrupt. The next step is setting up the display.
void display_init() { TFT_Init_ILI9341_8bit( 320, 240 ); TFT_BLED = 1; TFT_Set_Pen( CL_WHITE, 1 ); TFT_Set_Brush( 1,CL_WHITE,0,0,0,0 ); TFT_Set_Font( TFT_defaultFont, CL_BLACK, FO_HORIZONTAL ); TFT_Fill_Screen( CL_WHITE ); TFT_Set_Pen( CL_BLACK, 1 ); TFT_Line( 20, 46, 300, 46 ); TFT_Line( 20, 70, 300, 70 ); TFT_Line( 20, 196, 300, 196 );; TFT_Line( 20, 220, 300, 220 ); TFT_Set_Pen( CL_WHITE, 1 ); TFT_Set_Font( &HandelGothic_BT21x22_Regular, CL_RED, FO_HORIZONTAL ); TFT_Write_Text( "3G Click", 130, 14 ); TFT_Set_Font( &Tahoma15x16_Bold, CL_BLUE, FO_HORIZONTAL ); TFT_Write_Text( "Quectel UG95", 125, 50 ); TFT_Set_Font( &Verdana12x13_Regular, CL_BLACK, FO_HORIZONTAL ); TFT_Write_Text("EasyMx PRO v7 for STM32", 19, 223); TFT_Set_Font( &Verdana12x13_Regular, CL_RED, FO_HORIZONTAL ); TFT_Write_Text( "www.mikroe.com", 200, 223 ); TFT_Set_Font( &Tahoma15x16_Bold, CL_BLUE, FO_HORIZONTAL ); TFT_Write_Text( "HANG UP - C8", 44, 200 ); TFT_Write_Text( "ANSWER - C9", 186, 200 ); TFT_Set_Font( &HandelGothic_BT21x22_Regular, CL_BLACK, FO_HORIZONTAL ); }
In this display example, we are using the TFT display on the EasyMxPROv7 development board. Last but not least, we setup the 3G module.
void click_3g_api_init() { gsm_engine_init( gsm3_callback ); at_cmd_save( "RING", 1000, NULL, NULL, NULL, gsm2_cb_ring ); at_cmd_save( "NO CARRIER", 1000, NULL, NULL, NULL, gsm2_cb_no_carrier ); at_cmd_save( "+CLCC", 1000, NULL, NULL, NULL, gsm2_cb_call_id ); }
All that this function does is setup "AT" commands for our AT parser to use when communicating with the 3G module.
After all of the setup is finished, we can read the GPIO pins for a button push, and when one is pushed we can send the correct command to the 3G module for hanging up or answering our call.
Summary
Communication in the GSM world is ready for the next generation, and to make a smooth transition 2G must be shutdown and make room for the newer and faster technologies. Our 3G Click is released with a library that takes the stress and complexity out of making wireless communication happen on your embedded project. To learn more about 2G, 3G and 4G technologies, read our blog about it here.