B4R Question Softwareserial not working on Wemos D1 Mini ESP2866

atiaust

Active Member
Licensed 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

emexes

Well-Known Member
Licensed User
Can you
something to do with interrupt conflict with the wifi channel
Can you slow down the baud rate from the barcode reader? Or is it that the wifi library is disabling the serial input pin's interrupt-on-change altogether?
 

atiaust

Active Member
Licensed User
Thanks

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

Will look at your suggestions.
 

atiaust

Active Member
Licensed 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.
 

emexes

Well-Known Member
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.
 

atiaust

Active Member
Licensed 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.
 
Top