Loongson IoT Gateway: A Technical Review

  1. 1.  College of Computer Science & Software Engineering, Shenzhen University, Shenzhen, 518060, China
  2. 2.  Shenzhen University

Abstract

A prototype of Loongson IoT (Internet of Things) ZigBee gateway is already designed and implemented. However, this prototype is not perfect enough because of the lack of a number of functions. And a lot of things should be done to improve this prototype, such as adding widely used IEEE 802.11 function, using a fully open source ZigBee protocol stack to get rid of proprietary implement or using a fully open source embedded operating system to support 6LoWPAN, and implementing multiple interfaces.

1 Introduction

There are some kind of Loongson CPU modules have been developed. And a prototype of Loongson IoT (Internet of Things) ZigBee gateway has been designed and implemented by ZHANG Yisu from University of Chinese Academy of Sciences, and Shenyang Institute of Computing Technology of Chinese Academy of Sciences, with other people also from Shenyang Institute of Computing Technology of Chinese Academy of Sciences [张艺粟 et al., 2013]. But the prototype is not perfect enough because of the lack of a number of functions.

To improve the prototype, a lot of things should be done, such as adding widely used IEEE 802.11 function (by using USB or SPI wireless NIC, or replacing Loongson 1B with Loongson 1A and using PCI wireless NIC), replacing Zstack with a fully open source ZigBee protocol stack ZBOSS to get rid of proprietary implement or using a fully open source embedded operating system Contiki to support 6LoWPAN, and implementing multiple interfaces such as Bluetooth, Infrared, and so forth.

The rest of this paper is organized as follows:

2 Loongson

Loongson (also called Godson) is a set of general purpose MIPS CPUs developed by the Institute of Computing Technology of Chinese Academy of Science, and Loongson Technology Corporation Limited [Hu et al., 2015]. Loongson defined loongson 3 (Large), Loongson 2 (Medium), and Loongson 1 (Small) three series for different purpose [胡伟武, 2013].

2.1 Loongson 3

Loongson 3 (Large CPU series) is designed for servers and high performance computing applications [胡伟武, 2013].

2.2 Loongson 2

Loongson 2 (Medium CPU series) is designed for high-end embedded and computer class applications [胡伟武, 2013].

2.3 Loongson 1

Loongson 1 (Small CPU series) is designed for consumer electronics and embedded applications [胡伟武, 2013]. Loongson 1 can be supported by Linux, VxWorks, RT-Thread, and other operating systems [胡伟武 and 唐志敏, 2003, 袁子阳, 2009, 谢平, 2010].

2.3.1 Loongson 1A

Loongson 1A (also called LS1A) is using 0.13um technology, and integrated a LS232 processor core, 2D GPU, 16/32-bit DDR2, High-definition display, PCI, Southbridge chipset features, RSECC NAND, CAN, ACPI, SPI, 88-way GPIO interfaces, and so forth. Loongson 1A supports LPC/SPI/NAND start-up mode. The high level integration of Loongson 1A makes Loongson 1A particularly suitable for cloud terminals, industrial control, data acquisition, network device and other fields. Meanwhile Loongson 1A can be configured to a full-featured Southbridge chip with PCI interface [胡伟武, 2013].

2.3.2 Loongson 1B

Loongson 1B (also called LS1B) is using 0.13um technology, and it is a lightweight 32 SoC chip. It integrated a LS232 processor core, 16/32-bit DDR2, high-definition display, NAND, SPI, 62-way GPIO, USB, CAN, UART interfaces, and so forth. And it is able to meet the needs of low price cloud terminals, data collection, network device and other fields [胡伟武, 2013].

2.3.3 Loongson 1C

Loongson 1C (also called LS1C) is using 0.13um technology. Loongson 1C not only integrated a 32-bit Loongson processor core, but also integrated a 32/16/8 bit SDRAM, LCD display, CAMERA, USBHOST, USB-OTG, SDIO, ADC, RSECCNAND, CAN, I2C, I2S/AC97, SPI, UART, 102 road GPIO interfaces, and so forth. Loongson 1C supports SPI/NAND/SDIO start-up mode [胡伟武, 2013].

2.3.4 Loongson 1D

