Category Archives: 6lowpan for linux

“New OpenWRT Series” #1: Setting up OpenWRT (Chaos Calmer) for Arduino Yún

The latest OpenWRT release (Chaos Calmer) has already there for a long time. It ships with Linux kernel version 3.8.21 which supports 6LowPAN via Bluetooth Low Energy (BLE). Both of them features Open WRT routers as a very good solution for … Continue reading

Posted in 6lowpan for linux, Linux, nRF52, OpenWRT, 未分类 | Leave a comment

IEEE 802.15.4 for Linux 详解 (WPAN设备注册和初始化)

在这章所说的设备注册和初始化是指WPAN网络设备的注册和初始化,而不是SPI总线设备的设备注册。下面这张图表示CC2420 probe函数中如何注册WPAN的过程。 下面详细讲解每个函数的作用: 1. IEEE 802.15.4_alloc_device 1: struct ieee802154_dev *ieee802154_alloc_device(size_t priv_size, 2: struct ieee802154_ops *ops) 3: { 4: struct wpan_phy *phy; 5: struct ieee802154_priv *priv; 6:  7: phy = wpan_phy_alloc(ALIGN(sizeof(*priv), NETDEV_ALIGN) + priv_size); // 给wpan_phy结构分配空间 8: if (!phy) { 9: … Continue reading

Posted in 6lowpan for linux | Leave a comment

IEEE 802.15.4 for Linux 详解 (MAC层数据结构)

IEEE802.15.4-2003 specification 1. IEEE 802.15.4的硬件地址过滤,用于侦听特定的地址 1: struct ieee802154_hw_addr_filt { 2: u16 pan_id; 3: u16 short_addr; 4: u8 ieee_addr[IEEE802154_ADDR_LEN]; 5: u8 pan_coord; 6: }; 2. IEEE 802.15.4 设备结构 1: struct ieee802154_dev { 2: /* filled by the driver */ 3: int … Continue reading

Posted in 6lowpan for linux | Leave a comment

IEEE 802.15.4 for Linux详解 (802.15.4 PHY层数据结构)

 这章主要介绍IEEE 802.15.4中的一些重要的数据结构 1.PHY层 在IEEE 802.15.4标准中,定义PHY层的特点如下: 启动或关闭RF的动作。 Energy Detection(ED)、Linking Quality Indication(LQI)以便实现选择品质良好的频道。 Clear Channel Assessment(CCA),来检测此频道是否正处于忙碌状态。 提供频率选择:868-868.6 MHz (e.g., Europe)902-928 MHz (e.g., North America)2400-2483.5 MHz (worldwide) PHY层主要提供两种服务接口:其一为PHY层的专为资料传输所提供的服务接口,其工作是通过RF来传送或接收封包,此封包称为Physical Protocol Data Units (PPDUs),此接口称为Physical Layer Data Service Access Point (PD-SAP)。其二为PHY层提供的管理服务接口,此接口称为Physical Layer Mangement Entity Service Point (PLME-SAP)。另外还有一个专门存储PHY层属性的一个资料库,称为PHY … Continue reading

Posted in 6lowpan for linux | Leave a comment

IEEE 802.15.4 for Linux (SPI设备及驱动)

When the system boots, it creates a sort of database(kobject, kset) that associates each bus to a list of detected devices that use the bus. For example, the descriptor for the SPI bus includes, among other parameters, a list of … Continue reading

Posted in 6lowpan for linux | Leave a comment

IEEE 802.15.4 for Linux详解 (SPI总线)

1.简介 The Serial Peripheral Interface (SPI) bus is a serial master-slave interface similar to I2C and comes built in on many microcontrollers. It uses four wires (compared to two on I2C): Serial CLocK (SCLK), Chip Select (CS), Master Out Slave … Continue reading

Posted in 6lowpan for linux | Leave a comment

IEEE 802.15.4 for linux详解 (SPI总线2)

2.3 spi_transfer 1: /* 2: * SPI transfers always write the same number of bytes as they read. 3: * Protocol drivers should always provide @rx_buf and/or @tx_buf. 4: * In some cases, they may also want to provide DMA … Continue reading

Posted in 6lowpan for linux | Leave a comment