Indoor ROCK PI

datasheet

  • Rock Pi ?? ??
  • 2GB RAM
  • 32GB eMMC
  • 40 pin hat with mpcie slot with 1301 concentrator

Zebra hat pinout

  • CS (raspi GPIO24, raspi physical pin 18, rockpi pin gpioset 4 28=1 (from gpioinfo | egrep '^g|PIN_18))
  • RST (raspi GPIO17, raspi physical pin 11, rockpi pin 4 18)
  • BUSY (raspi GPIO27, raspi physical pin 13, rockpi pin 4 22)
  • IRQ (raspi GPIO22, raspi physical pin 15, rockpi pin 4 21)

pymc_core patch to go with this:

diff --git a/examples/common.py b/examples/common.py
index 826b542..0a6436c 100644
--- a/examples/common.py
+++ b/examples/common.py
@@ -121,6 +121,22 @@ def create_radio(radio_type: str = "waveshare", serial_port: str = "/dev/ttyUSB0
                 "coding_rate": 5,
                 "preamble_length": 17,
             },
+            "zebra": {
+                "bus_id": 0,
+                "cs_id": 0,
+                "cs_pin": 28,
+                "reset_pin": 18,
+                "busy_pin": 22,
+                "irq_pin": 21,
+                "txen_pin": -1,
+                "frequency": int(869.618 * 1000000),  # EU: 869.525 MHz,
+                "tx_power": 22,
+                "spreading_factor": 8,
+                "bandwidth": int(62.5 * 1000),
+                "coding_rate": 8,
+                "preamble_length": 17,
+                "use_dio3_tcxo": True
+            },
         }

         if radio_type not in configs:
diff --git a/examples/discover_nodes.py b/examples/discover_nodes.py
index 097be79..9a62b5b 100644
--- a/examples/discover_nodes.py
+++ b/examples/discover_nodes.py
@@ -149,7 +149,7 @@ def main():
     parser = argparse.ArgumentParser(description="Discover nearby mesh nodes")
     parser.add_argument(
         "--radio-type",
-        choices=["waveshare", "uconsole", "meshadv-mini", "kiss-tnc"],
+        choices=["waveshare", "uconsole", "meshadv-mini", "kiss-tnc", "zebra"],
         default="waveshare",
         help="Radio hardware type (default: waveshare)",
     )
diff --git a/src/pymc_core/hardware/gpio_manager.py b/src/pymc_core/hardware/gpio_manager.py
index 399a5da..7d1e003 100644
--- a/src/pymc_core/hardware/gpio_manager.py
+++ b/src/pymc_core/hardware/gpio_manager.py
@@ -44,7 +44,7 @@ logger = logging.getLogger("GPIOPinManager")
 class GPIOPinManager:
     """Manages GPIO pins abstraction using Linux GPIO character device interface"""

-    def __init__(self, gpio_chip: str = "/dev/gpiochip0"):
+    def __init__(self, gpio_chip: str = "/dev/gpiochip4"):
         """
         Initialize GPIO Pin Manager

@@ -77,7 +77,7 @@ class GPIOPinManager:
                 return chips[0]
             else:
                 logger.warning("No GPIO chips found, defaulting to /dev/gpiochip0")
-                return "/dev/gpiochip0"
+                return "/dev/gpiochip4"
         return gpio_chip

     def setup_output_pin(self, pin_number: int, initial_value: bool = False) -> bool:
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9