adafruit / Adafruit_FONA

Arduino library for the Adafruit FONA
https://www.adafruit.com/products/1946
211 stars 237 forks source link

Dynamically setting GPRS APN Settings #45

Open WillJonesMagic opened 8 years ago

WillJonesMagic commented 8 years ago

APN Settings appear to need to be burned into the code at runtime and don't support being set from variables or values stored in the EEPROM. I need to be able to send an SMS containing the APN settings to the device and have it store the values and have them persist through a reboot. There's quite possibly something obvious I'm missing here but I've not been able to solve this one.

feinstein commented 8 years ago

@WillJonesMagic I have a problem like yours in my project, so I made a modification in the library and now (actually as soon as they approve it) you can pass the APN settings both by burning it into code or by calling a function, it's on my pull request #50.

This way you can send an SMS, read it, parse it in code, and pass it to FONA.

WillJonesMagic commented 8 years ago

@feinstein I tried your code, but the GSMLoc function appears to be broken. I get failure code 601 whenever I try to query the GSMLoc. GPS works fine though.

feinstein commented 8 years ago

@WillJonesMagic I think I know what the problem is. Will fix this and let you know.

feinstein commented 8 years ago

@WillJonesMagic I have fixed the code and tested it here, can you confirm if it's working for you?

WillJonesMagic commented 8 years ago

@feinstein Perfect! Thank you!