0

Adafruit Feather 32u4 not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Feather 32u4 not working

by Jakub_Nagy on Thu Feb 14, 2019 7:24 am

Hi,
I'm having problems uploading sketches to the Adafruit Feather 32u4 RFM95 LoRa Radio. I realise this is a begginer problem, but the troubleshooting I found didn't help. I tried uploading from two computers (both Windows and MAC) and I tried selecting both various programers and boards.

I can upload sketches like 1 in 20 tries, it seems pretty random when and with what settings. I succesfully uploaded the blink sketch with programmer "AVR ISP" and the "Adafruit Feather 32u4" board selected. This works sometimes for some sketches.

Mostly I get the error "avrdude: butterfly_recv(): programmer is not responding". On the https://learn.adafruit.com/adafruit-feather-32u4-adalogger/faq help page there is written that this means that the wrong COM port is selected. I checked the port in device manager, I'm certain that it's the right one.

Also, I get this "avrdude: ser_open(): can't open device "\\.\COM14": The system cannot find the file specified" and this "avrdude: ser_recv(): read error: The device does not recognize the command." error.

I press the reset button every time I upload. This shouldn't be necessary every time but it is for me.

Any ideas?

Jakub_Nagy
 
Posts: 11
Joined: Thu Feb 14, 2019 5:59 am

Re: Adafruit Feather 32u4 not working

by adafruit_support_carter on Thu Feb 14, 2019 4:17 pm

Does pressing reset allow you to upload successfully everytime? Or does that process also sometimes fail to upload?

adafruit_support_carter
 
Posts: 10966
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Feather 32u4 not working

by Jakub_Nagy on Fri Feb 15, 2019 5:19 pm

I got it to work. I had to connnect it to a different port and press the reset button 4 times at exact times of the upload. First, when the upload starts, I press it two times and then, when it starts detecting COM ports I press two times again. This way it works nearly every time.

But I also got problems with connecting to LoRa. I'm using the ttn-abp example. The only thing that shows up on the serial monitor is "Starting" and "Packed queued" and no data gets transmitted. I'm trying to upload the data to thethingsnetwork. Any ideas on that? I'm not even sure what the sketch should write on the serial monitor.

Jakub_Nagy
 
Posts: 11
Joined: Thu Feb 14, 2019 5:59 am

Re: Adafruit Feather 32u4 not working

by adafruit_support_carter on Fri Feb 15, 2019 5:25 pm

Can you link to the example your are running.

adafruit_support_carter
 
Posts: 10966
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Feather 32u4 not working

by IUnknown on Fri Feb 15, 2019 5:39 pm

I'm having a similar problem, only I cannot get it to work ever. The sketch (Blink) compiles, then it says Upload.... basically forever. The Feather M0 Basic Proto shows up attached to COM7, and if I do Get Board Info I get this back:

BN: Adafruit Feather M0
VID: 239A
PID: 800B
SN: 64C511C35150484347202020FF0C1B35

It works on another computer, though on that one the USB resets every time after upload. Windows 10 Enterprise Edition, October 2018 update.

If I double-click the Reset button then I get a drive mounted, with 3 files, but that window disappears immediately.

IUnknown
 
Posts: 8
Joined: Tue Jan 29, 2019 8:06 pm

Re: Adafruit Feather 32u4 not working

by adafruit_support_carter on Fri Feb 15, 2019 5:40 pm

@IUnknown Please start a new thread for your issue.

adafruit_support_carter
 
Posts: 10966
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Feather 32u4 not working

by Jakub_Nagy on Fri Feb 15, 2019 5:53 pm

I'm running the ttn-abp example from the MCCI LoRaWAN LMIC library as suggested in here: https://learn.adafruit.com/the-things-network-for-feather/overview

It says: "Starting\n Packet queued" then there is about 20-60 second delay and it says "2368648: EV_TXCOMPLETE (includes waiting for RX windows)" but also "FAILURE C:\Users\U⸮⸮vate⸮\Documents\Arduino\libraries\arduino-lmic-master\src\lmic\lmic.c:1889" so I'm not sure if the TX is actually complete or if it's a failure. I'm confused. There isn't any data on thethingsnetwork console.

Jakub_Nagy
 
Posts: 11
Joined: Thu Feb 14, 2019 5:59 am

Re: Adafruit Feather 32u4 not working

by adafruit_support_carter on Fri Feb 15, 2019 6:10 pm

Here's the code listing for the example:
https://github.com/mcci-catena/arduino- ... tn-abp.ino

You're getting to the point where it's sending out something:
https://github.com/mcci-catena/arduino- ... p.ino#L181

During that 20-60 second delay, is the little red LED blinking? The loop() part of the code has a heart beat that blinks it every half a second.

adafruit_support_carter
 
Posts: 10966
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Feather 32u4 not working

by Jakub_Nagy on Sat Feb 16, 2019 3:11 am

Yeah, that's the code.

The LED does blink. Also, sometimes the " EV_TXCOMPLETE " doesn't show up at all.

BTW my current wiring is just jumper from pin 6 to io1.

I tried it again and now it shows a timestamp before the message. So it looks like this: "08:01:09.043 -> 2392585: EV_TXCOMPLETE (includes waiting for RX windows)"

Now, I'm just trying to figure out if I'm just too far away from the gateway (or I have a wrong antenna) or if it's a software issue. The closest I've been to a gateway was about 1km in the city centre so it might just be that it's trying to send the data but the signal just isn't strong enough. But the "FAILURE C:\Users\U⸮⸮vate⸮\Documents\Arduino\libraries\arduino-lmic-master\src\lmic\lmic.c:1889" suggests that there is a problem somewhere in the library. But if the feather is working, I can travel as close to a gateway as possible and test it there but before that I need to know if the feather is working properly.

Jakub_Nagy
 
Posts: 11
Joined: Thu Feb 14, 2019 5:59 am

Re: Adafruit Feather 32u4 not working

by Jakub_Nagy on Sat Feb 16, 2019 4:06 am

Oh, I just found out that I should use the tinylora library from Adafruit instead for the Feather 32u4. I'm using this tutorial: https://learn.adafruit.com/the-things-network-for-feather/using-a-feather-32u4

Now the output looks like this:
lora.JPG
lora.JPG (45.81 KiB) Viewed 114 times


The data doesn't show up on thethingsnetwork console but there are no errors in the serial monitor so I'm travelling to the nearest gateway to test it.

Jakub_Nagy
 
Posts: 11
Joined: Thu Feb 14, 2019 5:59 am

Re: Adafruit Feather 32u4 not working

by Jakub_Nagy on Sat Feb 16, 2019 1:08 pm

So I was about 100m from the gateway and it didn't work. What do you think?

Jakub_Nagy
 
Posts: 11
Joined: Thu Feb 14, 2019 5:59 am

Re: Adafruit Feather 32u4 not working

by Jakub_Nagy on Mon Feb 18, 2019 6:44 am

Anyone?

Jakub_Nagy
 
Posts: 11
Joined: Thu Feb 14, 2019 5:59 am

Re: Adafruit Feather 32u4 not working

by adafruit_support_carter on Mon Feb 18, 2019 2:46 pm

Good catch on the 32u4 different process. Did you go through all that application registration process as well?
https://learn.adafruit.com/the-things-n ... -ttn-setup

BTW my current wiring is just jumper from pin 6 to io1.

Another 32u4 difference - this is not needed for the 32u4 wiring.

adafruit_support_carter
 
Posts: 10966
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit Feather 32u4 not working

by Jakub_Nagy on Mon Feb 18, 2019 4:11 pm

Yeah, I have set 16 bit ABP and disabled frame counter checks.

Another 32u4 difference - this is not needed for the 32u4 wiring.
I noticed that but because of different instructions in different tutorials, I tried it both with and without the jumper.

One important thing. I'm in Europe. I use this line of code to set my location to Europe:
Code: Select all | TOGGLE FULL SIZE
#define CFG_eu868 1
I don't know if it's correct because that should be used with the other library for the Feather M0 but I haven't found how to set location with the tinylora library so I used this. It compiles correctly. Is this right?

I tried two antennas. One was a simple wire antenna as in the tutorial. I also tried a spring antenna though it is tuned for 433MHz.

Jakub_Nagy
 
Posts: 11
Joined: Thu Feb 14, 2019 5:59 am

Re: Adafruit Feather 32u4 not working

by Jakub_Nagy on Mon Feb 18, 2019 4:49 pm

Oooh, I found this line of code
Code: Select all | TOGGLE FULL SIZE
lora.setDatarate(SF7BW125);

And I found this documentation page https://www.thethingsnetwork.org/docs/lorawan/frequency-plans.html

Could it help?

Jakub_Nagy
 
Posts: 11
Joined: Thu Feb 14, 2019 5:59 am

Please be positive and constructive with your questions and comments.