Left here for archival purposes.

User avatar
By xtal
#40831 nodemcu sdk 151
How about adding a method to change UART buffer sizes..
uart.set_buffer( id, bufsize ) eLUA supports change
I need large Rx and small Tx.
I did not have a problem until I started using several REQUIRE's
which now causes serial Rx data loss < 256 is ok > 256 flaky
was using 38400 baud , have dropped back to 9600 which helps, but does not fix.
Code: Select allfunction c_server() 
    do_next = nocode                   -- timewaste
    uart.on("data", "\n",uartRX,0)
    sv=net.createServer(net.TCP, 30)   
    sv:listen(80,function(c)                   
       c:on("sent", Send80) 
       c:on("receive", Rcv80)                 
       end)       
end
User avatar
By xtal
#40910 LUA/nodeMCU sdk151
changed from uart.on("data", "\n",uartRX,0)
to uart.on("data", 1,uartRX,0) which makes the problem show better..
buffer is filling , then big stall dropping char, then filling more....

Is it possible to change the Rx, buffer size ???