Loongson 1D (also called LS1D) is using 0.13um technology, and integrated a 32-bit Loongson processor core, 64KB Flash, 5KB RAM, Chopper stabilized amplifiers, High-precision time-digital converter (TDC), SPI, UART, I2C and other functions. Loongson 1D is a single-chip solution for water meters, gas meters and other flow meters, with high precision and low power consumption [胡伟武, 2013].

2.3.5 Loongson 1E

Loongson 1E (also called LS1E) is designed for aerospace applications, and used radiation hardening technology. It is according to the previous generations to customized for aerospace applications from system design [方青文, 2013].

2.3.6 Loongson 1F

Loongson 1F (also called LS1F) is the companion IO bridge chip for Loongson 1E. It integrated commonly used interfaces in aerospace field, including remote sensing and control functions interfaces and peripheral interfaces, to companion Loongson 1E [方青文, 2013].

3 Loongson IoT Gateway

ZHANG Yisu from University of Chinese Academy of Sciences, and Shenyang Institute of Computing Technology of Chinese Academy of Sciences, with other people also from Shenyang Institute of Computing Technology of Chinese Academy of Sciences, have already designed and implemented a prototype of Loongson IoT ZigBee Gateway. The prototype based on Loongson 1B develop board, TI CC2530 ZigBee develop kit, Zstack protocol stack, and embedded Linux system [张艺粟 et al., 2013].

3.1 Hardware structure

The hardware structure of the prototype is shown in the Figure 1.


Figure 1: The hardware structure of the prototype.

 

TI CC2530 connects to Loongson 1B using UART interface, and Loongson 1B communicates to PC through Ethernet with Ethernet adapter, and TI CC2530 communicates to ZigBee nodes through ZigBee 2.4 GHz channel with RF antenna [张艺粟 et al., 2013].

3.2 Software structure

The software structure of the prototype is shown in the Figure 2.


Figure 2: The software structure of the prototype.

 

The software of the prototype is based on embedded Linux operating system and Zstack protocol stack [张艺粟 et al., 2013].

4 Analysis

The prototype of Loongson IoT ZigBee Gateway already has the basic function of IoT Gateway, but it still has a lot of things that can be improved:

4.1 IEEE 802.11

IEEE 802.11 (also called Wi-Fi) is widely used. And as an IoT Gateway, IEEE 802.11 should be one of the basic functions. But the prototype lacks it.

Because of Loongson 1B lacking PCI interface [胡伟武, 2013], Loongson 1B just can use USB wireless NIC to support high speed IEEE 802.11 network up to 480 Mbps and use SPI low energy wireless NIC to support low speed IEEE 802.11 network up to 30 Mbps.

To support IEEE 802.11 network upper than 480 Mbps, the gateway should use Loongson 1A instead of Loongson 1B to use PCI wireless NIC [胡伟武, 2013]. When the PCI interface of Loongson 1A running in 32-bit at 33 MHz, the speed up to 1064 Mbps, and when the PCI interface of Loongson 1A running in 32-bit at 66 MHz, the speed up to 2128 Mbps.

4.2 Fully open source ZigBee protocol stack

The prototype is using Zstack as its protocol stack, but Zstack is not fully open source, the implement of MAC layer and network layer is provided as precompiled library files [刁玉峰, 2012].

To get rid of proprietary implement of MAC layer and network layer, ZBOSS (ZigBee Open Source Stack) v1.0 is a nice choice. ZBOSS v1.0 is fully open source [马海潮, 2014] and it supports TI CC253x series chips.

4.3 6LoWPAN and Fully open source embedded OS

6LoWPAN, IPv6 networking over low rate personal area networks, will be the future of IoT, because of the address space exhaustion of IPv4 [Shelby and Bormann, 2011]. Contiki, a fully open source embedded operating system using uIP TCP/IP (v4 and v6) stack and Rime stack supports 6LoWPAN [Dunkels et al., 2004, 杨勇, 2013]. TI CC2530 can use Contiki to support 6LoWPAN [杨勇, 2013].

4.4 Multiple interfaces

A lot of IoT devices are using specific network communication standards, such as IEEE 802.11, ZigBee, Bluetooth, Infrared, and so forth. To solve this problem, the Loongson IoT gateway should support multiple interfaces [Chang et al., 2015]. Because of Loongson 1B having 12 UART interfaces and 4 PWM interfaces [芯片研发部, 2015], it can connect with lots of UART and PWM chips, such as a UART ZigBee chip, a UART Bluetooth chip, a PWM Infrared chip, and so forth.

