In my last post regarding the Electron.js, we were able to fix the issues thanks for the help! Now during the testing, with a photon (v0.7.0), the usb commands are not working. The error is IN control transfer failed: LIBUSB_TRANSFER_STALL. The commands we tried are particle usb dfu and particle usb start-listening.
After updating the system firmware, the usb commands are working fine. The particle serial wifi --file wifiCred.json command stopped working with v1.2.1.
The physical access to the buttons is not possible. Setting the baud rate to put the device in dfu mode also not working with ubuntu.
It would be great if you guys could help with putting the device in DFU mode through CLI and setting WiFi credentials through JSON. We are using ubuntu 18.04, nodejs version 10.16.3 and particle-cli 1.43.3.
That’s not surprising since USB Control Requests were only introduced with some 0.8.0-rc.x.
But you can use the USB Serial baudrates 14400 and 28800 with some tweaks @nrobinson2000 knows more about - or just temporarily move to a Windows machine and update your device.
If your device is cloud connected you could also OTA flash some firmware that provides a function to enter Safe and/or DFU Mode.
Thanks for confirming @ScruffR. Is there anyway to put the device in DFU and listening mode through CLI for 0.7.0? The WiFi credentials set from JSON is not working in 1.2.1 for us.
Setting the buad rate to put the device in DFU and listening mode seems like not working
(Some) Linux distros don't support "exotic" baudrates by default, so you'd either need to tweak Linux to accept other baudrates or alter the device OS to listen for a different (standard) baudrate.
Could you please try setting the wifi with the JSON file in 1.2.1? We are not able to do it in Ubuntu and Mac OS. Thanks, I will try on tweaking Linux to accept different baud rates.
Once you have 1.2.1 on your device you shouldn’t need the baudrate tweaks anymore as USB Control Requests are supported there already and particle usb dfu whould do the job.
Can you post a (sanitised) version of your WiFi creds JSON file to see what may be wrong?
Is the WiFi network present and visible at time of setup?
Also what mode was your device at the time of sending the creds to the device?
Once you have 1.2.1 on your device you shouldn’t need the baudrate tweaks anymore as USB Control Requests are supported there already and particle usb dfu whould do the job.
Yes, which is working fine for us.
This is the WiFi credentials we use. {"network":"name","security":"WPA2","password":"Password15"}
Is the WiFi network present and visible at time of setup?
Yes, it is and working for 0.7.0.
Also what mode was your device at the time of sending the creds to the device?
I can see at least one mistake in your JSON
And the solution to that I have already given you nine days ago in another thread of yours.
I don’t mind repeating the same thing over and over between different users, but having to repeat the same thing for the same user in just over one week becomes tiring.
Make sure your currently installed firmware doesn’t claim the USB Serial interface (e.g. by use of SYSTEM_THREAD(ENABLED) and your host computer is not otherwise using the serial port (e.g. another instance of particle serial monitor --follow or any other serial terminal).
To prevent your firmware from interfering you could either go into Safe Mode before engaging Listening Mode (aka Safe Listening Mode) or flash some dummy code that does nothing with Serial at all.