GSM module EB066: initialise problem

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

MJU
Posts: 435
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 108 times
Been thanked: 95 times
Contact:

GSM module EB066: initialise problem

Postby MJU » Sun Feb 09, 2014 6:43 pm

I've hooked a brandnew EB066 GSM module to my multiprogger, and this contains a 16F877A.
The GSM board is connected to +5V and (as stated in the datasheet), the VPWR to the +14V terminal on the multiprogrammer.
The PIC uses the standard Xtal: 19660800Hz.

I have problems getting the module initialised.

I've made two flowcharts (in V5.5.. and V6.04) which do nothing more than start a LCD and initialise the GSM module.
If I look at the response from the initialise command, most of the time it returns 254 (in V5) and sometimes 43 (in V6).

Strange thing between the component in V5 and 6 is that in V5 I need to specify the connections for CTS and RTC (C4 and C3)
In V6 I need to specify the connections for TX and RX. (C6 and C7).
Strange because I would think that Flowcode would know the standard UART pins on the controller and use these.

First question: why the difference between V5 and V6 in connections? (should RX and TX in V6 not ben CTS and RTC)?

eigenschappen2.jpg
eigenschappen2.jpg (32.08 KiB) Viewed 6688 times
eigenschappen3.jpg
eigenschappen3.jpg (45.55 KiB) Viewed 6688 times



I've tried to change the setting for the channel in V6 from "channel 1" to "software", but this doesn't work.
The drop down box changes back to "channel 1". (please get us back to the pop-up screens from V5 :? )

Question 2: is there a reason why I can't change the channel to "software"?

Then when I give the initialise command, I get 254 back.
What is this code? Has this something to do with the SIM card I use?

I've tried two several cards: Proximus Pay And Go and Mobile Vikings.
Both are "pay as you go" cards.
Still no LED on the board that starts flickering.

If I issue a "AT#SLED=2" send command, the LED on the board lights up so I think the UART works?
Is this conclusion right?

I need help with this one.
The Wiki about this module is less helpful than the help file in V5.
So maybe this could be a concern for the people @ Matrix to work on the Wiki.
Now there is a lot of information on the user forum, but this isn't structured enough to get me past this problem.

BTW: while trying to change the channel into "software" it seems I erased the "software" option in the settings.
Is the setting for software "000" in the channel the right one?
eigenschappen1.jpg
eigenschappen1.jpg (29.37 KiB) Viewed 6688 times


Please any help is more than welcome!

User avatar
Benj
Matrix Staff
Posts: 14576
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4603 times
Been thanked: 4241 times
Contact:

Re: GSM module EB066: initialise problem

Postby Benj » Mon Feb 10, 2014 11:11 am

Hello,

First question: why the difference between V5 and V6 in connections? (should RX and TX in V6 not ben CTS and RTC)?


Set the Flowcontrol property to Yes and the Flow control I/O pins will appear allowing you to configure them.

Question 2: is there a reason why I can't change the channel to "software"?


The GSM component uses an interrupt method for receiving to try and make it very reliable. This interrupt is not available in software mode and so software mode is not available for this component.

What is this code? Has this something to do with the SIM card I use?


I'll have a look into what this return code means for you.

If I issue a "AT#SLED=2" send command, the LED on the board lights up so I think the UART works? Is this conclusion right?


Yes this is correct, if the LED starts flashing then comms have been accepted, the LED will not light by default.

We are working on overhauling the wiki at the moment and there is still a fair bit to go but hopefully over the course of the next couple of weeks we will start to fill in all the remaining holes.

User avatar
Benj
Matrix Staff
Posts: 14576
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4603 times
Been thanked: 4241 times
Contact:

Re: GSM module EB066: initialise problem

Postby Benj » Mon Feb 10, 2014 11:28 am

Initialise return values.

255 = Cmd1 No reply Received
254 = Cmd1 Reply received but not "OK"
253 = Cmd2 No reply Received
252 = Cmd2 Reply received but not "OK"
0 = Init OK

You might want to try and call the init routine in a loop until you get the 0 reply?

Let me know how your getting on.

MJU
Posts: 435
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 108 times
Been thanked: 95 times
Contact:

Re: GSM module EB066: initialise problem

Postby MJU » Tue Feb 11, 2014 1:08 am

Thank you BenJ,

I checked the "flowcontrol" to Yes and I found that the CTS/RTS pins were dedicated to the B-port (instead of like the TX-RX on the C port).
Maybe this could be something to change in next updates? If the RX-TX pins are on a a certain port, the (hidden CTS/RTS) would change to the same port?

I've tried several things but the best was the 43 reply to the initialise command.
I had the initialise command in a loop until I received a 0, but it would get past the loop.

In the beginning of this evening I got beyond the initialise. But something went wrong and all the attempts after that returned 43 or 254..

