cellular technology with embedded linux - coscup 2016

Post on 07-Jan-2017

1.831 Views

Category:

Technology

17 Downloads

Preview:

Click to see full reader

TRANSCRIPT

打造自己的IoTCellular Technology with Embedded Linux

SZ LINszlin@cs.nctu.edu.tw

1

Date: 2016/8/21

2

SZLIN➔ Taiwan Industrial Grade Linux Distribution➔ Debian Maintainer➔ Blog: https://szlin.me

About Me

3

4

5

6

7

8

Prepare Cellular Interface

Enable device driver and cellular utility

Get proper Cellular Module

and SIM card

4321

Steps to Build Your Own IoT

Hands-on Experience

9

Analog Cellular

- AMPS

-TACS

- NMT

* 14.4 kbps

Digital

NarrowBand

Circuit Data

- GSM

- D-AMPS

- PHS

* 9.6/ 14.4 kbps

Packet Data

- GPRS

- CDMA2000 1xRTT

- EDGE

* 171.2 kbps

Digital

Broadband

Packet Data

- UMTS

- CDMA2000 1xEV-DO

* 3.1 Mbps

Digital

Broadband

Packet Data

- HSPA+

- LTE

- WiMAX

(IEEE 802.16e)

* 14.4 Mbps

Digital

Broadband

Packet Data

* All IP network

- LTE Advanced

- WiMAX

(IEEE 802.16m)

* Cat. 6: 300/50 Mbps

1G2G

3G

4 G

Cellular Network Generation

2.5/2.75G

3.5/ 3.75/ 3.9 G

10

Analog Cellular

- AMPS

-TACS

- NMT

* 14.4 kbps

Digital

NarrowBand

Circuit Data

- GSM

- D-AMPS

- PHS

* 9.6/ 14.4 kbps

Packet Data

- GPRS

- CDMA2000 1xRTT

- EDGE

* 171.2 kbps

Digital

Broadband

Packet Data

- UMTS

- CDMA2000 1xEV-DO

* 3.1 Mbps

Digital

Broadband

Packet Data

- HSPA+

- LTE

- WiMAX

(IEEE 802.16e)

* 14.4 Mbps

Digital

Broadband

Packet Data

All IP network

- LTE Advanced

- WiMAX

(IEEE 802.16m)

* Cat. 6: 300/50 Mbps

1G

2G

3G

4 G

Cellular Network Generation

2.5/2.75G

3.5/ 3.75/ 3.9 G

Taiwan is phasing out 2G cellular on 2017-6-30 to make way for more 4G bandwidth

ref: http://www.ncc.gov.tw/chinese/print.aspx?table_name=news&site_content_sn=8&sn_f=33421

11

Prepare Cellular Interface

Get proper Cellular Module

and SIM card

4321

Steps to Build Your Own IoT

Enable device driver and cellular utility

FAQ

12

BANANA

13

BANANA

SoC Built-in cellular function

Board buit-in Mini-PCIe slot

Mini-PCIe to USBConnector

14

SoC Built-in Cellular Function

15

Board Built-in Mini-PCIe Slot

USB signal

16

Mini PCI-E to USB Adapter With SIM Card and Case Slot

USB signal

17

Prepare Cellular Interface

Get proper Cellular Module

and SIM card

4321

Enable device driver and cellular utility

Hands-on Experience

18

LTE frequency bands

➢ 3GPP Release 8 defines 5 LTE user equipment categories depending on maximum peak data rate and MIMO capabilities support [1] ➢ CAT 3, CAT 4 modules took up a dominant

share of cellular market so far

➢ Some new modules start to support CAT6

LTE Category

➢ The definition is in 3GPP TS 36.101

➢ The available band might be different in different country

Get Proper Cellular Module

Module PIN definition

➢ Make sure the PIN definition between slot and module are the same

19

LTE frequency bands [11][15]

20

LTE category [9]

Aggregating up to 40 MHz of bandwidth

21

Prepare Cellular Interface

Get proper Cellular Module

and SIM card

4321

Enable device driver and cellular utility

Hands-on Experience

22

Data Path Interface

Control Path ProtocolBANANA

23

Control Path Protocol Data Path Interface

1. AT commands

2. QMI (after kernel v3.4 )

3. MBIM (after kernel v3.8)

1. ppp (ttyUSB or cdc-acm)

2. RNDIS (cdc-ecm)

3. QMI (cdc-wdm)

4. MBIM (cdc-mbim)

* This table only lists information which I have handled

24

Control Path Protocol Data Path Interface

1. AT commands

2. QMI (after kernel v3.4 )

3. MBIM (after kernel v3.8)

1. ppp (ttyUSB or cdc-acm)

2. RNDIS (cdc-ecm)

3. QMI (cdc-wdm)

4. MBIM (cdc-mbim)

25

AT commands - Hayes command set [2][3]

❏ Developed by Dennis Hayes❏ A series of short text strings which can be combined to produce commands for operations

• dialing• hanging up• changing the parameters

❏ “AT” meaning 'attention’

26

AT commands - Hayes command set [2][3]

Standard format of AT commandsAT+

Proprietary format of AT commandsAT!, AT^ or AT$ etc..

27

AT commands - Utility

28

Control Path Protocol Data Path Interface

1. AT commands

2. QMI (after kernel v3.4 )

3. MBIM (after kernel v3.8)

1. ppp (ttyUSB or cdc-acm)

2. RNDIS (cdc-ecm)

3. QMI (cdc-wdm)

4. MBIM (cdc-mbim)

29

Dial-up by using PPP [5]Not a Recommended way

6+ steps to dial up with ppp

1. Install the packages in Debian/ Ubuntu ➢ apt-get install netbase ifupdown ppp

2. Create a file /etc/ppp/peers/gprs with this content

3. Edit /etc/ppp/chap-secrets4. Edit /etc/ppp/pap-secrets 5. Edit /etc/network/interfaces6. ifup gprs

7. !@#$%^&*()_

ref: https://c1.staticflickr.com/5/4150/5067471752_1fa8a4ab15.jpg

30

Dial-up by using wvdial [6]

31

1. apt-get install wvdial2. edit /etc/wvdial.conf3. wvdial

Dial-up by using wvdial [6]

32

Get IP by using DHCP

33

Control Path Protocol Data Path Interface

1. AT commands

2. QMI (after kernel v3.4 )

3. MBIM (after kernel v3.8)

1. ppp (ttyUSB or cdc-acm)

2. RNDIS (cdc-ecm)

3. QMI (cdc-wdm)

4. MBIM (cdc-mbim)

serial interface

Non serial interface

34

Ethernet Networking Control ModelCDC_ECM + RNDIS - Ethernet over USB [16]

Vir

tual

In

terf

ace

RNDIS

Vir

tual

In

terf

ace

Cellular Module – Router mode

IPTABLES - NATIP Stack

DHCPDNS➢ RNDIS - Proprietary protocol developed by Microsoft

➢ “virtual Ethernet” functionality

➢ Support USB high speed○ Not suitable for the module which

are for more than CAT 6

35

Ethernet Networking Control ModelCDC_ECM + RNDIS - Ethernet over USB

Vir

tual

In

terf

ace

RNDIS

Vir

tual

In

terf

ace

Cellular Module – Router mode

IPTABLES - NATIP Stack

DHCPDNS

Vir

tual

In

terf

ace

RNDIS

Vir

tual

In

terf

ace

Cellular Module – Bridge mode

IPTABLES - NATIP Stack

DHCPDNS

36

Ethernet Networking Control ModelDriver option in Linux kernel

37

Ethernet Networking Control ModelCDC_ECM + RNDIS

38

Control Path Protocol Data Path Interface

1. AT commands

2. QMI (after kernel v3.4 )

3. MBIM (after kernel v3.8)

1. ppp (ttyUSB or cdc-acm)

2. RNDIS (cdc-ecm)

3. QMI (cdc-wdm)

4. MBIM (cdc-mbim)

39

➔ LTE baseband market with 65% [17]

➔ Obsolete AT command and serial interface• Compatibility• Logical Bandwidth

➔ Propose unique value proposition

40

QMI (Qualcomm MSM Interface)

◆ Linux Kernel 3.4• qmi_wwan

◆ Define network services• NAS (network access)• PDS (gps location)• UIM (user identity module)• WDS (wireless data)• DMS (device management)• …

◆ Binary protocol

41

QMI (Qualcomm MSM Interface)

Device Driver Owner User-space

GobiSerial

GobiNet

qcserial

option

qmi_wwan

Qualcomm

Open Source Community

GobiAPI

•Sierra Wireless SDK

•…

libqmi (freedesktop.org)

uqmi (openWRT)

ofono (INTEL)

42

QMI (Qualcomm MSM Interface)drivers/net/usb/qmi_wwan.c

➢ Net Driver dependence

➢ Related information

43

QMI (Qualcomm MSM Interface)drivers/usb/serial/qcserial.c & drivers/usb/serial/option.c

➢ Serial Driver dependence

qcserial option

44

QMI (Qualcomm MSM Interface)When to use option instead of qcserial

45

QMI (Qualcomm MSM Interface)Move qcserial to option

46

QMI (Qualcomm MSM Interface)LIBQMI

Mailing listslibqmi-devel@lists.freedesktop.org

47

Control Path Protocol Data Path Interface

1. AT commands

2. QMI (after kernel v3.4 )

3. MBIM (after kernel v3.8)

1. ppp (ttyUSB or cdc-acm)

2. RNDIS (cdc-ecm)

3. QMI (cdc-wdm)

4. MBIM (cdc-mbim)

➔ extends cdc-ncm (Network Control Model)

48

Mobile Broadband Interface Model (MBIM)

◆USB-IF Standard (Extends NCM)• Microsoft• Intel• HP• …

◆Linux Kernel 3.8• cdc_mbim

◆Binary protocol◆Raw IP◆MBIM could embedded different protocols

• QMI• …

49

Mobile Broadband Interface Model (MBIM)

➢ MBIM extends the NCM as a protocol with the difference that devices transfer raw IP packets instead of packets with 802.3 headers

➢ NCM○ 802.3 headers

➢ NCM/ MBIM○ Raw IP○ Control path

50

Mobile Broadband Interface Model (MBIM)

Device Driver Owner User-space

cdc_mbim Open Source Community libmbim (freedesktop.org)

umbim (openWRT)

51

Mobile Broadband Interface Model (MBIM) LIBMBIM

Mailing listslibmbim-devel@lists.freedesktop.org

52

Prepare Cellular Interface

Get proper Cellular Module

and SIM card

4321

Enable device driver and cellular utility

Hands-on Experience

53

ref: http://www.safetysign.com/products/p3249/warning-read-manual-label

54

ref: http://www.safetysign.com/products/p3249/warning-read-manual-label

55

Use command “dmesg” to find out the idVendor and idProduct of cellular module.

Use command “grep -r "1199" drivers/net/usb/” to find out which driver does it use.

Lazy is the greatest motivation behind progress

56

Hands-on Experience – FAQDial-up failed !

Check steps one by one• Check the band of SIM card is matched with cellular module

• Check SIM card is ready or not (Make sure PIN code is correct)

• Check cellular signal is good enough

• Make sure SIM card's supporting band is the same with the cellular module

• Make sure the firmware of cellular module is the same with the ISP

• Make sure cellular module is connected properly to your antenna (MAIN/ AUX)

• Make sure the mode of module firmware is configured properly

• Make sure wireless disable function is OFF

57

Hands-on Experience – FAQMy connection is disconnected !

Check steps one by one• Check cellular signal from base station

• Make sure cellular module is not in idle mode

• Make sure MTU is configured properly

58

Internet

Ping

eth0

59

Internet

Open browsereth0

60

Hands-on Experience – FAQMake sure MTU is configured properly

This forces the packet to be fragmented, and the fragmented packets are not be re-assembled.

M2M IoT Network Usage Guidelines [25]

61

Conclusion

Enable LTE-A module require more fundamental knowledge➢ Band, carrier, firmware, antenna, etc…

1

2

3Future Prospects➢ MBIM➢ 3GPP Rel. 12

○ LTE-U ➢ 3GPP Rel. 13

○ LTE-LAA

Fault tolerance mechanism➢ We cannot control status of base station and carrier

62

Thank you

63

References1. E-UTRAhttps://en.wikipedia.org/wiki/E-UTRA2.海斯命令集https://zh.wikipedia.org/wiki/%E6%B5%B7%E6%96%AF%E5%91%BD%E4%BB%A4%E9%9B

%863. Hayes_command_sethttps://en.wikipedia.org/wiki/Hayes_command_set4. Wvdialhttps://en.wikipedia.org/wiki/WvDial5. Modem3G https://wiki.debian.org/Modem/3G6. Wvdial - githubhttps://github.com/wlach/wvdial7. modem-cmdhttps://github.com/imZack/modem-cmd8. E-UTRAhttps://en.wikipedia.org/wiki/E-UTRA9. LTE UE Category & Class Definitions http://www.radio-electronics.com/info/cellulartelecomms/lte-long-term-evolution/ue-cat

egory-categories-classes.php10. Qualcomm Gobi devices in Linux based systemshttp://www.lanedo.com/documents/Qualcomm%20Gobi%20devices%20on%20Linux.pdf

11. LTE band

http://niviuk.free.fr/lte_band.php

12. Cellular network

https://en.wikipedia.org/wiki/Cellular_network

13. 1g 2g 2.5g 3g 3.5g 4g comparisons, peak speed, real speed, carriers

https://www.youtube.com/watch?v=_3k5Iic4pWI

14. Project mangOH

http://source.sierrawireless.com/blog/2016/3/next-on-mangoh/

15.長期演進技術

https://zh.wikipedia.org/wiki/%E9%95%B7%E6%9C%9F%E6%BC%94%E9%80%B2%E6%8A%80%E8%A1%93

16. RNDIS

https://en.wikipedia.org/wiki/RNDIS

17. Qualcomm news

http://www.prnewswire.com/news-releases/abi-research-reports-qualcomm-maintains-clear-leadership-in-the-lte-baseband-market-with-65-share-but-faces-mounting-captive-market-competition-300222968.html

18. Mobile broadband modem control protocols

http://www.lanedo.com/users/amorgado/talks/FOSDEM2013%20-%20Mobile%20broadband%20modem%20control%20protocols.pdf

19. Qualcomm Gobi devices in Linux based systems

http://www.lanedo.com/documents/Qualcomm%20Gobi%20devices%20on%20Linux.pdf

64

References20. libqmi

https://www.freedesktop.org/wiki/Software/libqmi/

21. uqmi

http://git.openwrt.org/?p=project/uqmi.git;a=summary

22. ofono

https://01.org/zh/ofono?langredirect=1

23. Linux Kernel

https://www.kernel.org

24. USB: qcserial/option: make AT URCs work for Sierra Wireless MC73xx

https://patchwork.ozlabs.org/patch/433374/

25. M2M_IoTNetworkUsageGuidelines

https://m2mdeveloper.verizon.com/portals/M2M_Management_Center_Help/images/a/a2/M2M_IoTNetworkUsageGuidelines.pdf

26. libmbim

https://www.freedesktop.org/wiki/Software/libmbim/

27. umbim

http://lxr.mein.io/source/umbim/

28. LTE-U與LAA發展趨勢介紹http://www.ttc.org.tw/userfiles/file/20151104/20151104090423_

39805.pdf29. Special thanks to Glen Chiang

top related