I've flashed the MicroPython into the NodeMSU board based on 12E chip and have used the screen command in the terminal on OS X to run the REPL. It works a few seconds and the REPL resets.
I have no idea where is the problem ( I can write a few commands when the all my work clears and I see the MicroPython console from scratch.
without more information, this is a difficult issue to diagnose. basically, there are 4 possible causes of this behaviour:
power fluctuation causes the board to reset.
the board resets because the reset pin is physically set to gnd
the board resets because the reset pin is logically set to gnd
the function machine.reset() is called
steps to diagnose:
try a powered hub, separate power supply, different usb cable, different usb port to power your device and observe if the reset happens
inspect the board. see if there is a solder bridge between the reset pin and gnd (next to each other as seen on this image or between the pins on the reset button
and 4) here you need to look at the code in boot.py and main.py; both located on the internal filesystem on your board. You can get those files using webrepl of using the following code:
print(open('boot.py').read())
print(open('main.py').read())
If you print the content here we can inspect it with you.
alternatively, try reflashing micropython using the latest .bin from micropython.org and see if the clean version of micropython corrects the issue.
Related
Host machine: Debian 10 running NoMachine 7.2.3
Settings:
Specified H264
User Hardware Encoding enabled
Use Specific Frame Rate enabled (60FPS)
Use Acceleration enabled
Client: Windows 10 running NoMachine 7.2.3
Both machines have monitors attached.
Using NX protocol for connection.
FullScreen / Scale to Window / Desktop is currently 2560x1440 (reduced from native while testing this issue)
Specific issue:
I do a ton of work in the terminal and when viewing desktop via nomachine, the terminal caret is randomly not visible. The same issue is less noticeable with right click menus and other areas of "visual updates in small screen space." If this were another remote desktop vendor I would try to find the "don't update just regions" setting to force the entire display to update regularly, but I can't find similar settings for nomachine. I have a dedicated gigabit connection between the two machines with no other traffic on that line, so bandwidth is not an issue.
To recreate:
I disabled caret blink (using universal access / accessibility settings) so the caret is a solid block in terminal / vi. If I edit a text file in vi and move up and down, the caret will only update visually every other line or so (verified on the physical screen it is moving correctly). Same if I highlight or insert, etc. You inevitably miss a character or so or lose your place).
I have tried changing speed vs quality slider, resolutions, swapping from h264 to VP8, etc.
I have disabled:
multi-pass display encoding
frame buffering on decoding
client side image post-processing
Nothing seems to change this specific issue. Yes I can make dragging a quarter-screen-sized terminal window smoother, but that doesn't help me follow the caret in vi/vim. Both machines are nicely spec'd (client has 16G / RTX2080, server has 32G / GTX1080)
Is there a way to get nomachine to update all the screen all the time, or at least better refresh small areas like a terminal caret?
(OP): Based on a night of troubleshooting, the issue seemed to be either:
An issue with the Debian install of the nvidia drivers
The server machine is a laptop with a broken main screen (but with an HDMI external monitor plugged in). The Debian X-server may have been confused as to whether it was headless or not and caused issues with nomachine (which tries to detect headless and start a virtual session).
The solution to this exact problem would be to disable the GUI and force a virtual session, per https://www.nomachine.com/AR03P00973 (dummy dongles won't work because the laptop's main display is not a standard plug).
In my specific case, I needed GUI access on the server at times so I couldn't use the above methods, and I could not remedy the problem with Debian, so I wiped the system and installed Ubuntu 20.04, which is more forgiving with graphics drivers and monitors. After setting up the Ubuntu system as similarly as possible to the Debian system and letting the proprietary nvidia drivers auto install, nomachine connected at the same resolution and worked perfectly, without the lag in small screen areas.
For all of these scenarios, I am able to upload the firmware and monitor via serial usb. But after creating my first firmware, for all new firmware, I can't upload Lua scripts using the nodemcu-tool without getting the following:
Error Message
F:\Development\NodeMCU\helloworld>nodemcu-tool -p COM3 upload init.lua
[NodeMCU-Tool]~ Unable to establish connection
[NodeMCU-Tool]~ Invalid node.chipid() Response: 6935962
Observations
Can reset the board using nodemcu-tool. Leads me to assume the baud rate is fine.
Can see the file system being created from PuTTy after loading any of the firmware. Leads me to assume the firmware is OK.
Have tried multiple dev boards, same results
Found the source of the error message device-info.js. either line 45 or 49
I have no idea what "Response: 6935962" means. Is that my chip id or an error code?
A new commit was made to the firmware source during the last couple of days. No idea if this is relevant.
Was hoping to get this resolved before I go down the Docker rabbit hole. Lazy. I know.
9/6/2019 - created first firmware to start development
Built a firmware using https://nodemcu-build.com/ with these modules (cron, file, gpio, i2c, mdns, mqtt, net, node, sjson, tmr, uart, wifi)
Uploaded the firmare using NodeMCU-PyFlasher-4.0
No issues with this firmware. I've been able to upload lua scripts and test them successfully. Even now, I can revert back to this firmware and use it without issues. I've even redownloaded this firmware from the original link, and it works fine.
9/7/2019 - created a new firmware to use adc and other goodies
Built a firmware using https://nodemcu-build.com/ with these modules (adc, cron, file, gpio, i2c, mdns, mqtt, net, node, rtctime, sjson, tmr, uart, wifi)
Uploaded the firmare using NodeMCU-PyFlasher-4.0
Having the problem described above.
9/8/2019 - built firmware with minimal modules
Built a firmware using https://nodemcu-build.com/ with these modules (file, gpio, net, node, tmr, uart, wifi)
Uploaded the firmare using NodeMCU-PyFlasher-4.0
Having the problem described above.
Platform & Tools
Windows 10
Development board: HiLetgo ESP8266 NodeMCU LUA CP2102 ESP-12E Internet WiFi Development Board Open Source Serial Wireless Module
Firmware builder: https://nodemcu-build.com/
Serial Monitor: PuTTy 0.72
Firmware Loader: NodeMCUPyFlasher 4.0
Lua script loader: nodemcu-tool 3.0.2
fetchDeviceInfo() first calls node.info() at https://github.com/AndiDittrich/NodeMCU-Tool/blob/master/lib/connector/device-info.js#L9. Then it does an if-else to figure out whether it's running on ESP8266 or ESP32.
With the recent upgrade to SDK 3.0 node.info() was changed in PR #2830. See documentation at https://nodemcu.readthedocs.io/en/latest/modules/node/#nodeinfo. It now returns values the script doesn't consider to be coming from ESP8266. The script then calls node.chipId() in the else branch. So, it's getting a chip id from ESP8266 but it is expecting one from ESP32. Hence, the exception.
I have no idea what "Response: 6935962" means. Is that my chip id or an error code?
It's your chip id.
To cut a long story short: NodeMCU-Tool needs to be adjusted as laid out above to work with the current NodeMCU version.
I cached the same issue from the recent cloud build(https://nodemcu-build.com/). It works when i switch back to the old ones. It looks like a problem of the build system or recent source code. You can switch to other build method and try use the older code.
I am trying to build for a board that has a 40MHz crystal. I am building on my own Linux machine. I do not see a config option to change this. Is there a place to set the crystal frequency? Or is it only set at time of flashing the firmware?
The boot ROM does the smart stuff. You may need to set it for flashing. ESPTOOL and the other flashers allow this. But once booted you have the node.setcpufreq(speed) function and the corresponding getcpufreq() function.
I am trying to upload the blink sketch to a new arduino nano v3 (technically it is the iduino knockoff from geeetech) with atmega328 but I keep getting the infamous "avrdude: stk500_getsync(): not in sync: resp=0x00" error... How can I avoid this error and get a successful upload?
Here is what I know:
1) I have installed the ftdi drivers according to the ftdi
instructions on the nano.
2) In the arduino IDE it recognizes the
com port. I have both correct port and correct board selected.
3) I shorted my Rx and Tx together and typed a string into my serial
monitor and received it back as I should have.
4) When I attempt to upload the blink sketch my L led flashes, the Rx pin blinks 3 times,
and then I get the error message and the modified version of the
sketch (I just extended the delay) doesn't go through.
5) This piece of information might be inconsequential but my nano is in a perpetual
state of blinking as if it had let me upload the sketch once... I did
try to upload the sketch before I installed the drivers.
I think that is all the relevant information but ask away if it is not. Thank you so much.
Thankfully I found that it was a simple dumb fix after all. I got out the magnifying glass and upon close inspection of my chip discovered that it was an atmega168 and not an atmega328 like I had originally thought it was.
funny coincidence, i found this article in hackaday.com:
"Frustrated with one of the greatest failures to become an Arduino
tinkerer, [psgarcha] took a good, long look at the Uno board. He
glanced over to an Arduino Mega board. Something looked different. On
the Uno, the resonator had blown off. Problem found, at least."
link
Hope your resonator didn't blew off.
Actually on windows platform this error is very often the only solution is to reinstall arduino driver
I am using Bhash Freeduino, what worked for me was
The Pro and Pro mini setting
AtMeta328
/dev/ttyUSB0
I'm in an unusual spot. The built in screen on the laptop I'm using right now is broken so bad I can barely see anything besides random flickering lights on it. Because of that, I got and plugged in a monitor to my laptop. This moniter works fine once Windows 7 has already loaded.
The issue is: I'm trying to open the BIOS/boot menu to live boot off of my USB, but I can't see anything. How do I make it so that I get visual output on my monitor early enough to open the BIOS/boot menu?
If it's a Dell laptop, try FN&F1 or F1
Dell Forum