These are chat archives for SmingHub/Sming

10th
Sep 2016
Piotr Dobrowolski
@Informatic
Sep 10 2016 07:45
Hi all, is anyone using @slaff 's feature/axtls-dev branch? I built it yesterday, and Basic_Ssl sample build fine too, but when flashed, it doesn't seem to go anywhere near init(). Other samples built with "non-ssl" libsming work fine. Note: I rebuilt esp-open-sdk yesterday, so i'm running 1.5.4 nonos SDK and GCC 4.8.5.
Sadly I don't have any oscilloscope / USB-UART dongle that support 74880 baudrate at hand right now, so i can't see where the bootloader stops.
zhivko
@zhivko
Sep 10 2016 08:14
@tiltism if not local than rBoot...mk in/sming folder... You need to try. For extern c, check how other sdk functions are defined in sming and do the same.
@Informatic why dont you connect with pc with pyserial at that baudrate?
Piotr Dobrowolski
@Informatic
Sep 10 2016 08:15
@zhivko Beacuse that's quite a non-standard baudrate, and CH340 on my Wemos D1 Mini board doesn't seem to be able to clock that properly.
Or maybe I'm just doing something wrong. Or CH340 drivers in 4.4.0 kernel are still broken. Maybe <:
tl;dr I only get garbage.
zhivko
@zhivko
Sep 10 2016 08:17
You dont have nodemcu?
Piotr Dobrowolski
@Informatic
Sep 10 2016 08:17
Or maybe I tested the wrong baudrate, but I'm pretty sure It's 74880
zhivko
@zhivko
Sep 10 2016 08:17
You have your custom board?
Piotr Dobrowolski
@Informatic
Sep 10 2016 08:17
Wemos D1 Mini, it's quite common, like a little smaller version of nodemcu
It's just plain ESP12F, CH340 and some random LDO, don't remember the part number.
Either way, ssl libsming from slaffs branch sadly does not seem to work today for me.
zhivko
@zhivko
Sep 10 2016 08:28
You can try with nodemcu, it supports 74880, no problem
Piotr Dobrowolski
@Informatic
Sep 10 2016 08:29
Well, which one? :^) The one with CP2102?\
hreintke
@hreintke
Sep 10 2016 12:03
@Informatic @zhivko
Received my first wemos d1 mini yesterday, not yet worked with it.
Do you have issues connecting that at 74880 /
Piotr Dobrowolski
@Informatic
Sep 10 2016 12:14
@hreintke That's not an issue for me really, I'm just trying to build slaff's feature/axtls-dev branch ;)
After flashing it doesn't even reach Serial.begin(115200); in init();
zhivko
@zhivko
Sep 10 2016 14:19
What is advantage of wemos over nodemcu?
@Informatic compiling and linking was without problem? No error messages? Does @slaff runs this firmware without problem? If yes on what hw?
I practicaly use esp in intranet only so I do not require secure features so badly...
zhivko
@zhivko
Sep 10 2016 14:33
@hreintke what is default (startup) state of pin1 (serial tx)? After i define it as out, i cannot receive anything on console... :(
Piotr Dobrowolski
@Informatic
Sep 10 2016 14:59
@zhivko So do I, actually (about intranet), but still some security for internal communication is nice. It all compiled and linked fine without any problems (both libsming and ssl sample). Wemos D1 Mini is pretty much the same as NodeMCU, but smaller form-factor, and Wemos produces / designs some nice tiny modules, eg. one with relay, when soldered it makes a cute cube for iotizing EVERYTHING. (already installed one in my shop vac and one in air cleaning thing in my local hackerspace...)
@zhivko https://sc01.alicdn.com/kf/HTB1IR.FJXXXXXXJXFXXq6xXFXXXd/202831103/HTB1IR.FJXXXXXXJXFXXq6xXFXXXd.jpg Something like that, but I have the ESP board on top of the relay. I may take a photo some time soon if you'd like to see how it looks installed.
zhivko
@zhivko
Sep 10 2016 15:19
@Informatic very nice and compact I see...
Piotr can you share project on github i can try deploy on nodemcu.
How is esp powered on this module? I mean it needs to lower 220V AC to 3.3v dc?
tiltism
@tiltism
Sep 10 2016 19:16
For anyone interested, I had to add wpa2 into the LIBS entry in the Makefile-project.mk in order to add support for the extra WPA2-Enterpirse functions. I also added an extern "C" wrapper around my include for the user_interface.h function declaration header file. It compiled and worked with my application.cpp calls
zhivko
@zhivko
Sep 10 2016 20:29
@tiltism that's good news
Piotr Dobrowolski
@Informatic
Sep 10 2016 20:50
@zhivko so, well. Now I have a board with CP2102 and it doesn't like 78440 or 76800 (as i found somewhere) either, and only thing i get on reset is garbage.
IMG_20160831_234108513.jpg
And for AC-DC, as you asked, I use tiny AC-DC stepdowns from aliexpress. (↑NSFW, Contains glitter hotglue)
zhivko
@zhivko
Sep 10 2016 21:03
Isn't it 74880 ?
"When the esp8266 boots the baud rate is 74880, if you do not have your terminal set to 74880 the meaningful information it sends out comes out as garbage."
Piotr Dobrowolski
@Informatic
Sep 10 2016 21:04
Doesnt' seem. Or just CP2102/CH340 is not able to clock that. I'll check it with a scope one day, but i don't feel like it today. More important thing is... why doesn't it boot.
zhivko
@zhivko
Sep 10 2016 21:05
@Informatic why don't you share your project on github, so any other can check? As I ask before - is it so secret ?
Piotr Dobrowolski
@Informatic
Sep 10 2016 21:05
I'll just clone Sming from slaffs branch from clean start and i'll see if it helps with something...
Well, I'm just trying to build and run Basic_Ssl sample from https://github.com/slaff/Sming/tree/feature/axtls-dev
zhivko
@zhivko
Sep 10 2016 21:06
paste his github repo here
Ugh... I moved to SmingRTOS
You dont have smingrtos project for this ?
Piotr Dobrowolski
@Informatic
Sep 10 2016 21:07
Welp. It'd be nice to port axtls to SmingRTOS too...
Piotr Dobrowolski
@Informatic
Sep 10 2016 21:08
Basic_Ssl, as i mentioned. Yes, from that specific branch.
have you set SERIAL_BAUD_RATE ?
oh sorry you said init is not even started ?
Piotr Dobrowolski
@Informatic
Sep 10 2016 21:11
Yes, that's too obvious, it's in user_config.h.
Yes, it seems like so.
Ok, well, that's strange. I'm pretty sure it was broken for Basic_Blink too when I added ENABLE_SSL=1 to its Makefile-user, but it works now...
And it actually links with smingssl, so something is broken with Basic_Ssl sample. sigh
Piotr Dobrowolski
@Informatic
Sep 10 2016 21:17
Ok, well... Now I can see what's wrong. The only real difference between Basic_Blink and Basic_Ssl is that in the latter one there is uncommented MODULES = app in Makefile-user.mk...
zhivko
@zhivko
Sep 10 2016 21:18
But this means that also for @slaff this would not work?
ok glad..
of I go now... brb.
Piotr Dobrowolski
@Informatic
Sep 10 2016 21:52
Ok, then. I ripped out mostly everything from Basic_Ssl sample and it builds and runs. When I add pretty much anything that'd make the flash usage higher than somewhere between 321394 and 323343 bytes it fails.
Piotr Dobrowolski
@Informatic
Sep 10 2016 22:21
Well then, resizing/moving irom0 around as per SmingHub/Sming#477 did the trick.
Piotr Dobrowolski
@Informatic
Sep 10 2016 22:30
It'd be nice to have some sort of sanity check for overlapping sections, as in https://github.com/SmingHub/Sming/issues/477#issuecomment-163431360 (this was my case exactly)
zhivko
@zhivko
Sep 10 2016 22:36
so its working for you know - You get into init ?
Piotr Dobrowolski
@Informatic
Sep 10 2016 22:36
Yes, 0x0000.bin was just overwriting beginning of 0x9000.bin.
zhivko
@zhivko
Sep 10 2016 22:38
For SmingRTOS I use:
$(ESPTOOL) -p $(COM_PORT) -b $(COM_SPEED_ESPTOOL) write_flash $(flashimageoptions) 0x00000 $(RBOOT_BIN) 0x02000 $(RBOOT_ROM_0) $(RBOOT_SPIFFS_0) $(SPIFF_BIN_OUT)
$(RBOOT_SPIFFS_0) = 0x100000
What is at 0x9000.bin ? for you?
Piotr Dobrowolski
@Informatic
Sep 10 2016 22:41
irom0
and 0x0000 is like... the rest. I haven't really dug into smings linkerscripts.
zhivko
@zhivko
Sep 10 2016 22:42
and at 0x000? I do not get this
at 0x0 it should be some boot prog that shoudn't grow at all ?
if I take parallel to sming rtos - in SmingRTOS, you could only overwrite spiff with large program...
zhivko
@zhivko
Sep 10 2016 22:46
hmmm - it seems spiff position is calculated from size of builded rom - isn't it ?
Piotr Dobrowolski
@Informatic
Sep 10 2016 22:46
Take a look at issuecomment i linked up there at 00:30 ;)
zhivko
@zhivko
Sep 10 2016 22:47
you don't have 4mbit flash module?
Piotr Dobrowolski
@Informatic
Sep 10 2016 22:49
Yes I do, but that's not a problem here. Please, take a look at an issue.
zhivko
@zhivko
Sep 10 2016 22:53
OK too late for me :) It would be nice to get this into rtos :)
Piotr Dobrowolski
@Informatic
Sep 10 2016 22:54
Porting axtls patch to RTOS is somewhere on my todolist, if slaff is not interested in that.