I checked that the Xtal/RC switch worked well (this is a recurring problem), the LCD works and I sometimes get the LED on the EB066 flashing.

I have tried lots of things, but the board won't initialise...
:-(

Could somebody try to make a simple flowchart with an 16F877A/LCD on port A, EB066 on port C?

User avatar
Benj
Matrix Staff
Posts: 14576
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4603 times
Been thanked: 4241 times
Contact:

Re: GSM module EB066: initialise problem

Postby Benj » Tue Feb 11, 2014 12:43 pm

Hello,

I'm surprised your getting the LCD working at all on PortA using a 16F877A microcontroller. Pin RA4 is an open drain type pin and so cannot source current. Moving to PortB you might have more luck.

Also here is attached the test routine for the board, the hex file is known to work so you can use PPP to program the hex file as a sanity check without compiling.
Attachments
Factory Test Routine.zip
(18.39 KiB) Downloaded 231 times

MJU
Posts: 435
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 108 times
Been thanked: 95 times
Contact:

Re: GSM module EB066: initialise problem

Postby MJU » Tue Feb 11, 2014 4:36 pm

Hello BenJ,

Benj wrote:I'm surprised your getting the LCD working at all on PortA using a 16F877A microcontroller. Pin RA4 is an open drain type pin and so cannot source current. Moving to PortB you might have more luck.


Life is full of surprises isn't it?
No, I've never thought about this, I always use LCD's on Port A, they alway work :-)
But now you gave me something more to think about.

Benj wrote:Also here is attached the test routine for the board, the hex file is known to work so you can use PPP to program the hex file as a sanity check without compiling.


I tried to upload the HEX file to the PIC, but PPP says it's for 18F4550 (not for 16F877A).
I took the flowchart and send this to the chip but I only get a "254" error reply.
I've tried two SIM cards.

I could try a third one but then I need to convince my wife to let me use hers (and that will take lots of persuasion) ...
If you never hear from me again, please come and find me, the first suspect will be my wife..
:lol:
These users thanked the author MJU for the post:
Benj (Wed Feb 12, 2014 10:18 am)
Rating: 5.26%
 

MJU
Posts: 435
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 108 times
Been thanked: 95 times
Contact:

Re: GSM module EB066: initialise problem

Postby MJU » Tue Feb 11, 2014 4:47 pm

Nope, even the third SIM card says no :cry:
Still: Init Error 254...

MJU
Posts: 435
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 108 times
Been thanked: 95 times
Contact:

Re: GSM module EB066: initialise problem

Postby MJU » Tue Feb 11, 2014 11:57 pm

Ok found the problem...

After initialising there is the need for a PIN code.
The Tellit Module gives an error: +CMS Error: 311.
In the Telit AT commands reference (page 27) it says that the module needs the PIN code.

AT+CPIN[=<pin> [,<newpin>]]
Set command sends to the device a password which is necessary before it can be operated (SIM PIN, SIM PUK, PH-SIM PIN, etc.).
If the PIN required is SIM PUK or SIM PUK2, the <newpin> is required. This second pin, <newpin>, will replace the old pin in the SIM.
The command may be used to change the SIM PIN by sending it with both parameters <pin> and <newpin> when PIN request is pending; if no PIN request is pending the command will return an error code and to change the PIN the command +CPWD must be used instead.
Parameters:
<pin> - string type value
<newpin> - string type value.
To check the status of the PIN request use the command AT+CPIN?
Note: If all parameters are omitted then the behaviour of Set command is the same as Read command.


Now it works after I have send the "AT+CPIN=1234" command...
Maybe this could become a macro command?

Hope this info helps for the future...
These users thanked the author MJU for the post:
Benj (Wed Feb 12, 2014 10:20 am)
Rating: 5.26%
 

User avatar
Benj
Matrix Staff
Posts: 14576
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4603 times
Been thanked: 4241 times
Contact:

Re: GSM module EB066: initialise problem

Postby Benj » Wed Feb 12, 2014 10:20 am

Aha, good find,

Are they Pay and Go type SIMs your using? Not heard of needing a pin key but will make a note as could come in handy in the future.

MJU
Posts: 435
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 108 times
Been thanked: 95 times
Contact:

Re: GSM module EB066: initialise problem

Postby MJU » Wed Feb 12, 2014 11:31 am

Benj wrote:Aha, good find,

Are they Pay and Go type SIMs your using? Not heard of needing a pin key but will make a note as could come in handy in the future.


Yes I'm very proud of myself right now! 8)

The current SIM is a Proximus Pay And Go card. http://www.belgacom.be/personal/products-and-services/proximus-telephony/choose-my-reload-card.html
This is the prepaid card like they are all around here.

Hope this helps people in the future.
Maybe an extra line in your datasheets for the EB066 could be helpful?