Swan and CircuitPython

Following the directions here for CircuitPython: Swan Quickstart, my Swan board populates as a SWANBOOT drive on my Windows 10 PC. When I copy the circuitpython-swan_r5.uf2 file to the SWANBOOT drive the drive does not populate as a CIRCUITPY drive. Instead, the SWANBOOT drive just disappears.

If I unplug and re-plug the Swan board, the drive does not populate. If I double tap the reset button it populates as a SWANBOOT drive.

I have put the board back into boot mode and reloaded the tinyuf2-swan_r5.bin file using the command: dfu-util -s 0x8000000:leave -a 0 -D tinyuf2-swan_r5.bin. Again, the Swan board populates as a SWANBOOT drive and if I copy the circuitpython-swan_r5.uf2 file again, the board does not populate as a CIRCUITPY drive. Rinse and repeat…

Any ideas where I am going wrong?

Hey @noskman thanks for the question, and welcome to the community, we’re glad you’re here!

Sorry you’re having some issues getting the Swan up and going. I see that double-clicking RESET puts the swan back in bootloader mode, which is expected. Have you tried just clicking RESET once instead of removing power from the swan?

Also, what OS are you using?

Hey @bsatrom - Thanks for the speedy reply. Blues Wireless is terrific, you guys really hit the mark!

*Yep, I tried hitting RESET just once, forget to mention that, with no affect doing it.
*I am on Windows 10 Pro (64 bit).
*One more note, when I unplug and plug in the USB cable, I also see a single amber LED flash

1 Like

You’re welcome @noskman, happy to help! I don’t have Windows for my setup, but I’ll ask someone on the team who does to take a look tomorrow and we’ll get back to you.

Hi There @noskman! Thank you for reporting this. I sorry for the troubles you’re having, we’ll try to get to the bottom of it.

I’d like you to save a copy of your Swan’s memory. To do this,

  1. please put your device in bootloader mode
    Hold BOOT, then tap RESET once while still holding boot
  2. Then run
    dfu-util -s 0x8000000:0x200000 -a 0 -U swan_mem.bin

I’ll send you a PM with how to send the file to me.

I’m sure you’re eager to get started, so as a quick fix, you can try the previous release on the Github releases page. The CircuitPython support is the same, the only difference is that it doesn’t include the UF2 bootloader. Hopefully that will work for you so you can start using CircuitPython.

1 Like

Thanks @noskman for sending the memory file. When I flashed it to my device I saw the CIRCUITPY drive appear, and I could make the SWANBOOT drive appear to with a double reset, and then back to the CIRCUITPY drive with a single reset.

I’m at a bit of a loss to explain why it’s not working for you. The USB stacks in the bootloader and CircuitPython are essentially the same.

It would be helpful if you could try the previous release that I mentioned above. That will give me another datapoint. I’ll also look into ways we can try to dive deeper into what is happening with USB.

In Control Panel, Device Manager, I see 3 devices associated with Swan - the storage device, the COM port and a WebUSB device.

image

I’m wondering what do you see when your Swan is connected and not showing SWANBOOT?

Hi Matt,

I did try the previous release with identical results.

My SWANBOOT drive looks like this:
image

And my Device Manager looks like:

A single RESET and the SWANBOOT drive disappears as does the Adafruit UF2 Bootloader USB Device from Disk Drives in the Device Manager:
dev mgr no adafruit

Thank you @noskman for those details! With the previous release not working too, that means for some reason the USB stack for CircuitPython is not working on your machine.

I have a few questions to help troubleshoot:

  • Do any of the other devices (serial port, WebUSB) appear in your device manager?

  • What’s the exact version of Windows you’re using?

  • Are you using a USB hub? If you are, which one? If you have a different hub, perhaps try that.

We will continue investigating here in the meantime, but presently we aren’t able to replicate the issue, but we’ll keep looking!

1 Like