-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiFi "Error setting baudrate" #15
Comments
Okay, So now I'm about to give up.. |
It looks the WiFi firmware flash was OK. It is strange that you can't get any response from ESP8285. I supose you have disconnected usb->uart adapter before testing. wifi.start(tx=7, rx=6, ssid="SSID", password="PASS", baudrate=115200, wait=True) ESP8285 enable pin is connected to K210 io Pin #8 and pulled-up with 12K resistor. You must newer use Pin #8 while using WiFi. ESP8285 must be initialized even with the original firmware, there should be responses to the commands... At the moment I can't think of anything else, I'll report if I'll find something. |
Thanks for the comments about flashing process. I'll use them to update the instructions for the next update. |
I submitted a pull request for changes to Readme.md if you would like to look at it. |
So this is what i get on the original firmware:
I will have to load yours again to see what happens. |
"I'm just confused why if i set everything back to factory it still does not work?" |
Yes. Definitely. |
now i'm back on your firmware, wifi and k210: __ __ _____ __ __ _____ __ __
| \/ | /\ |_ _| \ \ / / | __ \ \ \ / /
| \ / | / \ | | \ V / | |__) | \ \_/ /
| |\/| | / /\ \ | | > < | ___/ \ /
| | | | / ____ \ _| |_ / . \ | | | |
|_| |_| /_/ \_\ |_____| /_/ \_\ |_| |_|
------------------------------------------------------
MaixPy-FreeRTOS by LoBo v1.11.11
--------------------------------
MicroPython 1.11.11 (1abe503-dirty) built on 2019-12-19; Sipeed_board with Kendryte-K210
Type "help()" for more information.
>>> from machine import Pin
>>> import network
>>>
>>> wifi_en = Pin(8, Pin.OUT)
>>> wifi_en.value(1)
>>> wifi.start(tx=7, rx=6, ssid="SSID", password="PASS", baudrate=115200, wait=True)
M (239179352) [WIFI]: Initialize WiFi UART
M (239183180) [WIFI]: UART #0: initialize uart hardware
M (239213350) [WIFI]: UART #0: initialized, tx=7, rx=6, bdr=115205
M (239238364) [WIFI]: WiFi TASK STARTED
M (239341419) [ATCMD]: Check and set device baudrate
W (239981778) [ATCMD]: Trying at 230400 bd
W (240671162) [ATCMD]: Trying at 460800 bd
W (241360551) [ATCMD]: Trying at 921600 bd
W (242049936) [ATCMD]: Trying at 1000000 bd
W (242739325) [ATCMD]: Trying at 2000000 bd
E (243428705) [ATCMD]: Error setting baudrate
M (243432812) [WIFI]: UART #0 deinitialized
M (243437477) [WIFI]: WiFi TASK TERMINATED
False |
You think the flash may have destroyed the ESP8285? |
It is impossible to destroy ESP8285 by flashing! You can try to attach usb->uart adapter (Rx) to esp8285 Tx (K210 Rx) without connecting adapter's Tx, to see if there is any communicattion, there should be. I think ESP8285 prints some messages after reset (at 115200 bd). |
I know it is no longer labeled "DanDock" like the one from the wifi flash readme.md picture. Instead it says "Maix Dock". From our previous problems, it seems they have used slower flash, what else did they change? (rhetorical) |
I did try this, I'll do it again and post results. |
Does that mean anything to you? LOL |
BTW, I tried flashing back to original fw using "flash_download_tools_v3.6.8" from espressif. Didn't seem to make any difference so i went back to esptool. Should I try this to flash your FW? |
It also prints this when i go from LOW to HIGH on pin 8 (wifi_en):
|
Okay, so i watched while it does "Check and set device baudrate" and I get unknown chars. I have no idea what baud it is trying to use. I have tried many possible baud rates and nothing seems to be correct. LMK what you think. |
With my firmware flashed, you should get the following messages after esp8285 reset (pin8_lo -> pin8_hi):
The massages after The baud rates tried by wifi driver are 115200, 230400, 460800, 921600, 1000000, 2000000 Before starting wifi you can connect usb->uart TX line to ESP8285 and execute AT commands directly from some terminal emulator (minicom, putty) MicroPython >>> wifi_en.value(0)
>>> wifi_en.value(1) terminal: ����
==============================
LoBo ESP8266 Bootloader v1.2.0
==============================
Flash map: 2, 1MB (512+512)
Flash mode: DOUT, [ESP8285]
Reset reason: POWER_ON
Loading configured firmware (0)
Address: 001000
Starting firmware 0, map 2 from 001000...
ready
WIFI DISCONNECT
at
OK
at+GMR
AT version:1.7.0.0(Apr 16 2019 15:31:04)
SDK version:3.1.0-dev(3b41fcf)
Compile time: Jun 30 2019 14:56:44
ESP8266_AT_LoBo v1.3.1
OK Remember that at commands must be terminated with If you don't get the response try to change terminal emulator baud rate until you get it. |
Yea, I'm not getting anything like that at 115200. I get what I posted. I just reflashed your firmware again too. Seems to be going perfectly. I have tried to communicate at many different baud rates, including the ones listed with no success. Even tried using Arduino IDE serial monitor since i know it can send both LF + CR. When i send "AT" at 115200, i get a response of "!". |
This is what i get when booting or when toggle wifi_en.value 0 > 1
|
I just ordered a new board, maybe i can read the flash from it and flash this one back to stock? IDK. |
Hey, i just realized something.. The "ESP DOWNLOAD TOOL" reports that the ESP8285 has:
Could this be the issue? 8mbit flash instead of 1mbit? |
ESP8285 has 1MB Flash |
i feel stupid, just realized that. Somehow i just did esptool read_flash for to 0x800000 tho lol. |
Okay, it works again on stock firmware. Just successfully read flash from the new board and wrote it to the old one. Now WiFi works again. MicroPython v0.5.0 on 2019-11-29; Sipeed_M1 with kendryte-k210
Type "help()" for more information.
>>> import network
>>> from machine import UART
>>> from Maix import GPIO
>>>
>>> fm.register(8, fm.fpioa.GPIOHS0, force=True)
1
>>> wifi_en=GPIO(GPIO.GPIOHS0, GPIO.OUT)
>>> fm.register(board_info.WIFI_RX, fm.fpioa.UART2_TX, force=True)
1
>>> fm.register(board_info.WIFI_TX, fm.fpioa.UART2_RX, force=True)
1
>>> uart = UART(UART.UART2,115200,timeout=1000, read_buf_len=4096)
>>> wifi_en.value(1)
>>> nic = network.ESP8285(uart)
>>> nic.connect("_ssid_", "_password_")
>>> nic.ifconfig()
('192.168.1.122', '255.255.255.0', '192.168.1.1', '0', '0', 'MAC', '_ssid_') |
So to recap, I don't think it's something wrong with your frimware, since the frimware posted by Sipeed doesn't work either. I'm going to post this firmware I just read here in case anyone else needs to flash back to stock and finds there is no working firmware available. |
So now I'm back to stock and wifi works again. I tried flashing the esp8285 with your firmware again and had the same problem. Your firmware simply does not work with my board. When I try to use stock esp8285 firmware with your K210 firmware, I get this message. Any Suggestions? Any ideas to make your firmware work with esp8285?
|
It looks there is some issue with WiFi firmware provided in this repository's If the WiFi task is not started after the first init ( |
I'm about to try. I don't have high hopes though since the firmware from sipeed didn't work either, i doubt if it's a problem with both firmwares. More likely (to me) that there was a change in hardware that requires a different firmware which is causing the issue. |
I'm quite sure it will work as I've tested it today on a new M1W module, not previously flashed... |
|
Does this firmware work on your M1W? Edit: This does NOT work on mine. That's why i had to buy a second one to get firmware to fix the first one i bought. |
The only reason I say the hardware is different is because we had to decrease the flash speed for them to work with your K210 FW so I have a hunch that the flash isn't the only thing they changed with these newer modules. |
Have you erased the ESP8284 Flash first, than flashed it from inside the ESP8266_AT_LoBo repository? The standard ESP8266/ESP8285 AT_Firmware can comunicate with the WiFi driver (you tested it yourself), but will not work as it does not have some new (required) TCT commands... My board is an older one, marked "Dan Dock", but I think it is the same one. |
Yes, i did exactly as directed. |
As far as I know, there is a new M1W version which can also use SPI interface for communication with ESP8285, but I don't think it is available yet. |
https://www.amazon.com/gp/product/B07SKFLYXJ/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 |
Well, for now it remains a mystery. BTW, I've also tested with MAIX-BIT with an external ESP8285 (ESP-01M) and it works perfectly. |
That's good to know. I don't think it's the fault of your firmware. I think they are doing something different with these new boards (Such as SPI) may be able to look at their source and see. But SPI doesn't make sense because of this:
If it were SPI, we sould not be able to communicate via UART. |
@CorruptName Looks like I have the same module as you. Did you have any luck getting Wifi working with the loboris port in the end? I need the FTP module from Loboris to get a productive workflow (Background: I have a python filesystem watcher running on my PC which uploads any file modifications via FTP to my existing ESP32 w/SPRAM via the FTP module, this plus a "module reload" workflow allowing me to do live incremental development via the REPL). Is there any complete instructions for getting the firmware flashed as of now? I've been able to piece together some information, but I still don't understand how the small round connector in the cutout corner of the main K210 block is meant to be connected to or what it does. It also doesn't look like the Maix Dock is very breadboard friendly so I assume I have to directly solder the USB2UART to it? Hope you can help. This was my Christmas present to myself... |
Unfortunately, there is no solution (yet) if you have the same module as me. You are welcome to try if you wish. Fist off, were you able to get the loboris port of the k210 firmware working? If not, I have compiled a version with a slower flash speed that may work for you. If you want to try and flash loboris wifi firmware, you will need to hold a jumper wire from ground to that corner pin you described while you power it up. There are several grounds to use. If you haven't soldered pin headers to the board, you should consider it. If not, you may have a hard time holding everything in place. The rest of the information you need should be available in the README found in the flash directory. But you should probably use "my version" of the instructions which address a couple issues (typos) in the loboris one. https://github.com/CorruptName/MicroPython_K210_LoBo/blob/master/firmware/wifi/flash/README.md |
No I haven't tried anything just yet. Up to now have just been reading exactly what I need to buy. Does the k210 port require the 8285 firmware update as I assumed or can it run independently from it? |
You can run it without. You just won't have wifi. It is possible to access wifi using UART and AT commands, though I doubt you will find any support in doing that. Also be aware, there is currently no support for the KPU. Does your board say "Dan Dock" or just "Dock"? |
My board looks exactly like yours. There seems to be more than just a few versions, I've seen two different layouts of even the Maix Dock "metal covered set of chips" (sorry, not sure how to refer to the big block of chips with the cover). Alas my use case requires wifi. I'll wait until instructions are more complete and your issues are resolved. Thanks for the help! |
Sure thing. When I/we find a solution, I will update here or on my fork. Unfortunately, we are stuck with stock firmware (If we need WiFi) which is severely lacking in support & documentation, which sucks because these boards are very cool with a ton of potential. If you do happen to try flashing and lose WiFi completely, i have posted a link my dump of the original WiFi firmware. If you have any other issues regarding the flashing process I can probably help you out. BTW, I would be willing to bet the K210 firmware from here won't work on your board either without making changes and recompiling. We already went through that on another (Now Closed) issue. I can post that "modified" firmware if anyone needs it. Basically it just has slower access rate to the flash as it seems the new boards use slower flash. If I were you I would try and see what happens. Nothing to lose and just because our boards look alike does not mean they are the same. And BTW: I think that's called a "Lid" but i'm not 100%. |
Hello, either we both have corrupted boards - or there is an issue with the latest firmware as I get the same results load 0x40108000, len 3056, room 16 Initially with the sipeed MicroPython and the original ESP8285 software It worked ... |
If you need to, you can load the firmware that I linked above to get your wifi working again. Google Drive - Working OFW for some. |
Just ran into the same issue: added bonus content, when I flash the ESP with the
or sometimes I would get
If I start the board afterwards and try to connect to a WIFI I run into the same issue as described before with the baudrates Hardware: Maix Dock with ota firmware |
I experience the same problem. I'm using Maix Go which has M1W module, that I purchased few weeks ago. I think I may have a solution. So, after back and forth erasing, flashing with LOBO AT firmware, I decided to flash with original firmware (that luckily I dumped before doing anything). Then, to flash LOBO AT firmware, I don't flash the whole thing, instead just the application, by this command: Notice there's Then, when after rebooting the board, I saw this serial log from esp8285:
Notice there's:
Which I think it's OK, because I don't see it again after next reboot. Then I confirm that I have LOBO AT Firmware by typing:
While the original firmware (from the store), AT+GMR will output this:
That's very very old :) I hope it may help someone. Good luck! |
I just went through all of @CorruptName did. I saw the exact same problem with my Maix Dock M1W board. But flashing only the application after restoring factory firmware as @andriyadi suggests, fixes it for me as well. |
After successfully flashing the provided firmware, When I try to connect with this error.
Sipeed Dock M1W with ESP8285
And here is log from flash:
On a side note, The instructions should probably be updated or the flash.sh script fixed..
The instructions state that we should:
Execute `./flash.sh -eo -t 1MB -m DOUT` to erase the existing firmware
But when we get to:
Execute `./flash.sh -t 1MB -m DOUT` to flash the new firmware
This also causes erase first. That makes 2 erases before write.
Also, During the second command, we are given a very brief window to reboot device while holding esp8285 boot pin to ground. This can be very tricky. I think that "flash.sh" should be fixed to not perform erase during write action.
Also, All of the steps in the instructions are "#1" lol.
Oh yea, And:
./flash.sh -eo -t 1MB -m DOUT
should be replaced with:
./flash.sh -eo -t 1MB -m dout
Since it will fail with capitals.
The text was updated successfully, but these errors were encountered: