Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 5 months ago.
I can't understand what is the problem
I can't understand what is the problem
in the library, they write down this "bool init (const char *simpin=NULL, DevStatus *status=NULL, PinName pn MDM_IF(=MDMPWRON,=D4)) register (Attach) the MT to the GPRS service
I want to solve this problem please help me
Question relating to:
3 Answers
10 years, 5 months ago.
I think you need to enclose the 1234 in quotes, i.e #define SIMPIN "1234". You will then need to convert SIMPIN to an integer in the assignment of USIM on the line that follows.
10 years, 5 months ago.
Ken and Michael are correct with the definition of SIMPIN and PASSWORD. If you want to define them as strings then you need put quotes there.
Additionally, the initialization of the buf variable is strange (although it is not the indicated error message). If you want to initialize it to all zeros then you might want to either use
char buf[512] = {0};
or
memset(buf, 0, 512);