ESP8266-12F trouble - esp8266

Some time ago, I was using my Esp8266-12F module (concretely I was using a Wemos D1 mini). At that time, everything was running perfectly, but when I try it again, both of my modules were not working as expected.
Then, I remembered that I had similar trouble while I was working on it, so I just decided to do what worked the time before.
I restored the firmware as I did, but instead of working, it keeps doing the same thing. The modules (both) keep their LEDs blinking and sending some message. In this message, the modules send weird characters, but one part is readable, and it says something like "DISCONNECTED".
For restoring the firmware I'm using the Esptool with:
esptool.py write_flash --flash_size 2MB-c1 0x0 boot_v1.7.bin 0x01000 at/1024+1024/user1.2048.new.5.bin 0x1fb000 blank.bin 0x1fc000 esp_init_data_default_v08.bin 0xfe000 blank.bin 0x1fe000 blank.bin from the AT 1.7.4.
When I flash it using the Esptool, it returns:
After flashing it, I cannot interact with the module, the only thing is that the less starts blinking periodically.
Does someone know what can I do? I mean, I have tried exactly the same I did once ago, but now it's not working.

Related

Request for working configurations of openresty + mobdebug + EmmyLua remote debugging in PHPStorm

I'm out of my wits. I'm trying to set up remote debugging of lua code in dockerized openresty. I use PHPStorm with EmmyLua extension, and the mobdebug library on the Lua end. I have been reading and hearing reports of this working for people, but for me stopping on a breakpoint (or immediately after mobdebug.start()) works about 15% of the time (evidence that I am not completely misconfiguring the thing), including exactly 0% of those places in my code that I actually want to debug.
I will not be debugging this issue. I intend to work around it by using an exact setup that is known to work, so I need someone for whom it does work to tell me what their setup is:
OS version
openresty version
mobdebug version
any custom patches or hacks you might have applied to get the debugging working
luasocket version (probably relevant)
PHPStorm version
EmmyLua version
docker and docker-compose version, if applicable
whatever you may suspect to be relevant
I am willing to completely raze my development environment and rebuild it exactly to the working spec, just to have working Lua debugging.
EDIT: for those interested, here are my detailed symptoms:
I can't stop at actual breakpoints, ever (i.e. after I initially stop after mobdebug.start() and then "Resume program" and a line with a breakpoint is hit, but it doesn't stop there)
I can stop after mobdebug.start() in code executed from init_by_lua_block, i.e. once per server start / config reload
I can't stop after mobdebug.start() in any code executed during handling a request, i.e. ssl_certificate_by_lua_block, rewrite_by_lua_block etc. This is probably understandable because coroutines are involved
All my attempts at enabling coroutine debugging in request handling code either error out or have no effect:
mobdebug.coro() in init_worker_by_lua_block() errors out with "API disabled in current context" somewhere in mobdebug.lua
mobdebug.on() in the function I want to debug either has no effect, or errors out with "attempt to yield across C-call boundary"; I haven't discerned the pattern yet.
stopping on a breakpoint (or immediately after mobdebug.start()) works about 15% of the time
Stopping after mobdebug.start() should work under all circumstances, except when there is a connection already established to the same debugger controller, so the fact that it doesn't usually points to the system that tries to establish multiple debugging sessions to the same controller/IDE (or no connection can be established at all).
Similarly, there are several reasons why breakpoints may not be working, but if they work in a file as part of a specific setup, then I'd expect them to always work in that case. Some of the reasons why breakpoints may not be working are listed in the documentation: https://studio.zerobrane.com/doc-faq#why-breakpoints-are-not-triggered.
mobdebug provides a command line-based controller, so for troubleshooting purposes it may be easier to use that instead of a more complex setup.

Program white-screening all of a sudden

