Left here for archival purposes.

User avatar
By Pretcorr
#45420 I found a bug that makes the serial data in the UART not transmit

Im using these files

NodeMCU custom build by frightanic.com
branch: master
commit: c8037568571edb5c568c2f8231e4f8ce0683b883
SSL: false
modules: file,gpio,net,node,ow,tmr,uart,wifi
build built on: 2016-04-13 11:14
powered by Lua 5.1.4 on SDK 1.4.0

The code I use is

uart.on("data", 0, function(data)
conn:send(data)
end, 0)

According to the spec the bytes in buffer should be transmitted ie if there is 10 its sent but it does not do that. If I change the value to the value of bytes I expect then it fine. Cannot make it 100 because variable data beiing send and received.

Thanx!
User avatar
By xtal
#45426 uart.on("data", "\n",uartRX,0) This is what I'm using...
It waits for a callback when "\n" [carriage return] is received....
I think you are waiting for a callback,,,,,,
The only issue I have is the 256 RX buffer size you cannot change...... :cry: