These are chat archives for SmingHub/Sming

10th
Jan 2018
frankdownunder
@frankdownunder
Jan 10 2018 07:49
I need to send emails using SMTP, so I started with a working example using arduino IDE and a Wemos D1 mini.
All good. I even looked at the packets with wireshark (that was difficult!). The code uses client.println to send EHLO followed by auth login, etc, email gets sent, all good.
I translated that to sming code, changing the client from WiFiClient to TcpClient and println to sendString.
Unfortunately it doesnt work, in the wireshark log I can see EHLO and its response, but that is promptly followed by "lost input connection". One point of difference - I dont wait for a response like the arduino code does as I don''t know how. I just wait for 200ms instead. Am I on the right track? Can anyone suggest what I might be doing wrong? Happy to post the code or a link to it if that would help.
frankdownunder
@frankdownunder
Jan 10 2018 20:23
@petrynchyn Hi, Sorry I didnt notice your request for my script. Two tricky things: the windows file system under WLS is mounted under mnt, plus, you need to avoid CR LF at the end of each line - must use LF only, so use an editor like notepad++, here it is:
C:\Users\me\esp8266projects\demo>type m.sh
#!/bin/bash
echo File m.sh - edit with notepadd++ with LF at end of each line only
export ESP_HOME="/mnt/c/opt/esp-open-sdk"
export SMING_HOME="/mnt/c/opt/Sming/Sming"
PATH=$PATH:$ESP_HOME/esptool2
echo "ESP_HOME: $ESP_HOME"
echo "SMING_HOME: $SMING_HOME"
make