B4R Question Softwareserial not working on Wemos D1 Mini ESP2866

atiaust

Active Member
Licensed User
Longtime User
Hi All,

I posted earlier about problems with SoftwareSerial on a Wemos D1 mini board not communicating intermittently or not at all.

From research it appears that it is a known problem and is something to do with interrupt conflict with the wifi channel.

There is an alternative library (attached). Can this be used in place of the rSoftwareSerial library?

Has anyone else experienced the same problem?

Thanks
 

Attachments

  • EspSoftwareSerial-5.3.0.zip
    24 KB · Views: 631

thetahsk

Active Member
Licensed User
Longtime User
Upvote 0

atiaust

Active Member
Licensed User
Longtime User
Thanks

I have many of these working successfully for simple operations like this.

Will look at your suggestions.
 
Upvote 0

atiaust

Active Member
Licensed User
Longtime User
Hi emexes,

The baud is fixed at 9600.

I have put an oscilloscope in the input pins and the data is present but the Wemos will not acknowledge it.
I have been trying different pins to see if that makes any difference but nothing concrete yet.
 
Upvote 0

emexes

Expert
Licensed User
The baud is fixed at 9600.
Well, was worth a try!

The fact that you are receiving nothing, vs receiving corrupted bytes, makes me think that the software serial uses a pin-change interrupt or possibly a periodic timer, and that this is being disabled or blocked for longish periods by wifi interrupts.

I am thinking hard of a workaround, but so far nothing. My next step would be to dump the interrupt config registers before and after starting the wifi and serial interfaces, see if that is indeed the problem. And see if the serial interface works ok for > first packet if wifi is commented out.
 
Upvote 0

atiaust

Active Member
Licensed User
Longtime User
I was going to try disabling / removing the wifi component and just monitor the SoftwareSerial and see if works.

I am also feeding the same data into a RS232 /USB adapter and monitoring it with Termite on my PC and it is all OK.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…