The multiple interfaces structure of the Loongson 1B IoT gateway is shown in the Figure 3.


Figure 3: The multiple interfaces structure of the Loongson 1B IoT gateway.

 

However, Loongson 1B with SPI wireless NIC only supports IEEE 802.11 network up to 30 Mbps, and with USB wireless NIC only supports IEEE 802.11 network up to 480 Mbps. To support higher speed IEEE 802.11 network, the Loongson IoT gateway should use Loongson 1A instead of Loongson 1B, with a PCI wireless NIC. Because of Loongson 1A having 4 UART interfaces and 4 PWM interfaces [芯片研发部, 2015], it can also connect with lots of UART and PWM chips.

The multiple interfaces structure of the Loongson 1A IoT gateway is shown in the Figure 4.


Figure 4: The multiple interfaces structure of the Loongson 1A IoT gateway.

 

5 Conclusions

Although the prototype of Loongson IoT ZigBee Gateway already has the basic function of IoT Gateway, it lacks a number of functions, and a lot of things still can be done to improve it, such as adding widely used IEEE 802.11 function (by using USB or SPI wireless NIC, or replacing Loongson 1B with Loongson 1A and using PCI wireless NIC), replacing Zstack with a fully open source ZigBee protocol stack ZBOSS to get rid of proprietary implement or using a fully open source embedded operating system Contiki to support 6LoWPAN, and implementing multiple interfaces such as Bluetooth, Infrared, and so forth.

6 Acknowledgement

The authors wish to acknowledge the help of their Graduate Teaching Assistant, Mr. Salman Salloum in commenting on an early draft of the chapter.

References

C.-T. Chang, C.-Y. Chang, R. D. B. Martinez, P.-T. Chen, and Y.-D. Chen. An iot multi-interface gateway for building a smart space. Open Journal of Social Sciences, 3(07):56, 2015. doi: 10.4236/jss.2015.37010.

A. Dunkels, B. Gronvall, and T. Voigt. Contiki-a lightweight and flexible operating system for tiny networked sensors. In Proceedings of the 29th Annual IEEE International Conference on Local Computer Networks, pages 455–462. IEEE Computer Society, 2004. doi: 10.1109/lcn.2004.38.

W. Hu, Y. Zhang, and J. Fu. An introduction to cpu and dsp design in china. Science China Information Sciences, 59(1):1–8, 2015. doi: 10.1007/s11432-015-5431-6.

Z. Shelby and C. Bormann. 6LoWPAN: The wireless embedded Internet, volume 43. John Wiley & Sons, 2011. doi: 10.1002/9780470686218.

刁玉峰. 面向 zigbee 传感器网络的 osgi 服务网关实现. Master’s thesis, 吉林大学, 2012.

张艺粟, 李鸿彬, 贾军营, and 于波. 物联网 zigbee 网关的设计与实现. 计算机系统应用, 22(6):34–38, 2013. doi: 10.3969/j.issn.1003-3254.2013.06.007.

方青文. 航天专用数据采集和状态控制 asic 设计与验证. Master’s thesis, 中国科学院大学, 2013.

杨勇. 基于 contiki 6lowpan 网关节点设计. Master’s thesis, 华中师范大学, 2013.

胡伟武. 龙芯产业化项目. 高科技与产业化, 9(9):49–49, 2013.

胡伟武 and 唐志敏. 龙芯 1 号处理器结构设计. 计算机学报, 26(4):385–396, 2003. doi: 10.3321/j.issn:0254-4164.2003.04.001.

芯片研发部. 龙芯芯片产品技术白皮书. Technical Report V2.3, 龙芯中科技术有限公司, 08 2015.

袁子阳. 抗辐射加固龙芯处理器的空间辐射环境适应性研究及航天计算机设计. Master’s thesis, 中国科学院研究生院 (空间科学与应用研究中心), 2009.

谢平. 基于龙芯 ip soc 芯片的 fpga 验证技术研究. 电子技术应用, 36(10):128–131, 2010. doi: 10.3969/j.issn.0258-7998.2010.10.041.

马海潮. Zigbee 网络可扩展性及分簇路由协议的研究. Master’s thesis, 西安电子科技大学, 2014.

License

This article and its reviews are distributed under the terms of the Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and redistribution in any medium, provided that the original author and source are credited.