/ RNode_Firmware_CE_G2 / rnodeconf_station_g2_patch.py
rnodeconf_station_g2_patch.py
 1  # Station G2 patches for rnodeconf.py
 2  # This shows the additions needed to support Station G2 in rnodeconf
 3  
 4  # In the ROM class, add these constants:
 5  PRODUCT_STATION_G2  = 0x60  # Station G2 devices
 6  MODEL_62            = 0x62  # Station G2, 915 MHz
 7  
 8  # In the products dictionary, add:
 9  products = {
10      # ... existing products ...
11      ROM.PRODUCT_STATION_G2: "Station G2",
12      # ... rest of existing products ...
13  }
14  
15  # In the models dictionary, add:
16  models = {
17      # ... existing models ...
18      0x62: [902000000, 928000000, 30, "902 - 928 MHz", "rnode_firmware_station_g2.zip", "SX1262"],
19      # ... rest of existing models ...
20  }
21  
22  # Station G2 specific details:
23  # - Frequency range: 902-928 MHz (US915 ISM band)
24  # - Max TX power: 30 dBm (with external PA)
25  # - Firmware filename: rnode_firmware_station_g2.zip
26  # - Radio chip: SX1262
27  
28  # In the autoinstall section, add Station G2 as option [17]:
29  print("[17] Station G2")
30  
31  # Add case handler for Station G2:
32  elif c_dev == 17:
33      selected_product = ROM.PRODUCT_STATION_G2
34      selected_mcu = ROM.MCU_ESP32
35      selected_platform = ROM.PLATFORM_ESP32
36      selected_model = ROM.MODEL_62
37      fw_filename = "rnode_firmware_station_g2.zip"
38      clear()
39      print("")
40      print("-" * 75)
41      print("                     Station G2 RNode Installer")
42      print("")
43      print("Important! Using RNode firmware on Station G2 devices should currently be")
44      print("considered experimental. It is not intended for production or critical use.")
45      print("The currently supplied firmware is provided AS-IS as a courtesy to those")
46      print("who would like to experiment with it. Hit enter to continue.")
47      print("-" * 75)
48      input()
49  
50  # In get_flasher_call function, add Station G2 handling:
51  elif fw_filename == "rnode_firmware_station_g2.zip":
52      return [
53          sys.executable, flasher,
54          "--chip", "esp32s3",
55          "--port", args.port,
56          "--baud", args.baud_flash,
57          "--before", "default_reset",
58          "--after", "hard_reset",
59          "write_flash", "-z",
60          "--flash_mode", "dio",
61          "--flash_freq", "80m",
62          "--flash_size", "4MB",
63          "0xe000", UPD_DIR+"/"+selected_version+"/rnode_firmware_station_g2.boot_app0",
64          "0x0", UPD_DIR+"/"+selected_version+"/rnode_firmware_station_g2.bootloader",
65          "0x10000", UPD_DIR+"/"+selected_version+"/rnode_firmware_station_g2.bin",
66          "0x210000", UPD_DIR+"/"+selected_version+"/console_image.bin",
67          "0x8000", UPD_DIR+"/"+selected_version+"/rnode_firmware_station_g2.partitions",
68      ]