Set specific IP Address/Port

Overview

This code could be access via Cat.M1(BG96 module) of SK telecom network in Korea. Need a WIZnet IoT Shield BG96 board and development board. The code forked Daniel_Lee's mbed-os-example-cellular-BG96 repository(https://os.mbed.com/users/Daniel_Lee/code/mbed-os-example-cellular-BG96/) and added some features.

This example is known to work great on the following platforms:

/media/uploads/stkim92/pel01.png

Requirement

  1. FRDM-K64F or FRDM-K66F
  2. WIZnet IoT Shield BG96 board
  3. USIM card

Example functionality

This example showcases the following device functionality:

1. Import into Compiler

/media/uploads/stkim92/cellular_1.png

2. Compile and Program

/media/uploads/stkim92/cellular_2.png

3. If successfully connect to cellular networks(SKTelecom) then you can get below message

Device's Result

include the mbed library with this snippet

mbed-os-example-cellular


Built: Sep  6 2019, 07:06:26


[MAIN], plmn: NULL
Establishing connection
M2Mnet(BG96) Power ON
[00005500ms][INFO][CELL]: New CellularContext  (20004120)
[00005500ms][INFO][CELL]: CellularContext plmn NULL
[00005501ms][INFO][CELL]: CellularContext connect
[00006502ms][INFO][CELL]: Start connecting (timeout 1000 ms)
[00006511ms][INFO][CELL]: RSSI unknown
[00006519ms][INFO][CELL]: Modem ready
[00006523ms][INFO][CELL]: RSSI unknown
[00006523ms][INFO][CELL]: Setup SIM (timeout 1000 ms)
[00006528ms][INFO][CELL]: SIM is ready
[00006555ms][INFO][CELL]: RSSI unknown
[00006563ms][INFO][CELL]: Network registration (timeout 1000 ms)
[00006567ms][INFO][CELL]: Continue after 1 seconds
[00006688ms][ERR ][CELL]: AT overflow
[00007572ms][INFO][CELL]: RSSI unknown
[00007578ms][INFO][CELL]: Registering network => Attaching network
[00007582ms][INFO][CELL]: RSSI unknown
[00007582ms][INFO][CELL]: Attaching network (timeout 1000 ms)
[00007606ms][INFO][CELL]: Found PDP context 2
[00007609ms][INFO][CELL]: Activate PDP context 2
[00009626ms][INFO][CELL]: Found PDP context 2


Connection Established.
[00009635ms][INFO][CELL]: Socket 0 open
[00009741ms][INFO][CELL]: Socket 0 sent 4 bytes to 222.98.173.203 port 7878
TCP: Sent 4 Bytes to 222.98.173.203
[00010873ms][INFO][CELL]: Socket 0 recv 4 bytes
[00011421ms][INFO][CELL]: Socket 0 closed
Received from server 4 Bytes
[00011421ms][INFO][CELL]: CellularContext disconnect()
[00011422ms][INFO][CELL]: cb: CellularContext disconnected


Success. Exiting 

Server Result

/media/uploads/stkim92/mbed_guide_bg96_cellular-3.png

History

Set Server IP/Port default tip

2019-09-06, by stkim92 [Fri, 06 Sep 2019 07:44:03 +0000] rev 45

Set Server IP/Port


Update latest commit

2019-07-24, by Daniel_Lee [Wed, 24 Jul 2019 15:27:53 +0000] rev 44

Update latest commit


1. Added BG96 power on sequence.; 2. IPv4 disable, enable only IPv6 for stable access

2019-07-24, by Daniel_Lee [Wed, 24 Jul 2019 15:16:05 +0000] rev 43

1. Added BG96 power on sequence.; 2. IPv4 disable, enable only IPv6 for stable access


Sync with latest local branch

2019-06-18, by Daniel_Lee [Tue, 18 Jun 2019 06:45:22 +0000] rev 42

Sync with latest local branch


Fixed IPV6 only when using BG96 thought SKTelecom

2019-06-04, by Daniel_Lee [Tue, 04 Jun 2019 07:12:53 +0000] rev 41

Fixed IPV6 only when using BG96 thought SKTelecom


Update latest from local branch

2019-05-24, by Daniel_Lee [Fri, 24 May 2019 07:17:13 +0000] rev 40

Update latest from local branch


mbed-os update latest

2019-05-07, by Daniel_Lee [Tue, 07 May 2019 06:34:10 +0000] rev 39

mbed-os update latest


Does not support IPV4 SKtelecom's CatM1 in Korea.

2019-04-29, by Daniel_Lee [Mon, 29 Apr 2019 05:55:11 +0000] rev 38

Does not support IPV4 SKtelecom's CatM1 in Korea.


Init Cat.M1 of BG96 for SK Telecom

2019-04-25, by Daniel_Lee [Thu, 25 Apr 2019 08:19:34 +0000] rev 37

Init Cat.M1 of BG96 for SK Telecom


Merge pull request #131 from ARMmbed/release-candidate

2019-04-11, by mbed_official [Thu, 11 Apr 2019 10:02:01 +0100] rev 36

Merge pull request #131 from ARMmbed/release-candidate

Updating mbed-os to mbed-os-5.12.1
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-cellular