Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support AT86RF233 #15841

Closed
KwonTae-young opened this issue May 3, 2019 · 6 comments
Closed

Support AT86RF233 #15841

KwonTae-young opened this issue May 3, 2019 · 6 comments
Labels
Feature Request A request for a new feature

Comments

@KwonTae-young
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
I'm trying to use AT86RF233 for wireless communication.
My first goal is a 2.4GHz RF wireless keyboard.
SAM R21 was supported in #13494, but currently AT86RF233 support is missing.

Describe the solution you'd like
I want a driver to support AT86RF233.
I want to operate the wireless keyboard with 2.4GHz communication(2Mbps) of AT86RF233.

Describe alternatives you've considered
I have tested two ESB(Enhanced Shock Burst) communications with two nRF52840-PCA10056 boards.(#15607)
test video: https://youtu.be/8rfX-1xxlSI
But it must use nordic MCU.

Additional context
I have no experience dealing with this type of wireless chip.
Sources that use Arduino and AT86RF233 exist in other sites.(arduino-at86rf233)

I connected ST STM32F4DISCOVERY and REB233-XPRO as follows.
The REB233-XPRO is an AT86RF233 module.
image

pin AT86RF233(REB X-Pro Extension Header) STM32F4-DISCO
Reset 7 PB0
Interrupt 9 PB1
Sleep 10 PB2
CS 15 PA4
MOSI 16 PA7
MISO 17 PA6
SCK 18 PA5
Ground 19 GND
Power 20 VDD (3V)

image

And I read the part number, version, and main id through SPI communication.

west init zephyrproject -m https://github.com/KwonTae-young/zephyr/ --mr at86rf233
cd zephyrproject/zephyr
source zephyr-env.sh
mkdir samples/drivers/rf/spi_at86rf2xx/build
cd samples/drivers/rf/spi_at86rf2xx/build
cmake -DBOARD=stm32f4_disco ..
make -j8 flash

console output

***** Booting Zephyr OS zephyr-v1.13.0-6846-gf3409e84cf63 *****
AT86RF2XX(2.4GHz Transceiver) example application

PART_NUM:0xb
VERSION_NUM:0x1
MAIN_ID:0x1f

I would like help from people who are interested in AT86RF233.

@KwonTae-young KwonTae-young added the Feature Request A request for a new feature label May 3, 2019
@tbursztyka
Copy link
Collaborator

My first goal is a 2.4GHz RF wireless keyboard.

Do you know the protocol used by the keyboard?
Zephyr provides support for IEEE 802.15.4 + 6LoWPAN, but nothing for Zigbee (which is kind of proprietary I believe. Correct me if I am wrong).

Since it is an Atmel chip, ASF should provide support for it. It would require to import the necessary bits from ASF into ext/hal/atmel/asf.

If and only if you are interested in 802.15.4:
It is "just" a matter of implementing a zephyr driver using this HAL and implementing this interface include/net/ieee802154_radio.h , see drivers/ieee802154/ for some examples

@KwonTae-young
Copy link
Collaborator Author

KwonTae-young commented May 3, 2019

@tbursztyka

Do you know the protocol used by the keyboard?

I want to wirelessly receive the data and output it to the HID keyboard.
I have tried HID keyboard.


It would require to import the necessary bits from ASF into ext/hal/atmel/asf.

Later, I'm trying to reference the ASF.
But I am still immature at the use of Atmel.:sweat_smile:

If and only if you are interested in 802.15.4

I have not planned to use IEEE 802.15.4 yet.
In some cases, i can send a string, but IEEE 802.15.4 has a slower bit rate (250kbps).

I'm sorry I do not have enough English. :)
Thank you.

@KwonTae-young
Copy link
Collaborator Author

I have done a very basic Tx/Rx communication test of the AT86RF233.
The source worked much with msolters/arduino-at86rf233.
I tested it in Extended Operating Mode instead of IEEE 802.15.4 mode.

The main communication settings are as follows.

SFD(Start-Of-Frame Delimiter): 0x12
Data Rate: 2000kb/s

The program is designed to operate in one-sided Tx/Rx mode.
You can switch Tx/Rx mode by using #define WRITE comment processing.
image

I have prepared two stm32f4_disco and AT86RF233 modules for testing.
One works as Tx and the other works as Rx.
image

The Tx board sends 23 bytes at 1 second intervals.

Build as follows.

west init zephyrproject -m https://github.com/KwonTae-young/zephyr/ --mr at86rf233
cd zephyrproject/zephyr
source zephyr-env.sh
mkdir samples/drivers/rf/spi_at86rf2xx/build
cd samples/drivers/rf/spi_at86rf2xx/build
cmake -DBOARD=stm32f4_disco ..
make -j8 flash

Below is the log.

Tx

***** Booting Zephyr OS zephyr-v1.13.0-6847-g552ae3411921 *****
AT86RF2XX(2.4GHz Transceiver) example application

PART_NUM: 0xb
VERSION_NUM: 0x1
MAN_ID: 0x1f
sfd: 0x12
DATA RATE: 2000kb/s
tx_power: 4[dBm]

setting end

Rx

***** Booting Zephyr OS zephyr-v1.13.0-6847-g552ae3411921 *****
AT86RF2XX(2.4GHz Transceiver) example application

PART_NUM: 0xb
VERSION_NUM: 0x1
MAN_ID: 0x1f
sfd: 0x12
DATA RATE: 2000kb/s
tx_power: 4[dBm]

setting end
[at86rf2xx] EVT - RX_START
[at86rf2xx] EVT - RX_END
read 23byte
data[23]: 0x12 0x34 0x56 0x78 0x9a 0xbc 0xde 0xff 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 0x99 0xaa 0xbb 0xcc 0xdd 0xee 0xff

[at86rf2xx] EVT - RX_START
[at86rf2xx] EVT - RX_END
read 23byte
data[23]: 0x12 0x34 0x56 0x78 0x9a 0xbc 0xde 0xff 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 0x99 0xaa 0xbb 0xcc 0xdd 0xee 0xff

As advised by @tbursztyka, i need to get the necessary information from the ASF to the BIT information of AT86RF233.
At first, the basic operation was aimed, and yet this source is a mess.

@nandojve
Copy link
Member

nandojve commented Feb 8, 2020

Hi @KwonTae-young, if you are interested yet on RF2xx driver please take a look at #20296. We merged a full functional 2.4GHz driver. It was tested by Tridonic for Openthread compatibility too.
I hope it can help you!

@p0we7
Copy link

p0we7 commented Aug 16, 2021

Hello, @KwonTae-young , from your description it seems that you have completed a prototype of the NRF52840 using ESB in Zephyr, can you provide more information on this?

@KwonTae-young
Copy link
Collaborator Author

Hello, @KwonTae-young , from your description it seems that you have completed a prototype of the NRF52840 using ESB in Zephyr, can you provide more information on this?

@p0we7 ESB-related examples were located in other repositories.(#15607)
https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/samples/esb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A request for a new feature
Projects
None yet
Development

No branches or pull requests

4 participants