ronoth / LoStik

LoRaWAN compatible USB test device
MIT License
132 stars 39 forks source link

How to use the miniterm? #20

Closed llorllale closed 4 years ago

llorllale commented 5 years ago

I'm having trouble using miniterm to send commands to the LoStik. I'm on Ubuntu 16.04 and using xterm-256color.

miniterm seems to run fine - I just can't make it execute any of the commands I input. I expect that when I press the Enter key, the command would be sent to the LoStik and I would receive a response. Am I doing something wrong?

Here's an example of what I mean. Notice the cursor about 4 lines below the command - that's me pressing the Enter key several times:

image

llorllale commented 5 years ago

FYI blinky.py runs fine

lolsborn commented 5 years ago

Sorry for the late reply. The command you are sending is correct. Can you try sending sys get ver? The command you are sending should still reply with "OK", but get ver at least returns something more substantial.

I have had one other support request recently where a guy was running things just fine, but having issues with mini-term and then plugged it into a different USB port or something and then it worked fine and continued working when plugged in the old port. I don't know if it will fix your issue here as I haven't quite figured out what causes it and it seems kind of random. My best guess is a driver issue in the CH340 code.

lolsborn commented 4 years ago

Would love to know if you were able to work this out. For now I'm going to close this ticket, but please re-open if you have additional info. If you suspect it is faulty hardware send an email to steven@ronoth.com

LalaDK commented 4 years ago

I had similar problems with miniterm.py. I use Terminator as my default terminal emulator, but that didn't work. Then I tried xterm and then everything worked! Hope that helps !

lolsborn commented 4 years ago

Terminator works well, but you have to send \r\n line endings

On Tue, Feb 4, 2020, at 4:45 AM, Mads Dam Eckardt Jensen wrote:

I had similar problems with miniterm.py. I use Terminator as my default terminal emulator, but that didn't work. Then I tried xterm and then everything worked! Hope that helps !

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ronoth/LoStik/issues/20?email_source=notifications&email_token=AAAOZBA45MQWWZOVVZYZYU3RBFPNNA5CNFSM4H6UL5BKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKXP3SI#issuecomment-581893577, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOZBEFDYPWRCH4WFG4I3LRBFPNNANCNFSM4H6UL5BA.

gudsi commented 4 years ago

Hi! I have the same issue as well. I am trying to use miniterm via cygwin to send commands to lostik which is plugged to my raspberry. Connect Script works fine, but manual commands to not work. Can you help me?

lolsborn commented 4 years ago

What are you using to connect manually?

On Fri, Apr 17, 2020, at 7:05 AM, gudsi wrote:

Hi! I have the same issue as well. I am trying to use miniterm via cygwin to send commands to lostik which is plugged to my raspberry. Connect Script works fine, but manual commands to not work. Can you help me?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ronoth/LoStik/issues/20#issuecomment-615263196, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOZBAON63YS4YMERHRWULRNBOZNANCNFSM4H6UL5BA.

gudsi commented 4 years ago

image

Pressing enter, but nothing happens

lolsborn commented 4 years ago

This looks like it's potentially a hardware failure mode that I've seen in the past. Could you email steven@ronoth.com and we can see what to do about it and if we're going to need to mail out a replacement.

On Sat, Apr 18, 2020, at 1:16 AM, gudsi wrote:

image https://user-images.githubusercontent.com/34402250/79632138-aba6d300-815d-11ea-9b91-9b1e2c215ef3.png

Pressing enter, but nothing happens

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ronoth/LoStik/issues/20#issuecomment-615738267, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOZBC5QUKU5LDSRGNETTTRNFOXLANCNFSM4H6UL5BA.

gudsi commented 4 years ago

Thanks for your quick answer. The funny thing, I did a reboot and now it works. But my stick is only sending with SF12. Could this issue be related to that hardware topic?

lolsborn commented 4 years ago

Generally, if the device turns on and replies to commands it is fine. I've seen 2-3 other devices (maybe 1 per 2,000) which enumerate over USB, but never print anything on the console. It's more common that people are using Putty or some terminal that only sends \n and not \r\n so I have to rule that out, but since you're using the mini-term included I was leaning toward that. So if you are sending commands and getting replies it's probably not a hardware problem but a configuration issue.

You say it's only sending on SF12? So when you try to change the spread factor it's not working? Are you running the radio send/receive examples or trying to connect over LoRaWAN?

On Sat, Apr 18, 2020, at 9:39 PM, gudsi wrote:

Thanks for your quick answer. The funny thing, I did a reboot and now it works. But my stick is only sending with SF12. Could this issue be related to that hardware topic?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ronoth/LoStik/issues/20#issuecomment-616029302, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOZBBXL6CSS7UIWWMYRELRNJ6BTANCNFSM4H6UL5BA.

gudsi commented 4 years ago

Yes. Sending commands and getting replies is working fine now.

I am able to adapt the SF via miniterm. If I send data afterwards, I see them arriving, but with SF 12.

Here is a screenshot of the commands I am sending. image

I am not working with the sender and receiver examples. I am conntected to a LoRa network

lolsborn commented 4 years ago

Huh, that is pretty curious. What kind of gateway are you using?

On Sat, Apr 18, 2020, at 11:55 PM, gudsi wrote:

Yes. Sending commands and getting replies is working fine now.

I am able to adapt the SF via miniterm. If I send data afterwards, I see them arriving, but with SF 12.

Here is a screenshot of the commands I am sending. image https://user-images.githubusercontent.com/34402250/79681530-4c0efd00-821b-11ea-9f18-6bccbc123377.png

I am not working with the sender and receiver examples. I am conntected to a LoRa network

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ronoth/LoStik/issues/20#issuecomment-616059490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOZBB3Z4MPQNYXYFUJZ3DRNKN7FANCNFSM4H6UL5BA.

gudsi commented 4 years ago

CISCO IXM-800 is in use.

gudsi commented 4 years ago

Does the Stick maybe adapt the SF if the connection is bad?

lolsborn commented 4 years ago

I haven't had time to look into this really closely. I'm pretty sure the module will change to SF12 during OTAA negotiation. It's possible that it is stomping on whatever setting you added manually during OTAA, but based on your comments earlier it's staying in SF12 even when you change it after you are connected?

On Mon, Apr 20, 2020, at 4:19 AM, gudsi wrote:

Does the Stick maybe adapt the SF if the connection is bad?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ronoth/LoStik/issues/20#issuecomment-616485777, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOZBFZFBTHJCAMQ7IGADLRNQVT7ANCNFSM4H6UL5BA.

gudsi commented 4 years ago

Yes. I changed it, after I was connected. So first, OTAA, next sending payloads. As mentioned, they are only sent with SF12. No matter which SF is configured via Miniterm. I hope, you can help me. I am really stuck

lolsborn commented 4 years ago

Sorry for the delay. Unfortunately, I don't have an answer for you yet. I'm posting on the Microchip forums and might do the same on the TTN forums and see if anyone has run into a similar issue with the RN2903 / RN2843. I'll keep you updated.

On Tue, Apr 21, 2020, at 10:58 AM, gudsi wrote:

Yes. I changed it, after I was connected. So first, OTAA, next sending payloads. As mentioned, they are only sent with SF12. No matter which SF is configured via Miniterm. I hope, you can help me. I am really stuck

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ronoth/LoStik/issues/20#issuecomment-617320208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOZBH47IB7W6HDM7TL2B3RNXNDJANCNFSM4H6UL5BA.

gudsi commented 4 years ago

Good news. Finally I am sending with a better SF. I am using ADR and started to send every 20 minutes. SF is getting better and is now at SF9 or 8.

lolsborn commented 4 years ago

This is great news. I'm interested in what you did to fix it. You just turned ADR on?

On Mon, Apr 27, 2020, at 1:39 AM, gudsi wrote:

Good news. Finally I am sending with a better SF. I am using ADR and started to send every 20 minutes. SF is getting better and is now at SF9 or 8.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ronoth/LoStik/issues/20#issuecomment-619824774, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOZBDX6CF5QUUUZR3XIC3ROVADVANCNFSM4H6UL5BA.