MOD-MRF24J40/en: различия между версиями
(Новая страница: «==Ссылки== * [https://www.olimex.com/Products/Modules/RF/MOD-MRF24J40/resources/MOD-MRF24J40-schematic.pdf schematic circuit ] * [https://www.olimex.com/Pro…») |
(Новая страница: «6lowpan@0 { compatible = "microchip,mrf24j40"; spi-max-frequency = <100000>; reg = <6>; interrupt-parent = <&gpio1>; <-------- use GPIO 53 (21 + 32) в…») |
||
(не показаны 4 промежуточные версии этого же участника) | |||
Строка 53: | Строка 53: | ||
........ | .............. | ||
Строка 60: | Строка 60: | ||
== | ==Работа с 6LoWPAN== | ||
Устанавливаем пакеты для работы с 6LoWPAN: | |||
<pre> | <pre> | ||
Строка 68: | Строка 68: | ||
Работа с 6LoWPAN производится с помощью утилиты <b>iz</b> | |||
<pre> | <pre> | ||
Строка 78: | Строка 78: | ||
Для работы необходим пакет lowpan-tools из sid | |||
==Ссылки== | ==Ссылки== | ||
* [https://www.olimex.com/Products/Modules/RF/MOD-MRF24J40/resources/MOD-MRF24J40-schematic.pdf | * [https://www.olimex.com/Products/Modules/RF/MOD-MRF24J40/resources/MOD-MRF24J40-schematic.pdf принципиальная схема] | ||
* [https://www.olimex.com/Products/Modules/RF/MOD-MRF24J40/ | * [https://www.olimex.com/Products/Modules/RF/MOD-MRF24J40/ |
Версия 19:57, 18 июля 2019
IEEE 802.15.4 transceiver module from Olimex. Contains a chip of Microchip MRF24J40.
The module can be bought in the Olimex store.
Is inserted into the connector UEXT uses the SPI interface.
IEEE 802.15.4
IEEE 802.15.4 is a physical layer that is used by ZigBee, 6LoWPAN, and other standards. Linux supports the standard 6LoWPAN - IPv6 network over the physical layer. Operating frequency - 2.4 Ghz, unlicensed range.
Support for 6LoWPAN on Linux is currently not fully functional.
http://elinux.org/images/7/71/Wireless_Networking_with_IEEE_802.15.4_and_6LoWPAN.pdf
Connection
The module is connected to the Wiren Board controller via the UEXT2 connector. Pins 6-7 (program I2C) are used in GPIO mode.
For Linux, you must use the INT interrupt output. In the module's UEXT connector, this signal is routed to the UART RX (4) pin, which makes it impossible to use it as an interrupt source. You need to connect the INT pin on the findings UEXT2, which is essentially a GPIO, for example on pin 6 UEXT2 (GPIO53).
The easiest way to do this is to short-circuit (e.g. solder) the legs 4 and 6 on the UEXT plug of the module.
Settings
The driver of the transceiver in the kernel [1]. Minor changes were added to the driver to operate in half-duplex mode for SPI and in Device Tree. The driver is included in the default image as a module.
To connect the module, you must declare the device in Device Tree/en:
ssp1: ssp@80034000 { .............. cs-gpios = <&gpio0 17 0 &gpio2 28 0 &gpio1 20 0 &gpio2 27 0 /* 91 25 @ CON2 UEXT2 CS/GPIO */ <-------- Chip Select of UEXT2 connector corresponds to device number 6(2+4) >; ........ 6lowpan@0 { compatible = "microchip,mrf24j40"; spi-max-frequency = <100000>; reg = <6>; interrupt-parent = <&gpio1>; <-------- use GPIO 53 (21 + 32) в качестве IRQ interrupts = <21 0>; <-------- It corresponds to output number of the 6 of the UEXT2 connector }; .............. };
Работа с 6LoWPAN
Устанавливаем пакеты для работы с 6LoWPAN:
apt-get install lowpan-tools
Работа с 6LoWPAN производится с помощью утилиты iz
root@wirenboard:~# iz listphy wpan-phy0 IEEE 802.15.4 PHY object page: 0 channel: n/a channels on page 0: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Для работы необходим пакет lowpan-tools из sid