I have been trying to get my grandcentral with airlift shield to use bluetooth.
I have tried to follow the tutorial here:
https://learn.adafruit.com/upgrading-esp32-firmware/upgrade-external-esp32-airlift-firmware-2
It says:
If you have an AirLift ESP32 Breakout Board, you will be turning your existing Arduino-compatible board into a USB-to-Serial-Converter. To do this, you'll need a special Arduino sketch named SerialESPPassthrough.ino and an Arduino-compatible board with Native USB support such as the Adafruit Metro M4.
The code either fails when run and i am connected on COM20:
PORTS {COM7, COM8, COM9, COM10, COM20, } / {COM7, COM8, COM9, COM10, COM20, } => {}
Uploading using selected port: COM20
C:\Users\rickm\AppData\Local\Arduino15\packages\adafruit\tools\bossac\1.8.0-48-gb176eee/bossac.exe -i -d --port=COM20 -U -i --offset=0x4000 -w -v C:\Users\rickm\AppData\Local\Temp\arduino_build_800099/metroprepesp32.ino.bin -R
No device found on COM20
Set binary mode
Send auto-baud
Set binary mode
An error occurred while uploading the sketch
There is a section in the .ino file at line 73:
#elif !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SerialESP32 Serial1
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 7 // a.k.a BUSY or READY pin
#define ESP32_RESETN 5 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#define NEOPIXEL_PIN 88
#endif
This is the default if you are not using one of the feathers. I have not changed any except the NEOPIXEL_PIN because i could find that on the pinout. But I have no idea what pins should be used for the rest
Please help
Thank you
airlift shield firmware upgrade problem
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 29150
- Joined: Tue Nov 29, 2016 2:45 pm
Re: airlift shield firmware upgrade problem
Have you successfully programmed the SerialESPPassthrough.ino sketch onto the Grand Central?
- rickmini
- Posts: 14
- Joined: Mon Jun 25, 2018 1:47 pm
Re: airlift shield firmware upgrade problem
No.
If you look at my post that is my very problem. It fails during upload, you can see the screen dumps. My need is an adafruit expert to tell me what the pins should be defined as in the code. I have searched all of adafruit, and could not find the information. Im using a grand central with an airlift shield
If you look at my post that is my very problem. It fails during upload, you can see the screen dumps. My need is an adafruit expert to tell me what the pins should be defined as in the code. I have searched all of adafruit, and could not find the information. Im using a grand central with an airlift shield
- adafruit_support_carter
- Posts: 29150
- Joined: Tue Nov 29, 2016 2:45 pm
Re: airlift shield firmware upgrade problem
We should first figure out why you can't upload a sketch to the Grand Central.
Have you gone through all the setup and tried to upload a basic Blink example?
https://learn.adafruit.com/adafruit-gra ... rduino-ide
Have you gone through all the setup and tried to upload a basic Blink example?
https://learn.adafruit.com/adafruit-gra ... rduino-ide
- rickmini
- Posts: 14
- Joined: Mon Jun 25, 2018 1:47 pm
Re: airlift shield firmware upgrade problem
So I have spent the past 6 hours trying to get this to work. I will show you my steps. Please respond to my request at the end of the last step, whether or not you want me to try another direction. Here goes:
1. I completely rebuilt my grandcentral with the latest bootloader and latest circuitpython.
2. I started at https://learn.adafruit.com/upgrading-es ... firmware-2
a. followed instructions for airlift shield and was able to run the SerialESPPassthrough.ino file. Here is the output:
b. The windows device manager showed that the port was set to COM25. My understanding is that the grandcentral is now a USB-to-Serial Converter.
Verify successful Done in 0.071 seconds WriteWord(addr=0xe000ed0c,value=0x5fa0004).
The grandcentral's Neopixel is bright white and it is recognized as COM25.
d. The instructions tell you to use https://nabucasa.github.io/esp-web-flasher
It tells you immediately it is no longer supported, and points you to https://espressif.github.io/esptool-js/ I tried using this with Baudrate 115200 but it could not connect to my board as COM25. (note: i could still see that it shows as COM25)
e. I tried the alternative esptool.py . Each try resulted in a timeout. Here is the output:
C:\Users\rickm\AppData\Roaming\Python\Python37\Scripts\esptool.py.exe --port COM25 --before no_reset --baud 115200 write_flash 0 C:\Users\rickm\Downloads\NINA_W102-1.7.4.bin
f: summary: I am still confused by this section from the tutorial that i followed in the arduino code section:
#define NEOPIXEL_PIN 88 // NOTE: this is the only pin that i changed, I have no idea where to find info on the pins above !!! Please provide guidance as to the correct pins that should be used for the Airlift shield on a grandcentral board. Perhaps this is why nothing works??
1. I completely rebuilt my grandcentral with the latest bootloader and latest circuitpython.
2. I started at https://learn.adafruit.com/upgrading-es ... firmware-2
a. followed instructions for airlift shield and was able to run the SerialESPPassthrough.ino file. Here is the output:
Code: Select all
Set binary mode
version()=v1.1 [Arduino:XYZ] Jan 15 2022 11:54:30
Connected at 921600 baud
readWord(addr=0)=0x2000dfe0
readWord(addr=0xe000ed00)=0x410fc241
readWord(addr=0x4)=0x575
readWord(addr=0x41002018)=0x60060000
write(addr=0x20004000,size=0x34)
writeWord(addr=0x20004030,value=0x80)
writeWord(addr=0x20004020,value=0x20008000)
version()=v1.1 [Arduino:XYZ] Jan 15 2022 11:54:30
readByte(addr=0x804000)=0x39
readByte(addr=0x804001)=0x92
readByte(addr=0x804008)=0xff
readByte(addr=0x804009)=0xff
readByte(addr=0x80400a)=0xff
readByte(addr=0x80400b)=0xff
Device : ATSAMD51x20
Version : v1.1 [Arduino:XYZ] Jan 15 2022 11:54:30
Address : 0x0
Pages : 2048
Page Size : 512 bytes
Total Size : 1024KB
Planes : 1
Lock Regions : 32
Locked : none
Security : false
BOD : false
BOR : true
Write 13560 bytes to flash (27 pages)
[ ] 0% (0/27 pages)write(addr=0x20004034,size=0x1000)
writeWord(addr=0x41004014,value=0x4000)
*********** More read writes here then: **********************
read(addr=0x7400,size=0x200)
[==============================] 100% (27/27 pages)
Verify successful
Done in 0.071 seconds
writeWord(addr=0xe000ed0c,value=0x5fa0004)
c. At this point: The arduino code uploaded. the result said:If you have an AirLift ESP32 Breakout Board, you will be turning your existing Arduino-compatible board into a USB-to-Serial-Converter. To do this, you'll need a special Arduino sketch
Verify successful Done in 0.071 seconds WriteWord(addr=0xe000ed0c,value=0x5fa0004).
The grandcentral's Neopixel is bright white and it is recognized as COM25.
d. The instructions tell you to use https://nabucasa.github.io/esp-web-flasher
It tells you immediately it is no longer supported, and points you to https://espressif.github.io/esptool-js/ I tried using this with Baudrate 115200 but it could not connect to my board as COM25. (note: i could still see that it shows as COM25)
e. I tried the alternative esptool.py . Each try resulted in a timeout. Here is the output:
C:\Users\rickm\AppData\Roaming\Python\Python37\Scripts\esptool.py.exe --port COM25 --before no_reset --baud 115200 write_flash 0 C:\Users\rickm\Downloads\NINA_W102-1.7.4.bin
Code: Select all
esptool.py v3.0
Serial port COM25
Connecting.....
Traceback (most recent call last):
File "C:\Users\rickm\AppData\Roaming\Python\Python37\Scripts\esptool.py-script.py", line 11, in <module>
load_entry_point('esptool==3.0', 'console_scripts', 'esptool.py')()
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 3962, in _main
main()
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 3542, in main
args.connect_attempts)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 309, in detect_chip
detect_port.connect(connect_mode, connect_attempts, detecting=True)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 519, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=False)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 499, in _connect_attempt
self.sync()
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 438, in sync
timeout=SYNC_TIMEOUT)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 376, in command
self.write(pkt)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 339, in write
self._port.write(buf)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\serial\serialwin32.py", line 325, in write
raise SerialTimeoutException('Write timeout')
serial.serialutil.SerialTimeoutException: Write timeout
PS C:\Users\rickm> C:\Users\rickm\AppData\Roaming\Python\Python37\Scripts\esptool.py.exe --port COM25 --before no_reset --baud 115200 write_flash 0 C:\Users\rickm\Downloads\NINA_W102-1.7.4.bin
esptool.py v3.0
Serial port COM25
Connecting...
Traceback (most recent call last):
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 386, in command
p = self.read()
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 331, in read
return next(self._slip_reader)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 2636, in slip_reader
raise FatalError("Timed out waiting for packet %s" % waiting_for)
esptool.FatalError: Timed out waiting for packet header
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\rickm\AppData\Roaming\Python\Python37\Scripts\esptool.py-script.py", line 11, in <module>
load_entry_point('esptool==3.0', 'console_scripts', 'esptool.py')()
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 3962, in _main
main()
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 3542, in main
args.connect_attempts)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 309, in detect_chip
detect_port.connect(connect_mode, connect_attempts, detecting=True)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 519, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=False)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 499, in _connect_attempt
self.sync()
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 438, in sync
timeout=SYNC_TIMEOUT)
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\esptool.py", line 402, in command
self._port.timeout = saved_timeout
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\serial\serialutil.py", line 372, in timeout
self._reconfigure_port()
File "C:\Users\rickm\AppData\Roaming\Python\Python37\site-packages\serial\serialwin32.py", line 224, in _reconfigure_port
'Original message: {!r}'.format(ctypes.WinError()))
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: OSError(22, 'The semaphore timeout period has expired.', None, 121)
Code: Select all
#elif !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SerialESP32 Serial1
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define SPIWIFI_ACK 7 // a.k.a BUSY or READY pin
#define ESP32_RESETN 5 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#define NEOPIXEL_PIN 88 // RICK NOTE: this is the only pin that i changed, I have no idea where to find info on the pins above !!!
#endif
- adafruit_support_carter
- Posts: 29150
- Joined: Tue Nov 29, 2016 2:45 pm
Re: airlift shield firmware upgrade problem
For determining pin info, you'd cross compare the pinouts for the AirLift shield with the GrandCentral.
AirLift shield pinouts:
https://learn.adafruit.com/adafruit-air ... or/pinouts
Grand Central pinouts:
https://learn.adafruit.com/adafruit-gra ... al/pinouts
In general, the pin definitions look OK except for GPIO0. Set that to 6. Also note that there is some soldering work that needs to be done to the shield prior to programming the ESP32 module. See the info at the top of the page here:
https://learn.adafruit.com/upgrading-es ... firmware-2
about the ESPGPIO0, ESPRX, and ESPTX pads that need soldering on the back of the shield.
AirLift shield pinouts:
https://learn.adafruit.com/adafruit-air ... or/pinouts
Grand Central pinouts:
https://learn.adafruit.com/adafruit-gra ... al/pinouts
In general, the pin definitions look OK except for GPIO0. Set that to 6. Also note that there is some soldering work that needs to be done to the shield prior to programming the ESP32 module. See the info at the top of the page here:
https://learn.adafruit.com/upgrading-es ... firmware-2
about the ESPGPIO0, ESPRX, and ESPTX pads that need soldering on the back of the shield.
- rickmini
- Posts: 14
- Joined: Mon Jun 25, 2018 1:47 pm
Re: airlift shield firmware upgrade problem
I finally got everything to work and I wanted to document the steps so that others could save half a man day of wasted time, and to suggest that adafruit update their documentation to include specifics for the airlift shield for grandcentral and any other boards not defined in the arduino sketch.
Follow https://learn.adafruit.com/upgrading-es ... e?view=all and then use the following to clarify or replace steps
Please note that this was a windows 10 system that i used and mac and linux
systems differ from this in some areas.
Step 1. Update the grand central bootloader and then jumper pins on the Airlift shield. The documentation is confusing. The 3 pads that need to be jumpered are the ones that look like downward arrows TX,RX,GPIO0
Step 2. Modify the SerialESPPassthrough.ino code
- around line 70 look for this elif and change this section as below:
#elif !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// THESE ARE SPECIFIC TO The Grandcentral board:
#define SerialESP32 Serial1
#define SPIWIFI SPI // The SPI port
#define SPIWIFI_SS 10 // Chip select pin
#define ESP32_RESETN 5 // Reset pin
#define SPIWIFI_ACK 7 // a.k.a BUSY or READY pin
#define ESP32_GPIO0 6
#define NEOPIXEL_PIN 88
#endif
upload this code to your grandcentral
find out which Serial port your board presents, it will change after this step (i have windows, so i used device manager)
Step 3:
Download NINA_W102-1.7.4.bin or a later version from adafruit
Step 4:
Dont follow the adafruit suggestions for the final step of uploading the firmware to the ESP32, they wont work, most of the links are dead. Instead, get the esptool from Espressif, install it, and use it do upload the NINA_xxx.bin to the ESP32
Update the firmware on the Airlift shield using esptool.py
C:\Users\rickm\AppData\Roaming\Python\Python37\Scripts\esptool.py.exe --port COM24 --before no_reset --baud 115200 write_flash 0 C:\Users\rickm\Downloads\NINA_W102-1.7.4.bin
Obviously replace my paths with yours:
C:\Users\<rickm>\AppData\Roaming\Python\Python37\Scripts\esptool.py.exe
C:\Users\<rickm>\Downloads\NINA_W102-1.7.4.bin
I hope that this will help others to upgrade their Airlift to use the latest Wifi and Bluetooth.
Follow https://learn.adafruit.com/upgrading-es ... e?view=all and then use the following to clarify or replace steps
Please note that this was a windows 10 system that i used and mac and linux
systems differ from this in some areas.
Step 1. Update the grand central bootloader and then jumper pins on the Airlift shield. The documentation is confusing. The 3 pads that need to be jumpered are the ones that look like downward arrows TX,RX,GPIO0
Step 2. Modify the SerialESPPassthrough.ino code
- around line 70 look for this elif and change this section as below:
#elif !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// THESE ARE SPECIFIC TO The Grandcentral board:
#define SerialESP32 Serial1
#define SPIWIFI SPI // The SPI port
#define SPIWIFI_SS 10 // Chip select pin
#define ESP32_RESETN 5 // Reset pin
#define SPIWIFI_ACK 7 // a.k.a BUSY or READY pin
#define ESP32_GPIO0 6
#define NEOPIXEL_PIN 88
#endif
upload this code to your grandcentral
find out which Serial port your board presents, it will change after this step (i have windows, so i used device manager)
Step 3:
Download NINA_W102-1.7.4.bin or a later version from adafruit
Step 4:
Dont follow the adafruit suggestions for the final step of uploading the firmware to the ESP32, they wont work, most of the links are dead. Instead, get the esptool from Espressif, install it, and use it do upload the NINA_xxx.bin to the ESP32
Update the firmware on the Airlift shield using esptool.py
C:\Users\rickm\AppData\Roaming\Python\Python37\Scripts\esptool.py.exe --port COM24 --before no_reset --baud 115200 write_flash 0 C:\Users\rickm\Downloads\NINA_W102-1.7.4.bin
Obviously replace my paths with yours:
C:\Users\<rickm>\AppData\Roaming\Python\Python37\Scripts\esptool.py.exe
C:\Users\<rickm>\Downloads\NINA_W102-1.7.4.bin
I hope that this will help others to upgrade their Airlift to use the latest Wifi and Bluetooth.
- adafruit_support_carter
- Posts: 29150
- Joined: Tue Nov 29, 2016 2:45 pm
Re: airlift shield firmware upgrade problem
Cool. Glad you figured it out. Also just got done checking things here to verify it all generally works. There are several different AirLift form factors all of which can be used on numerous host controllers. That one Learn page is trying to cover all scenarios in one place, which is potentially confusing.
The web based tools are linked as an "easier" GUI option while also avoiding downloading anything (esptool). They are not Adafruit maintained tools though. The nabucasa one linked from the guide still generally seems to work for people, despite the banner callout linking to the esptool-js one.
Using esptool.py is more straight forward as long as one is OK running command line stuff.
Please submit all that info to the guide feedback so the author will get notice. Look for the link in the left hand navigation on the Learn guide.
The web based tools are linked as an "easier" GUI option while also avoiding downloading anything (esptool). They are not Adafruit maintained tools though. The nabucasa one linked from the guide still generally seems to work for people, despite the banner callout linking to the esptool-js one.
Using esptool.py is more straight forward as long as one is OK running command line stuff.
Please submit all that info to the guide feedback so the author will get notice. Look for the link in the left hand navigation on the Learn guide.
Please be positive and constructive with your questions and comments.