I am trying to send a code to the photon through serial (WIFI off). The script sends fine when using the command “particle flash --serial app.ino” when the WIFI is on but I am unable to send it when the WIFI is off which is integral to my project. It recognizes that there is something connected via serial but can’t send the code. In my reading, I find that I may have to send this as a .bin file…? If this is the case, how do I convert my .ino file to a bin file. If this is not the case, then can someone please tell what I am missing. Thank you in advance!
In default SYSTEM_MODE(AUTOMATIC) your code will never start running if you have no valid cloud connection.
But if you mean uploading firmware, you always flash a binary and never a script.
I’ve never sent a .ino via --serial and I’m pretty sure that won’t work.
When you execute particle flash <deviceID> app.ino you actualy send the source code to the cloud to build and it in turn OTA flashes the binary to the device you specified via <deviceID>.
If you want to flash with --serial you can build with Web IDE and download the binary or use particle compile photon app.ino to get the code built online and get the binary sent back to you for subsequent offline flashing.
For --serial your device should be in Listening Mode (blinking blue).
Hello! Thank you so much for the reply. I have downloaded the firmware.bin file and attempted to flash while the particle was offline using “particle flash --serial firmware.bin” while the device is blinking blue. I received the error: ! serial:
Error writing firmware…Transfer cancelled
undefined
I also tried sending through usb while the device is in listening mode and am not able to do so. I have gone through the process of installing the dfu-util driver.
I am sorry, I wrote that wrong. I had it in dfu mode (blinking yellow) and was not able to flash the device using “particle flash --usb firmware.bin”. I installed the dfu-util driver. Is there another driver I am missing?
I am able to see the serial port when it is listening mode by calling “particle identify”.
dfu-util is not a driver. It's a uitility that would transfer the binaries via the driver to a DFU device.
But when you install CLI, the dfu-util is installed with it, so no need to do that manually.
But since you haven't answered this question, it's not clear how to help you with locating the actual DFU drivers