I dont see any error. When i enter AT command mode, there is nothing in the Output window or i dont get a response as OK as explained in the wiki manual. Have already updated the latest firmware given by waveshare thru RS485 terminals.
Have tried using different baud rates - 9600 and 115200
Approach1: using Tera terminal software - setting serial port parameters (tried with 115200 and 9600 baud rates as the manual is confusing mentioning 2 baud rates for RS232 interface). In the black screen, terminal settings are done CR+LF and local echo checked. Still we are unable to enter AT Command mode - when we type AT no response, for +++ no response. I doubt whether this tera terminal is acutally connected to the LoRa device - i think establishing connection maybe a issue - dont know. Com3 port settings are matching Tera port settings.
Approach2: Using SScom software provided by waveshare - tried with both baud rates 115200 and 9600 - when we enter AT command settings - some data appears on the left side window date and time each time we press any option. But how to enter AT command and set the device configuration. Have followed the manual but no use till now.
Picture2.pdf (132.8 KB)
see the response received from waveshare support. Can you guide me accordingly.
There is no problem with the test here, please follow my test steps.
1)Consider that it may be a modbus poll/slave problem. Use sscom aging test for a period of time and there will be no problem;
Please replace sscom comparison test
- Sometimes the machine will enter an abnormal state due to long-term and high-frequency data sending and receiving. At this time, you need to restart the module to repair it.
from memory you need to send the AT command with the CRLF in one go, not character at a time like typing.
i.e. you need a com terminal that allows you to format a complete line and send it all at once.
I would need to re-run some tests to double check.
Edit/Update:
I run some quick tests on my unit.
Some key points to remember.
While the default firmware update mode may be RS485 the actual unit run mode may be different. As such you may find the unit is auto set to RS232 or RS422.
so some things to check.
-
When you power on the device after a few seconds, both the tx and rx leds should blink. Dont try anything unil they blink.
-
Leaving the baud rate at one level (my default was 9600) try sending the +++\r\n in one go (thermal programs that send character by character wont work to go into at mode.
You should get the OK back.
Note: On my units, when in AT mode no leds blink. When in working mode, the TX led should blink to indicate it has sent data on the Radio.
- If you dont get the OK, press the KEY button once, this will cycle the input port to the next one
Note: You can also try the above test but send some test data… e.g. hello world\r\n since its not in AT mode, the TX led should blink if it gets the packet OK
Fine. Let me try again - i should use SSCOM or Tera Terminal software? in the screen i need to type right - or i can copy paste +++\r\n in one go from notepad. Also i have a doubt with the serial cable - when i saw the successful test result of waveshare - USB Enhanced Serial was displayed and the failed test had USB Serial - is there a difference between the 2 - also i am using BAFO DB9 to USB converter with Waveshare DB9-DB9 cable for the serial configuration wherein i get USB Serial in comports - do you think replacing BAFO with MOXA UPort1110 DB9 to USB will give better results and ensure proper communication with the LoRa device for configuration - or do you suggest to take some com terminal to enter the +++\r\n in one go.
Not sure on your cables and converters, but its just a 3 wire serial (for RS232) ground is ground so tx/rx if not working can be crossed over and try again.
When I say the command must be sent in one go, it dont just mean on the one line, but actually sent in one go. So its up to the software how it works.
e.g. If you where to sniff the serial traffic, most terminal programs will send one byte at a time.
TX: +
TX: +
TX: +
TX: \r
TX: \n
But when sent in one go, it should be
TX: +++\r\n
The key difference here is the amount of time between bytes, if to slow, the device wont see it as a command and pass on to the radio to TX.
Note: you would only type in \r\n IF you know your software will translate that to bytes. is you would not want backslash r you want the byte with the hex value of 0x0D
I know this concept I am talking about can be a bit confusing if you have not dealt with it before. Most of the time a serial device is a serial device and does not care too much about character timing, but some do to go into special modes.
It would be much easier to explain if you had a serial sniffer and could see the difference.
today, got response from Waveshare Support. It seems we need to use a micro-controller - Arduino Uno/ Raspberry Pi which can be connected SX1262-LoRa-DTU thru Serial Port - RX/TX terminals and AT command settings can be done. Maybe direct programming from Computer with a Serial Cable to LoRa will not work. I maybe wrong but i will give it a try.
Im not sure I agree with it needing to be a micro. But I understand where they are coming from.
A micro will send all that data in “line mode”. i.e. minimal time between characters, thus what I was saying.
That said, I can do it all via a windows PC, but I tend to use my own software to do so.
No issues with using a micro if you want to go that way, but remember micros have UARTS, so an RS232 line drive will be needed to convert the UART to RS232 signal levels.
Is it possible for you to guide us on entering AT Command mode by taking remote access. Our engineer can be at site with laptop connected to LoRa Device without microcontroller. If you can help us with 1 device(only entering AT Command mode) we can do the rest.
I cant seem to find a way to DM you here.
Is there a way I can contact you directly?
I have a rough tool for windows that I have some options to try to ID the com port baud rate. It then can enter at mode and read the current values and allow you to set them.
If it cant find the comm port (e.g. it has some weird config) then a factory reset should put back to a known state.
Happy to have a zoom if you like.
Thanks Michael. We are on Microsoft Teams - info@rooftopurja.in or can also have a zoom call if it suits you. for remote access - we are using Ultraviewer. You want to have call 1st then come to remote access - suggest accordingly - i have to ask our rep to be at the project site with laptop and set of cables.
info@rooftopurja.in email got rejected by your server. Lets have a short call on Zoom 1st and then I can ask my rep to at the site. I am available – just email based on your convenience – we can schedule it. The project site is a Government premises and access to it is available during daytime (8.30AM to 7PM – Indian Standard Time).
Just had a quick play with the SSCOM tool as you had.
Since Im 100% sure on my current settings
(Com9 - 9600 Baud 8N1)
I set that, turned on the show time and packet (as per your screen), ensured “Add CRLF” was checked.
Then I used the +++ “Enter AT Settings” Button on the supplied list.
As can be seen when I sent the +++ I did get some weird characters back (like your screen). But when I tried a 2nd time the LEDs on the device did not blink, which is a good hint it could be in AT mode; so I sent the at+ver command from the supplied buttons and got the Ver1.3 response.
So at this point I knew I was in AT mode ready to send other AT commands.
Side Note: I did do a “factory” reset on one of my units (as I sent a bad config when playing), post the factory reset the comport was 9600 Baud.
Factory reset was as per the wiki
- Power Cycle the unit to get a good clean start.
- Press and HOLD the key button until the led goes out
(It will come on and go off) - Within 1 second, prese and release the key button again.
At this point the unit should reboot back to working factory settings.
See image for reference.
That’s Great. But are you sure it is in AT Command mode where we can set the slave id network id etc. Also i found Tera Terminal to be much simpler interface than SSCOM - Is it possible for you try with Tera Terminal too for entering AT Command mode.
Anyways we will give it a try tomorrow with SSCOM.
Should be.
Outside of the Com Port settings “8N1” which its vague what is supported… the following screen show shows all the options that can be set.
they can be set one at a time or “all” via the AT+ALLP
Say you have 5 units on a bus all with the same settings. You can setup the first one with each command.
Then get all the “values” via
AT+ALLP
then use that value to set the other units via
AT+ALLP=… what ever it is.
You can check the actual values from their webpage
You will see most are an index to the actual value (but not all)
e.g. Code Rate : 1 = 4/5, 2 = 4/6, etc… so if you want a code rate of 4/6 you would set the config to 2 via its AT command
e,g,
AT+CR=2\r\n
Don’t for get to do an AT+EXIT to ensure what you setup is saved. I would also recommend a unit reboot/power cycle and check it works and survives a power loss.
I am getting too much interference for this product to work, is there a setting I can change to increase error correction?
→ I want to make a HMI wireless while talking to a PLC over rs485. I have tried 9600/8/n/1 and 4800/8/n/1/ baud rates. I have tried 18 and 23 channels ( 915 and 433 mhz) and played with the bandwidth a bit. The results are all the same.
My units both report a firmware version of 1.3
Settings:
+ALLP=7,0,1,22,0,0,1,23,23,0,65534,2,4800,“8N1”,0
Note the bandwidth reports as ‘0’ all the other setting save, this one does not seem to.
When I sniff the RS485 comms between the PLC and HMI it looks like:
:010205000010E8
:0102020000FB
:010205000010E8
:0102020000FB
:010205000010E8
If i transmit this data stream to my PC via this unit it looks like:
ê:010205000010E8
:0 ’‚’‚‚‚‚2 5ê:010205000010E8
:01020200 2 5ê:010205000010E8
:0102020000FB
ê:01@‚ª‚‚‚‚Š‚*á
Any ideas on how I can get this to work?
How far apart are the devices ?
Is it line of sight or something in between them.
A bandwidth of 0 is the index for 125Khz, so lower bandwidth is better if there is signal issues.
You could try a higher spread factor, normally higher spreading factors means longer range at lower bit rates.
Also you have encoding rate, so more error correction bits could help.
All that said, looking at your output Im not sure if this is an interference issue as the data you expect is there, just prefixed with something.
One small issue with RS485 is that is half duplex, so if each node is talking to the other, you need to ensure that both don’t try to send at the same time. Using RS422 of RS232 may give better results.
Can you give more detail as to your setup and data flow ?
edit: I was also wondering if there is anything else on the RS485 bus ?
Hi Michael, thanks for the response.
The devices are on the bench next to each other, the antennas are stretched out so there is about 2m between them with direct line of sight
I just tried changing the spread and encode rate with no improvement.
In the intended use case there is only one PLC and one HMI on the bus and they are designed to be used together with half duplex rs485. The HMI is the master and sends out the first string and waits for a response. The second string is the PLC responding to the query which then repeats.
That having been said I am currently in debug mode and the PLC and HMI are talking through a direct wire connection and I am tapped into this connection and transmitting it over the sx1262 to my PC which is not transmitting, only listening.
I just noticed when I unplug the PLC the data stream clears up a lot, this is the HMI sending its query, timing out and sending it again:
ê:010208000010E5
ê:010208000010E5
ê:010208000010E5
The ‘ê’ should not be there, but there are no other artifacts. When the PLC is plugged in it is going max speed for the Baud rate( currently 4800). An endless loop of HMI query and PLC response.
As soon as the PLC is connected the data stream looks like the above post with extra junk data.