LongReach (LoRa) mLink Module (HCMODU0250)

mLink serial I2C modules
andrew
Site Admin
Posts: 1481
Joined: Sun Aug 05, 2012 4:15 pm

Re: LongReach (LoRa) mLink Module (HCMODU0250)

Post by andrew » Mon May 19, 2025 8:22 am

Thank you. I had missed the tabs on the examples and only seen the first one.
I suggest retaining LORA_Tx_Done with the correct meaning as deleting it would break user code.

Easily done.

Just for reference, I've now updated the Arduino library and python module. The LORA_Tx_Done() function is now deprecated and has been replaced with LORA_Tx_Busy(). The appropriate examples in the first post have been updated to reflect this.

The reason why I have done this is because simply flipping the operation of the LORA_Tx_Done() function will not be obvious to existing users and may cause much hair pulling. Removing the function will cause a compile error but will make it more obvious something has changed.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

JohnF
Posts: 9
Joined: Thu May 15, 2025 11:20 am

Re: LongReach (LoRa) mLink Module (HCMODU0250)

Post by JohnF » Mon May 19, 2025 5:37 pm

Andrew

I have been able to get transmission from a LoRa device attached to my OPEN-SMART ONE to another attached to a Raspberry Pi 4 using the Python code. I had it working on Saturday and for some reason it did not start up today. It is working now.

There are some things about the operation which I do not understand. The specification document V1.02 gives information on the Long Reach Enable Register 0h17. It says there is a default value of 0h07 and that it is write only. That default value sets bit 0, which is stated to be controlling LongReach mode. Therefore the default value sets LR mode on, if the documentation is correct.

As far as I can work out, running LORA_LR_Mode writes the whole byte both in the Arduino and Python code. There is no way to find out what the byte is set to as it is write only. Attempts to read it in the Python code give me 255.

Does this make any sense to you?

John

JohnF
Posts: 9
Joined: Thu May 15, 2025 11:20 am

Re: LongReach (LoRa) mLink Module (HCMODU0250)

Post by JohnF » Mon May 19, 2025 6:04 pm

Andrew

I now have communication to a second Arduino. I notice that there is some interaction with the Arduino Serial output as the red light on the LoRa module is on most of the time.

John

JohnF
Posts: 9
Joined: Thu May 15, 2025 11:20 am

Re: LongReach (LoRa) mLink Module (HCMODU0250)

Post by JohnF » Mon May 19, 2025 6:07 pm

Andrew

Thank you.

I have just noticed your updates. The above messages from me were before getting the updates. I have now implemented the updates. The Python update is very easy. The examples are working as before.

One further thing, I think that the LongReach transmit example should have the line

while(mLink.LORA_Tx_Busy(I2C_ADD));

after each transmit. Without it I don't always get the transmission,

John

andrew
Site Admin
Posts: 1481
Joined: Sun Aug 05, 2012 4:15 pm

Re: LongReach (LoRa) mLink Module (HCMODU0250)

Post by andrew » Tue May 20, 2025 8:33 am

One further thing, I think that the LongReach transmit example should have the line

while(mLink.LORA_Tx_Busy(I2C_ADD));

after each transmit. Without it I don't always get the transmission,
Good point. Technically because the examples invoke a delay after transmitting it doesn't need that line but I guess if someone was to remove the delays it would cause problems. I've now updated the example to include it.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “mLink”