I recently purchased a new Arduino Giga R1 Wifi board. I am trying to find a way to wirelessly program this board over Bluetooth. I realize that I could easily achieve this using the ArduinoOTA library or using the Arduino Cloud IDE. However, these both require connecting the board to the Internet. Unfortunately, my university requires users to enter our username and password to connect to the network, and I do not see any way to provide this information to the Wifi library to do this (if I'm wrong and there is a way, please let me know), so I'm looking for a solution that does not require using the Internet.
I then did extensive research and was able to develop a method to wireless download code over Bluetooth using the HC-05 using the Arduino Mega 2560 Rev3 by following this guide. Based on the specifications of the Giga and Mega, I expected that this method would work on the Giga R1 Wifi as well, but that does not seem to be the case.
The HC-05 module is able to successfully communicate with the Giga and I was able to achieve communication over Bluetooth to the Arduino. However, when I try to upload a sketch using the Arduino IDE, I get the following error:
Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release
No DFU capable USB device available
The method I use makes the following assumptions, so I would appreciate if someone could verify the following statements. If any of these statements are incorrect for the Arduino Giga R1 Wifi, that will most likely be the issue:
The RESET pin on the Arduino Giga R1 Wifi is active low (it will reset when a 0 is applied to that pin).
The board can be programmed from pins RX1/TX1 instead of using the USB-C port.
Also, if there are any other methods that would enable wireless sketch uploading without using Wifi, I would love to hear about those.
I might not have been super clear in my initial post, so my apologies for that. I know that I can connect the board to WiFi using this method. However, I believe this would restrict me to always using the Arduino Cloud IDE. I also would have to keep reconfiguring the board every time that I move it from school to home and back.
If there was a way I could do this in code however, that would make it much more practical. I could simply write code that tries multiple networks in order until it finds one that works (so check school network, if failed then check home network, etc.). The main issue is that the WiFi library only provides an option to connect using a network id and password. At school, I have to provide a network id, my student id, and my password. I don't see any way to input all that information...
Ok, I see you are asking for two things. I am fairly sure there is no way other than the one you know of changing the network credentials in the cloud. But you also have the problem of needing to supply a student id at your school location. The school would have to remove that requirement. Your title and original post are very different from this, you might get more answers if you changed the title, and deleted the first post so this most recent post is the real problem(s) to be solved although I can't see a way myself.
While I am certainly open to learning more about the WiFi option, my primary objective is still to figure out how to achieve wireless Bluetooth uploading using the HC-05. I am trying to determine why the method I linked above is not working. The method I used makes the above assumptions about the properties of the board. However, I was unable to verify these statements in the documentation about the board, which is why I asked here to see if someone can verify these statements.
That is correct. Uploads work completely differently on the Mega 2560 board. A program called a "bootloader" is stored in a special area of memory in the board's microcontroller. The Mega 2560 has a bootloader that communicates via the board's UART (serial) interface and writes the sketch program data received via that interface to the memory on the microcontroller when you perform an upload. The HC-05 also has a UART interface. This means that you can use the HC-05 to upload to the Mega 2560 by connecting it to the UART interface on pins 0 and 1 of the Mega 2560.
Uploads to the GIGA R1 WiFi are done through a DFU (device firmware upgrade) interface. This occurs via a direct connection between the computer's USB and the microcontroller on the GIGA R1 WiFi, not via the UART. So the upload process won't work if you try to do it by simply connecting the HC-05 to the UART interface of the GIGA R1 WiFi and then performing a standard upload.
In theory, it should be possible to upload to the GIGA R1 WiFi via UART, but this would be a very complex endeavor. I think you might be better off focusing on trying to find a way to use the better supported "OTA" upload.
The GIGA would need to act as a USB host in order to communicate via the adapter, not a USB device as it is during the upload (and in communication via the USB C socket in general).
Serial port communication is not used to upload to the GIGA, so even if it was able to act as a host for the port produced by the adapter, it still wouldn't provide the DFU mechanism that is used to upload to the board.
Thank you for the in-depth responses @ptillisch . Your answers provided a much-needed explanation of how sketch uploading works on the Giga.
Since Bluetooth does not appear to be an option here, I will do further experimentation with WiFi-based OTA methods and report back if I have any success. My goal is to be able to perform wireless uploading using PlatformIO or with the arduino CLI locally from my computer. There has been discussion on the forum about that in the past that use the ArduinoOTA library, but this requires a simpler network connection that does not require an individual student user ID and password.
You are welcome. I'm glad if I was able to be of some small assistance.
If you have a smart phone, you could try setting up the phone as a Wi-Fi hotspot and connecting the GIGA R1 WiFi and the local uploading computer to that hotspot instead of to the school's network.
@ptillisch Could you find out why the GIGA WiFi lib doesn't currently have WPA2-Enterprise support? Is it technically not possible with the wifi chip? I've seen numerous posts looking for it and trying, unsuccessfully, to use WiFiNINA - which does support it. Thanks.