Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A string in lua script makes upload to fail #56

Open
fedulovivan opened this issue Dec 9, 2019 · 1 comment
Open

A string in lua script makes upload to fail #56

fedulovivan opened this issue Dec 9, 2019 · 1 comment

Comments

@fedulovivan
Copy link

Noticed a weird uploader behaviour..
second line in following lua script (even when commented) breaks the upload process:

DHT_PIN = 7
-- if current_buffer_length > 2 and is_valid_sequence == false then
LED_PIN=4
->file.writeline([==[DHT_PIN = 7]==]) -> ok
->file.writeline([==[-- if current_buffer_length > 2 and is_valid_sequence == false then]==])
->file.writeline([==[LED_PIN=4]==])

ERROR
 send string    : 'file.writeline([==[LED_PIN=4]==])'
 expected echo  : 'file.writeline([==[LED_PIN=4]==])'
 but got answer : 'sequence == false then]==])'

Traceback (most recent call last):
  File "./luatool.py", line 322, in <module>
    transport.writer(line.strip())
  File "./luatool.py", line 63, in writer
    self.writeln("file.writeline([==[" + data + "]==])\r")
  File "./luatool.py", line 122, in writeln
    self.performcheck(data)
  File "./luatool.py", line 89, in performcheck
    raise Exception('Error sending data to MCU\r\n\r\n')
Exception: Error sending data to MCU

run command (first part is for syntax validation):

luac -p ~/mqtt.lua && ./luatool.py --port /dev/cu.wchusbserial1420 --src ~/mqtt.lua --dest  mqtt.lua --baud 1200 --verbose
@fedulovivan
Copy link
Author

For anyone, who may face with similar issues: Give a try NodeMCU-Tool project. Its works with nodemcu 3.0, uploads scripts mush faster and overall works more stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant