Serial issues?

Moderators: rtenklooster, Voyager, BertB, Stuntteam

Post Reply
Message
Author
jgalak
Normal user
Posts: 4
Joined: 11 Feb 2019, 18:28

Serial issues?

#1 Post by jgalak » 19 Mar 2019, 03:35

I'm honestly not sure if this is a problem or expected behavoir, but as it's something I noticed, I figured I'd ask.

I have an RFLink kit from Nodo shop built, along with the wifi adapter and a NodeMCU. When I remove the wifi board and connect a terminal program via USB to the mega, everything works fine. I get messages when I trigger a sensor, and I can issue commands such as 10;PING; or 10;VERSION;

Things change when I connect the wifi board. I have the NodeMCU flashed with the esp-link firmware (https://github.com/jeelabs/esp-link) and it appears to work for receive - with it running, connecting to the esp-link web interface I can see the data from the RFLink. However, with the board connect, it seems that I cannot *send* commands like 10;PING; to the RFLink, either through the web console or through the still-attached USB cable. Both see the data RFLink sends, but neither seems able to send commands.

Anyone have any ideas on what's going on here? Is this an indication of a problem or expected behavior?

Thanks.

FearNaBoinne
Normal user
Posts: 6
Joined: 15 Jun 2019, 00:31

Re: Serial issues?

#2 Post by FearNaBoinne » 21 Jun 2019, 12:49

I had the same issue and found out that only ONE serial port can be active at any time if you want to send signals. You can have both active if you want to monitor only, but if you want to control stuff, you have to choose between using the USB Serial or the Ser2Net connection on the WiFi.

(As far as I can tell, and based on the fact that pins 0 and 1 of the MEGA connect serial port 0 through to the USB device port, the USB Serial port and Tx0/Rx0 seem to be galvanically connected, and thus the signals sent on one, are drawn to ground by the other and v.v., so it'd only work if both sent the exact same sequence at the exact same time!)

Jakecat
Normal user
Posts: 4
Joined: 20 Dec 2018, 23:00

Re: Serial issues?

#3 Post by Jakecat » 06 Jan 2020, 14:29

I am experiencing the same issue with my ESP01 to RFLINK connection. RX is OK. TX commands (i.e 10;PING;) can be seen in ESP01 log but do not seem to get transmitted to the Arduino / RFLINK board.

The RFLINK board will TX happily when connected via USB however.

Has anyone come across a solution to this?

User avatar
Stuntteam
Site Beheer
Posts: 683
Joined: 27 Jan 2016, 16:46

Re: Serial issues?

#4 Post by Stuntteam » 06 Jan 2020, 14:39

Does the ESP add CR/LF (carriage return/line feed) to the commands that go to RFlink?
-=# RFLink Gateway Development Team #=-
Introduction: http://www.nemcon.nl/blog2/
Generic Support forum: http://www.esp8266.nu/forum/viewforum.php?f=8

Jakecat
Normal user
Posts: 4
Joined: 20 Dec 2018, 23:00

Re: Serial issues?

#5 Post by Jakecat » 07 Jan 2020, 18:59

It doesn't appear to. I may have to capture the raw output from the ESP.

I may also try putting the TX in via the USB port by cutting up a USB cable.
Attachments
Capture.PNG
Capture.PNG (33.94 KiB) Viewed 7570 times

RobertBurton45
Normal user
Posts: 5
Joined: 28 Feb 2020, 02:46

Re: Serial issues?

#6 Post by RobertBurton45 » 28 Feb 2020, 21:38

Jakecat wrote: 07 Jan 2020, 18:59 It doesn't appear to. I may have to capture the raw output from the ESP.

I may also try putting the TX in via the USB port by cutting up a USB cable.
I have the same issue...

Jakecat
Normal user
Posts: 4
Joined: 20 Dec 2018, 23:00

Re: Serial issues?

#7 Post by Jakecat » 15 Dec 2020, 21:13

Just thought I'd provide an update on this. I now have it receiving and transmitting really reliably using MQTT instead of ser2net. I migrated away from ESPEasy to an alternative o/s but it should still work if set up correctly.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests