These are chat archives for SmingHub/Sming

7th
Dec 2015
donnib
@donnib
Dec 07 2015 09:43

Hi guys, i am trying to flash the Blinky example to my ESP8266 and i get an error

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "build/bdist.macosx-10.10-intel/egg/serial/tools/miniterm.py", line 694, in <module>
  File "build/bdist.macosx-10.10-intel/egg/serial/tools/miniterm.py", line 681, in main
  File "build/bdist.macosx-10.10-intel/egg/serial/tools/miniterm.py", line 126, in setup
termios.error: (25, 'Inappropriate ioctl for device')
make: *** [flash] Error 1

here is full log : https://gist.github.com/donnib/8fa4837f2a963f75167d

any ideas what it's caused by ? I tried various baudrates with no success. this is the module i have http://www.aliexpress.com/item/ESP8266-Serial-Port-WIFI-Wireless-Transceiver-Send-Receive-Module-IO-Lead-Out/32254810086.html
alonewolfx2
@alonewolfx2
Dec 07 2015 09:49
it seems miniterm issue. compiling and flashing fine. did you tried change miniterm version?
donnib
@donnib
Dec 07 2015 09:51
@alonewolfx2 what do you mean ? i am building and trying to flash from eclipse
zhivko
@zhivko
Dec 07 2015 10:58
@hreintke I was checking HX711 for analog ADC, and it seems it has small range - only +-40mV. I actually need to measure 0-5V range.
Can you suggest some chip for 5V range?
donnib
@donnib
Dec 07 2015 11:02
@alonewolfx2 ok i "solved" by using CoolTerm to connect
hreintke
@hreintke
Dec 07 2015 11:20
@zhivko : I have no experience at all with external ADC. But I am interested in which others use.
Maybe esp32 ?? :smile:
zhivko
@zhivko
Dec 07 2015 11:28
You think there will be no oscilations on ADC for esp32 because of dedicated cpu for wifi and ADC happening on another cpu?
Do we know some dates maybe yet for esp32 release ?
hreintke
@hreintke
Dec 07 2015 11:52

@zhivko : 1/ I don't know, I only read on "internet"

Low Power Mode Improvements – ADC conversions, level thresholds, etc.. can now be performed in deep sleep
Peripherals – Capacitive touch, ADCs, DACs, I2C. UART, SPI, SDIO, I2S, RMII, PMW, etc… but no USB.

But what that really means ????
2/ I don't know, I read on esp32.com that beta's have not shipped yet.

donnib
@donnib
Dec 07 2015 12:23
so is SDK 1.4 ok to use with develop ? I am running it now and trying DHT example and i get weird results, the module keeps on rebooting, i dunno if it's power related, i removed VCC from the sensor and the module still reboots.
https://gist.github.com/donnib/87ef4558acd5f994db45
donnib
@donnib
Dec 07 2015 12:37
HTTPServer_AJAX example worked great and i did not see any reboots but then i tried other examples and somewhat i got the board in a weird state, i connect GPIO0 to GND then use target flash then i remove the GPIO0 to GND and reboot the module. Somehow i have a feeling there are mixed things running. For example i don't understand why the DHT example when i run prints to serial about wifi when there should not be a wifi.
zhivko
@zhivko
Dec 07 2015 12:42
@donnib: that is background tasks from espressif SDK for maangeing wifi - you cannot reach that or disable that from Sming that I'm afraid
donnib
@donnib
Dec 07 2015 12:43
@zhivko aha i see well that's ok then, then i just need to figure out why the DTH example does not work
zhivko
@zhivko
Dec 07 2015 12:44
how do you mean don't work?
you get what in serial ?
donnib
@donnib
Dec 07 2015 12:44
i got the ajax example to work again so that is not a problem, it's just the DTH example that does not work
zhivko
@zhivko
Dec 07 2015 12:44
how have you wired dth ?
zhivko
@zhivko
Dec 07 2015 12:44
You used correct pins ?
donnib
@donnib
Dec 07 2015 12:45
well obviously + an - to respectively 3.3V and GND and the middle pin at IO14
zhivko
@zhivko
Dec 07 2015 12:45

I see ets Jan 8 2013,rst cause:4, boot mode:(3,7)

wdt reset

donnib
@donnib
Dec 07 2015 12:45
yes thats the watchdog
zhivko
@zhivko
Dec 07 2015 12:45
and than no resets - is your module now resetting or not ?
donnib
@donnib
Dec 07 2015 12:45
for some reason it resets the board and i don't know the reason
zhivko
@zhivko
Dec 07 2015 12:45
so wdt reset is problem ?
you must not have long running loops or if you have it feed the watchdog with
wdt.alive();
donnib
@donnib
Dec 07 2015 12:46
i dunno, i just took the example, hooked up the sensor and flashed the module, i don't know why it resets
i wish i knew
zhivko
@zhivko
Dec 07 2015 12:47
wdt resets if you dont feed it - fo in while loop you need to have wdt.alive();
do this change and report back
donnib
@donnib
Dec 07 2015 12:47
@zhivko the watchdog is disabled
zhivko
@zhivko
Dec 07 2015 12:47
you think it is :)
is the code i am running
zhivko
@zhivko
Dec 07 2015 12:48
but actually it isn't...
donnib
@donnib
Dec 07 2015 12:48
hmmm but
//disable watchdog
WDT.enable(false);
zhivko
@zhivko
Dec 07 2015 12:48
if you read gitter chat you would see that actually you cannot disable WDT.
donnib
@donnib
Dec 07 2015 12:48
should do just that
zhivko
@zhivko
Dec 07 2015 12:49
yes but it isn't
doing that...
it tries to, but it is not succesfull :)
donnib
@donnib
Dec 07 2015 12:49
yes i understand, somebody made a bad example then, no problem
i was just not aware
zhivko
@zhivko
Dec 07 2015 12:50
try to read about wdt in SDK1.5 - there are some system calls to do that... I was playing with this..
donnib
@donnib
Dec 07 2015 12:50
i am running SDK1.5, i was not aware there was a 1.5 already
zhivko
@zhivko
Dec 07 2015 12:51
?
so which one you are runing ?
donnib
@donnib
Dec 07 2015 12:52
esp-open-sdk-1.4.0-macos-x86_64.tar.gz
zhivko
@zhivko
Dec 07 2015 12:52
so you have 1.4 not 1.5
donnib
@donnib
Dec 07 2015 12:52
maybe we are talking about different things
zhivko
@zhivko
Dec 07 2015 12:52
no - Im talking about esp open sdk
donnib
@donnib
Dec 07 2015 12:53
yeah i did a typpo
yeah so we are talking about the same things, i just confused you with the typpo
does sming just have a loop function like arduino ?
zhivko
@zhivko
Dec 07 2015 13:12
open example and you will see
Loops are not ok... interrupts are better
donnib
@donnib
Dec 07 2015 13:13
i just changed to timer and put in the kick for the watchdog so now no resets, i now need to figure out why i get sometimes weird values, some times none etc
zhivko
@zhivko
Dec 07 2015 13:13
I think maybe you need to ad some small delay between reading
donnib
@donnib
Dec 07 2015 13:14
yes but the first value should be ok because there is a sleep already
zhivko
@zhivko
Dec 07 2015 13:14
like delayMicrosecond(5) - but be carefull in Sming master branch delayMicrosecond is not in RAM...
donnib
@donnib
Dec 07 2015 13:15
and that means ?
zhivko
@zhivko
Dec 07 2015 13:15
and this may cause problems because it is hard to do something very fast if function is not in RAM
make sure that you have this in place:
zhivko/Sming@d158d32
maybe you will get better results
donnib
@donnib
Dec 07 2015 13:18
but i can just use delay() no ?
zhivko
@zhivko
Dec 07 2015 13:18
delay is meant to be in ms
donnib
@donnib
Dec 07 2015 13:20
yes and ? is that a problem for the Watchdog ?
alonewolfx2
@alonewolfx2
Dec 07 2015 13:32
@donnib firstly you cant disable wdt more than 6 second. (because of espressif sdk)
hmm it has even DAC pins
Anybody know how big is allowed current from ESP8266 pin ?
robotiko
@robotiko
Dec 07 2015 17:36
@ystrem 12ma MAX
robotiko
@robotiko
Dec 07 2015 17:41
@alonewolfx2 @zhivko about teh gpio9
nodemcu devkit 1 has gpio9 and 10 HW available
think
GPIO10 WORKS without issue
if the problem is that is a quad flash.. and have to cut the line..
the same would apply to gpio10 that is also a flash line, right?
Dominik Waas
@futuretec
Dec 07 2015 17:53
hey there, I kinda have trouble getting sming running on my MacOS El Capitan .. I followed the MacOS guide (which is not up-to-date btw), but still getting compile errors like "/opt/Sming/Sming/SmingCore/../SmingCore/Network/../Platform/Station.h:36:25: error: 'SC_TYPE_ESPTOUCH_AIRKISS' was not declared in this scope
SCT_EspTouch_AirKiss = SC_TYPE_ESPTOUCH_AIRKISS"
alonewolfx2
@alonewolfx2
Dec 07 2015 17:54
i saw 16 adc pin right? and 2 full uart
ystrem
@ystrem
Dec 07 2015 18:03
@robotiko thx, i want to power ds18b20 from GPIO
it draws 1.5mA at 5V
robotiko
@robotiko
Dec 07 2015 18:04
it should be good to go.. if it works a 3.3v
alonewolfx2
@alonewolfx2
Dec 07 2015 18:10
@robotiko ds18b20 working fine on 3.3v. i am using
ystrem
@ystrem
Dec 07 2015 18:12
It it should according to datasheet 3.0 - 5.0V
@alonewolfx2 Did you try parasite power to power the ds ?
alonewolfx2
@alonewolfx2
Dec 07 2015 18:13
i tried but i didnt make it work parasite power on 3.3v
@robotiko we need to try sming on rtos sdk because of esp32 sdk will compatible as much as possible with esp8266 rtos sdk
ystrem
@ystrem
Dec 07 2015 18:14
@ni
@alonewolfx2 good call
alonewolfx2
@alonewolfx2
Dec 07 2015 18:17
what is touch pins on esp32
ystrem
@ystrem
Dec 07 2015 19:02
What is the best solution to convert float to string ?
hreintke
@hreintke
Dec 07 2015 19:38
@alonewolfx2 : @Others
The RTOS is what I am experimenting with. Still a (long ?) way to go but promising :
Startup OK, C++ OK, Basic_blink OK, UDP/TCP client/server OK, HTTP in issue fixing (receive OK, but no processing).
Serial and Interrupts need rewriting. Spiffs compiling but issues when running. RTOS tasks OK.
Did not do anything (exept basic blink) with digital
ystrem
@ystrem
Dec 07 2015 19:39
@hreintke nice
robotiko
@robotiko
Dec 07 2015 19:41
@hreintke !
Great progress!!
very promissing
hreintke
@hreintke
Dec 07 2015 19:45
Yes, it is promising. Getting nice progress. For now it is "just a local Proof of Concept".
After finishing that (hopefully) need to think on actual integrating or "new sming sdk"
And testing, testing, testing,.....
robotiko
@robotiko
Dec 07 2015 19:46
if there is any task you can delegate .. just say
I can help too
hreintke
@hreintke
Dec 07 2015 19:49
I definitely need to do that. Plan is to get networking ready and then get it to a location where more people can work on it.
@ystrem : No I did not use esp-open-rtos. I am using the Espressif RTOS SDK.
The goal of esp-open-sdk is to "completely rewrite" the SDK and that is not what I think would be necessary for Sming.
Because of the rewrite they also cannot follow espressif sdk releases due to licensing.
But... Correct me if I'm wrong
alonewolfx2
@alonewolfx2
Dec 07 2015 20:16
@hreintke i wish to help you :)
donnib
@donnib
Dec 07 2015 21:25
i have a problem with my DHT11 and ESP8266, i get very weird results: https://gist.github.com/donnib/6ed4d2bfd5a5e4047202 some times i get a readout and some times i don't, i tried an 10k resistor between vcc and the data pin and no change, i run 3v off the ESP which is connected to a 3v breadboard powersupply
i can't figure out what the problem is, i tried multiple DHT11
same result