Unable to use LoRa in Zypher

Hi there,

I am aware that Zypher is not formally supported and that RAKwireless has implemented a full RUI driver/implementation for the RAK1172.

Support for the RAK11720 has been contributed to the Zypher project. Before leveraging the board support, I cross examined the configuration in the Zypher board vs that of the RUI implementation. I specifically looked for the LoRa configuration (i.e. SPI port, pins, active high/low, tcxo voltage, etc.). I noticed a few very minor discrepancies (1.7V TCXO in RUI vs 3.3V in Zypher, and 10ms clock startup vs 5ms in Zypher). I made small edits to match exactly.

Nevertheless, I am unable to get a LoRa transmissions to/from the RAK11720. I have a few other prototype products I designed with the RAK3172 that work flawlessly. To rule out any possible defects during manufacturing, I also tried my implementation with a RAKwireless WisBlock board and the 11720 Core. Same exact results.

What makes this particularly difficult is that RAKwireless will not share the schematic of the module. We have dozens of other prototypes using modules from other vendors (Fanstel, Espressif, etc.) all very well documented by the vendors with schematics that make it very easy to develop custom support for the components and configurations being used in the module. I found one post (sorry, forum software won’t let me put more than 2 links…) where Bernd shared a bit of information about the layout inside the module between the AM3 and the SX1262, but there’s unfortunately not enough information there. For example, I don’t know what the specifications of the TCXO are (voltage, ppm, etc), whether the antenna power switch is active high/low, the RUI driver makes reference (sorry, forum software won’t let me put more than 2 links…) to a DIO2 line connected to GPIO14 on the AM3, etc.

I really want to get the RAK11720 module working for this latest prototype. We had to upgrade from the RAK3172 due to both RAM and Flash constraints.

As for the issue, I am able to communicate with the SX1262, but I am not able to make or receive any transmissions. I have a spectrum analyzer that I have used to confirm no transmissions on any frequency in the 850-950MHz range.

Here’s my DTS snippet for the SX1262:

&spi1 {
	compatible = "ambiq,spi";
	pinctrl-0 = <&spi1_default>;
	pinctrl-names = "default";
	cs-gpios = <&gpio0_31 11 GPIO_ACTIVE_LOW>;
	clock-frequency = <DT_FREQ_M(1)>;
	status = "okay";

	lora: lora@0 {
		compatible = "semtech,sx1262";
		reg = <0>;
		reset-gpios = <&gpio0_31 17 GPIO_ACTIVE_LOW>;
		busy-gpios = <&gpio0_31 16 GPIO_ACTIVE_HIGH>;
		dio1-gpios = <&gpio0_31 15 GPIO_ACTIVE_HIGH>;
		antenna-enable-gpios = <&gpio0_31 18 GPIO_ACTIVE_LOW>;
		dio2-tx-enable;
		dio3-tcxo-voltage = <SX126X_DIO3_TCXO_1V7>;
		tcxo-power-startup-delay-ms = <10>;
		spi-max-frequency = <DT_FREQ_M(1)>;
	};
};

Here are some logs for an example transmissions after enabling debug logging in the application:

00> [00:00:32.466,552] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x8c w. 6 bytes of data
00> [00:00:32.466,583] <dbg> sx126x: SX126xWakeup: Sending GET_STATUS
00> [00:00:32.466,705] <dbg> sx126x: SX126xWakeup: Waiting for device...
00> [00:00:32.466,735] <dbg> sx126x: SX126xWakeup: Device ready
00> [00:00:32.466,735] <dbg> sx126x: SX126xAntSwOn: Enabling antenna switch
00> [00:00:32.466,949] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x8 w. 8 bytes of data
00> [00:00:32.467,193] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x8c w. 6 bytes of data
00> [00:00:32.467,468] <dbg> sx126x: SX126xWriteBuffer: Writing buffers @ 0x0 (16 bytes)
00> [00:00:32.467,864] <dbg> sx126x: SX126xSetOperatingMode: SetOperatingMode: TX (4)
00> [00:00:32.467,895] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x83 w. 3 bytes of data
00> [00:00:32.468,597] <dbg> sx12xx_common: sx12xx_lora_send: Expected air time of 16 bytes = 74ms
00> [00:00:32.492,004] <dbg> sx126x: sx126x_dio1_irq_work_handler: Processing DIO1 interrupt
00> [00:00:32.492,034] <dbg> sx126x: SX126xReadCommand: Issuing opcode 0x12 (data size: 2)
00> [00:00:32.492,218] <dbg> sx126x: SX126xReadCommand: -> status: 0xac
00> [00:00:32.492,218] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x2 w. 2 bytes of data[0m
00> [00:00:32.492,431] <dbg> sx126x: SX126xSetOperatingMode: SetOperatingMode: STDBY_RC (1)
00> [00:00:32.492,462] <dbg> sx126x: SX126xAntSwOff: Disabling antenna switch
00> [00:00:32.492,492] <dbg> sx126x: SX126xWriteCommand: Issuing opcode 0x84 w. 1 bytes of data
00> [00:00:32.492,645] <dbg> sx126x: SX126xSetOperatingMode: SetOperatingMode: SLEEP (0)

Logs indicate no issues. The SX1262 is producing an interrupt on DIO1 as expected seemingly indicating a successful transmission. Nevertheless, it is not making any transmissions.

I am not sure where else to turn here. I must have an incorrect configuration somewhere. Antenna switch not switching? Antenna power configuration not correct? Some unknown pin mis-configured?

Sorry for the wall of text in this post. I wanted to be as detailed as I could.

Any chance anyone knows what may be happening here? There seem to be very few resources online for the RAK11720. I can’t find even a single opensource custom implementation on the RAK11720 that’s not RAKwireless’s own RUI implementation.

Thanks in advance!

RAK11720 is officially supported by zephyrproject-rtos.
You can check there for the required answers ==> boards: rak: Change to use sw controlled cs for rak11720 by srcnert · Pull Request #76676 · zephyrproject-rtos/zephyr · GitHub

We cannot provide any further support for Zephyr on RAK11720.

Hi Bernd. Thanks a ton for the quick response.

The RAK11720 is not “officially” supported by Zephyr. Support for the RAK11720 was contributed to the project by an individual not affiliated with the Zephyr project team and with no warranty or implied support (as is the case with most opensource contributions). I would be more than glad to contribute a fix to that implementation, but I have zero information/support to go off of to accomplish this. This is why I am reaching out here. I don’t need Zephyr support, I need support with understanding exactly how the sx1262 on the RAK11720 module is connected (crystal, all IO lines, etc.).

The contributed support for the RAK11720 on Zephyr does not work. It does not work on our prototypes, and it does not work on any of the WisBlock Cores we have (RAK11722). The behavior is the same, as I described above.

It really is disappointing that we are not able to get any more information or help. I appreciate you may be unable to provide that to us, and I respect whatever reason that may be. The next steps are clear on our side, we will unfortunately need to switch away from RAKwireless products to a better supported and documented alternative.

@brolly759

I think you are using RAK11720 with Zephyr?

Not I, Sercan was doing a Zephyr build