I've been working for a few days on an electron application. When I was done working for the day yesterday, the program was working and running just fine. I came in this morning to start working on it again, and now all of a sudden partway through the program it just whitescreens now. I have not changed anything from the time of working on it last (last known working) to current time.
I do not see any errors being logged to the powershell console after running npm start (Program does not work packaged either), and when I use inspect element it just says:
DevTools was disconnected from the page.
Once page is reloaded, DevTools will automatically reconnect.
But it just sits on this white page forever.
This page has quite a lot of code (531 lines), but I am completely unable to pinpoint the problem because there are no errors logged. That said, I began taking pieces out of my code trying to get it to work, and I was able to narrow it down to the code below.
What can I do to fix my application?
This is the code I narrowed it down to, when I comment out this code, the page runs fine.
var audio = require('win-audio').speaker;
weirdly enough, this is one of the first pieces of code that I had written in this page of the application, and it has worked until just today.
I just found out that if I plug in some speakers, the program no longer whitescreens. But this isn't really a good fix, because this program will be ran on hundreds of computers a day that may or may not have speakers.
UPDATE::
Ok, I think I have fixed it. To try it out:
Download my fork at: https://github.com/11AND2/win-audio
In your terminal change dir (cd) into the directory e.g. "cd C:\...\win-audio"
run command "npm run install" - this rebuilds the module
To test it run "node sample.js" and activate/disable your audio devices
If at any point you want to check if the device is alive just run
var audio = require('win-audio').speaker;
var _vol_alive = audio.get();
if (_vol_alive === -999) {
console.log("this device is dead :-(");
}
in your application. Please note that I have not changed the API at all so there should be no need to change your application code.
Please give me a heads up if the fix works for you so I can create a pull request for the fix. I am not the creator of this plugin, all my changes are public domain.
DEPRECATED::
Ok, I have found a fix for you. Would it be ok if:
var audio = require('win-audio').speaker;
returns -1 if no device is found?
So you could do:
if (audio !== -1) {
audio.set(30);
}
Please give me a short heads up and I will post the implementation route.

Interactive local notifications stopped working

I just added interactive local notifications to my app a few weeks ago. It was great for a while, and then suddenly we noticed that the buttons on the notices disappeared. The code hasn't been touched in a while, but poking around today I verified that the code hasn't changed. However, the interactive buttons are gone. Additionally, I tried pasting in sample code from a tutorial, and that code also fails to produce a local push with buttons (it just produces a non-interactive push).
I've gone back over the commit history, but there's 3 of us working on this app, and no obvious culprits. Has anyone had this experience before and know what might have happened. What are some obvious culprits I should be checking?

view iphone console logs without a mac

Is there a way to view the iphone console logs without having a mac ?
It used to be possible using the iPhone Configuration Utility but it does not seem to be available any longer.
I saw a tool called iTools but it seems to require a 32bit version of itunes which is also not available any more.
Given an iPhone device + windows + linux, Is there any workaround / tool to view the iphone console logs?
Realizing it is over half a year ago you asked this, but since it does not have an accepted answer yet:
I ran into this very same issue over and over, and got fed up with it, so I decided to have a go at writing a script that displays console messages in HTML, so you can just view everything in the webpage itself, without having to resort to a console-replacement or a tedious remote debugger (for which you, indeed, require a Mac), without having to modify each console call in existing code.
The key lies in 'replacing' the four main functions in window.console: log, warn, error and trace. This is done by redifining each method, adding own code to that, and calling the original method in the end. Jakub Fiala wrote the basic script for that, on which I built the rest: https://gist.github.com/jakubfiala/8fe3461ab6508f46003d
I dubbed it 'MobileConsole'. It is quite unobtrusive and will 'catch' all console.log (or .warn, .error or .trace) events, and even bind to window.onerror.
I have created a separate page for this script with an elaborate explanation on how it works, including a demo, over here.
Download this from the app store onto the iphone, you can then view logs directly on the phone:
https://itunes.apple.com/us/app/console/id317676250?mt=8
Please note, this is an old app, it will crash when launched, then on reopening it will show you the device logs.
If that fails, here is a link to the iPhone configuration utility for windows:
http://download.cnet.com/iPhone-Configuration-Utility-for-Windows/3000-20432_4-10969175.html

restarting the video driver (programmatically)

I have a strange bug somewhere in my system that causes the screen to move very fast when it occurs (I can't really describe it) and I learned to deal with it by putting my laptop to sleep then waking it up ..
I'm suspecting it's something with the display driver, and it gets fixed if the driver is restarted.
Is there a way to restart the display driver programmatically?
I noticed sometimes in vista the screen blanks for 2 seconds and a ballon tip appears in the tray saying the display driver had to restarted due to something blah blah.
So I figured there must be a way to restart it in code.
What I want to do is write a command line tool that restarts the display driver so that I can launch it with a keyboard combination when I need to.
[ UPDATE (30/1/2009) I tried restarting the aero service as suggested, but it didn't solve the problem. ]
it seems the name of the display driver "service" is igfx, however, I can't stop it from the command line
C:\>net stop igfx
The requested pause, continue, or stop is not valid for this service.
More help is available by typing NET HELPMSG 2191.
C:\>NET HELPMSG 2191
The requested pause, continue, or stop is not valid for this service.
There are two things you can try, which will restart various parts of the video stack.
Restart DWM (Aero/Glass) with:
net stop uxsms
net start uxsms
Change the resolution with a utility such as setres.exe

Resources