Unable to receive data/configure SX1262 DTU

Hi,

I am trying to configure and use two of these DTUs for long range comms. I have been able to get them to communicate with one another, as indicated by one’s TX light flashing and the other’s RX light flashing, by inputting RS232 serial data to the ‘transmitter’ with an arduino.

However, that is as far as I am able to go. The ‘receiver unit’ unit does not output anything over RS232 as far as I can tell. I have tried reading the received data with an arduino and a USB-serial adapter like this with no luck. I have been sure to put them both in RS232 mode as they default to RS485 apparently.

Also I am unable to get the units into AT settings mode with the waveshare tool or putty, etc. They just want to transmit ANYTHING input to the 232 port. Can anyone please help?

Thanks,
Taylor

1 Like

I just check with a 'scope and there is nothing coming out of the TX pin of the RS232 port

1 Like

Hi @Taylor94043 welcome to the forums :slight_smile:

Can you please provide a photo oh the full setup and detailed shots of how each unit is wired up?
I know it seems trivial, but this can often expose really important details for us to best help.

I’m surprised you’re getting activity at all - i would not have expected a TTL UART adapter to work in the RS232 port, but there you go :person_shrugging: it’s sending some data apparently.

I would have expected you’d need something like this in the mix to actually convert the TTL signals to RS232 spec.

Could it be that the TTL adapter is passing just enough of a signal to be interpretable as something that is getting transmitted - even though it will be nonsense data?


You might need to add some RS232 converter into the mix like

Hi Michael,

The setup for the ‘transmitter unit’ is: Arduino Uno (Com13) TX & GND to DTU RS232 RX and GND
The setup for the ‘receiver unit’ is: USB-Serial cable (Com15) TX, RX and GND to DTU RS232 RX, TX and GND




You can see from the pictures (maybe) that messages are being transmitted from one unit to the other (TX and RX lights on), but nothing is being output by the receiver. I have used this USB-Serial cable with other RS232 (non TTL UART) devices so I have confidence in it. My mind does go to the possibility that the input is garbled so the output is null. But not being able to access the AT command menu is weird also (with the SSCOM tool or putty and the aforementioned cable).

Taylor

hey that’s pretty cool! I haven’t seen that hack before.

You may have had luck in the past, but this device may not have as robust and/or flexible RS232 frontend… Applying due diligence, we can’t really rule that out as the root cause until it’s tested to work under the specified conditions.

This whitepaper on RS232 from TI shows the RS232 spec:

Could it be that the devices you’ve used the TTL uart adapter for in the past actually had a TTL interface that just so happened to be connected to a DB9 connector?

I’m doubtful, as it worked previously to communicate with a device where an arduino didn’t. Furthermore, as I mentioned in my second post/first reply, there is no data coming out of the receiver unit’s TX pin according to my oscilloscope (stable -5V), lending credence to your theory that the output is null because the input is garbled rather than the cable being the issue.

I guess I will source a TTL-Serial adapter and put it between the arduino and the transmitter unit and try again.

1 Like

Ok I’ve since done this and also bought a new cable to go between the RX unit and my PC. Despite this, these changes have not fixed my issue. I still see flashing lights on the LoRa units when they are in RS232 mode (i.e they are sending and receiving), but receive nothing at my computer!!

Arduino serial output → RS232 adapter → TX LoRa unit → … → RX LoRa unit → UART-USB cable → PC (putty)

And I still can’t get into/communicate with the units in AT mode with any UART cable! I think these units are just pure ewaste tbh!!

Hi Taylor
Early days of RS232 the signal was +/- 12V with respect to ground. With gradual changes to data hardware some changes to the ability to handle RS232 changed with it. I think these days a signal of 0V and +5V can be used. I think that +3.3V might be marginal but it is a long time since I had anything to do with this so I don’t really know. During all this change there was a time when some equipment would work while some would not. Frustrating.

RS232 was only useful over a couple of metres of cable. It can be used over longer lengths (I have used it over 70M) with low capacitance cable and different wiring techniques.

RS232 is a 3 wire unbalanced (the reason for short operating distances) system with one wire TX and one wire RX with a common (usually Ground). The same pins are used on the DE9 connectors at both ends so the cable MUST CROSS CONNECT these pins. If you use a pin to pin cable connection IT WILL NOT WORK.

Note that I have used D"E"9, NOT D"B"9 as "DB9 is incorrect. This is a bit of a diversion but it does no harm to have it right. The “D” is he connector type, the “E” is the shell size and the 9 the number of pins. In this shell size there are 2 possibilities, 9 pin and 15pin (Commonly known as VGA). Now there is another D connector with 15 pins. You can’t call both of them “DB15” so the other shell size is “DA15”. The only time “DB” is correct is the 25 pin shell which also has a high density version, I can’t recall how many pins now.
Cheers Bob

Im kinda tempted to order 2 for a play :slight_smile:

RS232 is always a little fun as not everything seems to be wired as you expect. e.g. Male/Female and cross over at the DB9 v in a cable. As such, the first thing I like to do is confirm which pin is ground, then from there we should know the TX/RX pins (just may be swapped)

As stated above they seem to be RS232 so a line driver should be used, if not, you may get a 0-3.3v working but not via a direct UART driver, as UART and RS232 signals are inverted, so at a min. if directly off the UART pins you would need to invert the signal on TX/RX to get the correct data; Parity normally fails without it.

that said, from the wiki, you need to put them into RS232 mode, so I guess, double check that they are in RS232 mode.

They definitely are. If not, the TXD LED on the TX unit, and the RXD LED on the RX unit do not flash.

So my advice would be, don’t - these units are garbage! If the documentation and software tools were better maybe, but as-is they are very user un-friendly.

TTL UART is 0 to 5V, Serial RS-232 is -15 to 15V and thus are not interoperable. Hence the use of serial converters in my setup between an Arduino and between a PC.

Not to move off topic for you issue: When I say order, for me its about seeing how hard it would be to get them to work and the gotchas (much easier when you have them in front of you so can hook up and do what ever test you want). then if there are any real issues/challenges, they case and form factor always has re-use value :slight_smile:
So, its not about getting for a project as such and more about learning and seeing if I can then talk to them via a different lora device; ie. see how custom they made their protocol and see what we can find.

Hi Taylor

I think you might find that RS232 these days might be OK with 0V and 5V

Just had a look at your pics. Might help if that green wire on the second pic (connector pin 5, common or Gnd) went to the UNO ground instead of a data pin. Definitely would not work the way you have it.
Cheers Bob
EDIT:
SORRY, It probably is ground. Just does not look like it at first glance. Please accept my apologies if this is the case. The camera angle plays tricks sometimes.

At that time the green wire was going to ground, the ground next to DIO13. But this is no longer the test setup I am using, which is is now Arduino serial output → RS232 adapter → TX LoRa unit → … → RX LoRa unit → UART-USB cable → PC (putty) and not shown in any pictures because its just a mess.

Hi Taylor
Just had a look at that interface and a Wikipedia article on the subject to brush up on things like DTE and DCE
As I see it the interface will repeat. So you connect the UNO TTL TX to interface RX and vice versa. Then the interface outputs what it sees at its RX point as a TX signal on pin 3 of the DE9. This makes the whole thing, UNO and Interface, look like a DTE device.

Then things get confusing. The LoRa thing should look like a DCE (Data Carrier (or Comms) Equipment) device which requires a pin to pin connection (that is NOT crossed). Like I said it has been a long time and I could be completely wrong but I don’t think so.
basically DTE to DTE (Computer to computer) requires a crossed connection. DTE to DCE (computer to modem) requires a straight connection. In this case the LoRa unit could be likened to a Modem, a carrier device.

To highlight the confusion this is a quote from the Wikipedia article on the subject.
“Since the standard definitions are not always correctly applied, it is often necessary to consult documentation, test connections with a breakout box, or use trial and error to find a cable that works when interconnecting two devices. Connecting a fully standard-compliant DCE device and DTE device would use a cable that connects identical pin numbers in each connector (a so-called “straight cable”). “Gender changers” are available to solve gender mismatches between cables and connectors. Connecting devices with different types of connectors requires a cable that connects the corresponding pins according to the table below. Cables with 9 pins on one end and 25 on the other are common. Manufacturers of equipment with 8P8C connectors usually provide a cable with either a DB-25 or DE-9 connector (or sometimes interchangeable connectors so they can work with multiple devices). Poor-quality cables can cause false signals by crosstalk between data and control lines (such as Ring Indicator).”

And this is the table referred to

Cheers Bob

The only issue that I could see affecting comms between the ‘Uno’ (now a Due) and the LoRa TX unit is if the UART-RS232 adapter is not working properly. The TX unit’s TXD LED illuminates when it receives a message from the Due, so it is definitely registering serial input. The issue I am facing is that, while the LoRa RX unit’s RXD LED flashes in unison with the TX unit (and the messages coming out of the Due - indicating something is being transmitted and then also received), there is nothing coming out of the RS232 port on the RX LoRa unit. NFI why. Nothing seen at the TX pin of the RX unit’s RS232 port with a DSO.

Hi Taylor
You have got an adaptor at both ends haven’t you. If the adaptor at the TX end is not working how is the led on the TX LoRa unit flashing and you say the led on the RX LoRa unit is flashing so I would assume the TX end adaptor is OK. Using the scope have you tried to track the signal through the system to see where it disappears. Looks like something fundamentally wrong. Any chance of a connection diagram with signal present or not indications.
Cheers Bob

The only possibility I see is that the RX unit is defective or the data input to the TX is not appropriately formatted and so what gets sent isn’t decipherable at the other end. I really shouldn’t have to open these up. It should be plug in a signal and get that signal at the other end. Core Electronics clearly haven’t tested these units nor do they have any knowledge about their use. I contacted the OEM, Waveshare, and they supplied me a different tool to program these devices and it also doesn’t work! I’ve been trying to get these working on and off again for months now so think I need to just give up on these units and source an alternative -_-

Before you go condemning any one part of this set up you have not done much to isolate your problem.
Have you tried connecting with just the RS232 signals without the LoRa units. That would be my first port of call. I think you would need a cross over cable for this exercise.
Cheers Bob

Hi Taylor
Just had a closer look. It would appear that your data goes into the LoRa unit on the TX pin (3) and out the other end on the RX pin (2). You say you see nothing on the TX pin at the receiver end. You won’t, I think you should be looking at the RX pin (2).
Cheers Bob