Skip to content

APN issue #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jlcook83 opened this issue Dec 23, 2014 · 1 comment
Closed

APN issue #21

jlcook83 opened this issue Dec 23, 2014 · 1 comment

Comments

@jlcook83
Copy link

While trying to set APN information such as:

fona.setGPRSNetworkSettings(F("internet.com"), F("wapuser1"), F("wap"));

the following compile error occurs

Arduino: 1.5.6-r2 (Mac OS X), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6/crtm2560.o: In function __vector_default': (.vectors+0xcc): relocation truncated to fit: R_AVR_13_PCREL against symbol__vector_51' defined in .text section in /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6/crtm2560.o

The code compiles fine when the last part of the call (password field) is changed to at least 4 characters long.. and MUST contain a space. Example:
fona.setGPRSNetworkSettings(F("internet.com"), F("wapuser1"), F("wap 1"));

Unfortunately i need the password to be 3 chars and NO spaces...

I can't seem to understand the problem to fix it...

@tdicola
Copy link
Contributor

tdicola commented Dec 24, 2014

This is a tricky one because it's likely from a bug in the compiler (see this thread for a little more background and info: arduino/Arduino#1071). Unfortunately it's not related to the FONA library and is a side affect of the code & flash memory taking up enough space to slightly change the linker's behavior.

One thing to try as a workaround, can you see if using Arduino 1.5.8 beta and it's newer compiler works? This likely has a lot more bug fixes and optimizations that should reduce the change of these kinds of issues occuring.

Another workaround is to add or remove variables to change the flash memory usage enough that it doesn't trigger the linker bug. Try the Arduino 1.5.8 version first though as that should fix the issue at the source.

@tdicola tdicola closed this as completed Dec 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants