GithubHelp home page GithubHelp logo

esp-rs / esp-ieee802154 Goto Github PK

View Code? Open in Web Editor NEW
35.0 9.0 3.0 661 KB

Low-level IEEE802.15.4 driver for the ESP32-C6 and ESP32-H2

License: Apache License 2.0

Rust 93.02% C 3.49% RPC 3.33% C++ 0.17%

esp-ieee802154's Introduction

esp-ieee802154

Low-level IEEE 802.15.4 driver for the ESP32-C6 and ESP32-H2.

Implements the PHY/MAC layers of the IEEE802.15.4 protocol stack, and supports sending and receiving of raw frames.

Running examples

cargo run --release --example EXAMPLE_NAME --features CHIP

Supported chips:

  • esp32c6
  • esp32h2

Available examples:

  • receive_all_frames: print all frames received on channel 15, in promiscuous mode
  • receive_frame: print all frames received on channel 15, pan 0x4242, sent to short address 0x2323
  • send_broadcast_frame: send broadcast frames on channel 15
  • send_frame: send regular frames on channel 15, pan 0x4242, to short address 0x2323

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

esp-ieee802154's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp-ieee802154's Issues

`ieee802154` vs `smoltcp` as the underlying implementation

Just opening the discussion here. While the ieee802154 recently has seen some activity it has been abandoned for 3+ years. While the smoltcp's IEEE 802.15.4 support has been there for quite some time, and smoltcp has much more users.

Plus smoltcp's implementation is mostly zero-copy which should be beneficial for our application.

Transfer repository to `esp-rs` organization and make public

Just going to use this issue to track the various things which need to be done before we're able to ultimately do this.

  • Add support for ESP32-H2 (#5)
  • Refactor/simplify/clean up code as much as possible (#6)
  • Rename repository to fix the typo (I also suggest maybe dropping -rs while we're at it?)
  • Squash commits as necessary
  • Transfer repository to esp-rs organization
  • Make repository public

pll_cal exceeds 2ms!!! on esp32c6

I tried this https://github.com/esp-rs/esp-ieee802154/blob/b7450029e492a36a36a77aad9f96327618cc6ed8/esp-ieee802154-examples/examples/receive_all_frames.rs yesterday and it worked, now all I get is

[2024-01-03T01:36:36Z INFO ] Flashing has completed!
Commands:
    CTRL+R    Reset chip
    CTRL+C    Exit

ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x4086c410,len:0xd48
0x4086c410 - coex_pti_tab
    at ??:??
load:0x4086e610,len:0x2d68
0x4086e610 - coex_pti_tab
    at ??:??
load:0x40875720,len:0x1800
0x40875720 - coex_pti_tab
    at ??:??
SHA-256 comparison failed:
Calculated: 377c26481ad6ab0cce508450f353a55f4bd7eb9159aaf85fde3111071f164514
Expected: 0af544a033ab3492852b8232c904c578d5f07c9d4a423a64473f060db374ab32
Attempting to boot anyway...
entry 0x4086c410
0x4086c410 - coex_pti_tab
    at ??:??
I (42) boot: ESP-IDF v5.1-beta1-378-gea5e0ff298-dirt 2nd stage bootloader
I (42) boot: compile time Jun  7 2023 08:02:08
I (43) boot: chip revision: v0.0
I (47) boot.esp32c6: SPI Speed      : 40MHz
I (52) boot.esp32c6: SPI Mode       : DIO
I (57) boot.esp32c6: SPI Flash Size : 8MB
I (61) boot: Enabling RNG early entropy source...
I (67) boot: Partition Table:
I (70) boot: ## Label            Usage          Type ST Offset   Length
I (78) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (85) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (92) boot:  2 factory          factory app      00 00 00010000 007f0000
I (100) boot: End of partition table
I (104) esp_image: segment 0: paddr=00010020 vaddr=42000020 size=176c8h ( 95944) map
I (132) esp_image: segment 1: paddr=000276f0 vaddr=40800000 size=00fe8h (  4072) load
I (134) esp_image: segment 2: paddr=000286e0 vaddr=420186e0 size=0a0d0h ( 41168) map
I (147) esp_image: segment 3: paddr=000327b8 vaddr=40800fe8 size=00f5ch (  3932) load
I (148) esp_image: segment 4: paddr=0003371c vaddr=40802a8c size=00050h (    80) load
I (156) boot: Loaded app from partition at offset 0x10000
I (161) boot: Disabling RNG early entropy source...
Start
slept
error: pll_cal exceeds 2ms!!!
error: pll_cal exceeds 2ms!!!
INFO - libbtbb version: b684fcb, May 17 2023, 20:14:35

INFO - phy_version: 202, b4b3263, May 17 2023, 20:14:14

INFO - date=220622
config
start receiving
loop begin

Low power receive example?

Would it be possible to write an example of how to do a "sleepy" receiving device that wakes up periodically and maintains synchronisation with a mains-powered device? I know that's how BLE works; I don't know too much about IEEE 802.15.4 but I assume the same mechanisms are used with it, e.g. for Thread.

Is that actually possible using this API?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.