Welcome, Guest

Author Topic: PIC-GSM  (Read 3880 times)

ambo

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
PIC-GSM
« on: December 21, 2012, 05:35:53 PM »
I just got the PIC GSM.  What do I need to modify so that when I first connect to the server, I would go to a login page for authentication before I get directed to the main page?

eagleeye

  • Newbie
  • *
  • Posts: 20
  • Karma: +3/-0
Re: PIC-GSM
« Reply #1 on: December 22, 2012, 12:24:01 PM »
Hi
 In CustomHttpApp.c

  ***************************************************************************/
#if defined(HTTP_USE_AUTHENTICATION)
BYTE HTTPNeedsAuth(BYTE* cFile)
{

// Just Add another line to this routine.
// then the default username and password applies
// Take care to note the "9" thats the number of characters to match


   if(memcmppgm2ram(cFile, (ROM void*)"index.htm", 9) == 0)
      return 0x00;      /

ambo

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: PIC-GSM
« Reply #2 on: January 01, 2013, 04:30:58 PM »
Hi,

Thank you so much  ... I am now able to control the two relays via the webpage that requires a username/password.

Now, how do I receive sms in order to turn on/off the relay.  I've read the manual and there is no mention that the demo software has capability to turn on/off the relays via sms.

what code should I add or which code in the source file should I modify so that I can receive sms and parse the data and change the states of the relay?

Thanks in advance.

Ambo

ambo

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: PIC-GSM
« Reply #3 on: January 07, 2013, 02:02:44 PM »
I'm really quite amazed by this product since this has been out for several years already ... no sample codes for receiving sms for remote control  :'(  Days of googling yielded only results of others trying to find the sample codes Like what I'm doing.

The gsm code is very criptic and not so useful few comments.  Heck I can't even seem to access the sim300d modem by creating a serial bridge from serial1 to serial2.  Whenever I try to incorporate my code or make changes to the main gsm code, portions of the ethernet code seems to stop working.  I can only conclude that it's not possible to receive remote sms control and ethernet at the same time, but thats only me speaking as I am only a hobbyist.

Sure hope someone out there can provide a sample working code ... or just even a hex file with working sms remote controls to give me hope that its possible to code the remote sms commands.


LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1984
  • Karma: +50/-3
Re: PIC-GSM
« Reply #4 on: January 08, 2013, 09:35:37 AM »
Hey Ambo,

Please check the "Read Me!.txt" for detailed explanation of the demo program (https://www.olimex.com/Products/PIC/Development/PIC-GSM/resources/PIC_GSM_5_42stack.zip). Unfortunately, our software development capacity is limited and in most of the cases it is impossible to cover each possible scenario of demo program for our multi-purpose boards.

You may also find helpful the examples for MOD-GSM since it has some receive SMS examples and routines that work with PIC32 boards, has almost the same GSM chip. For instance: https://www.olimex.com/Products/Duino/PIC32/_resources/PINGUINO_MODGSM_send_receive_sms_example.zip

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

eagleeye

  • Newbie
  • *
  • Posts: 20
  • Karma: +3/-0
Re: PIC-GSM
« Reply #5 on: January 15, 2013, 02:02:36 PM »
Hi,

Thank you so much  ... I am now able to control the two relays via the webpage that requires a username/password.

Now, how do I receive sms in order to turn on/off the relay.  I've read the manual and there is no mention that the demo software has capability to turn on/off the relays via sms.

what code should I add or which code in the source file should I modify so that I can receive sms and parse the data and change the states of the relay?

Thanks in advance.

Ambo


You would have to look at the GSM ISR routine to see if you can check for the length of the buffer
in the routine. Once the buffer has reached a certain number, then you need to scan the buffer to
look for your special command (via SMS) that you have sent to the controller.

I think for you, its best to get an ICD3/pickit3  and MPLABX so that you can do source level debugging
and then you can inspect the buffers for your sms. This way you can understand very fast.

MPLAB IDE does not allow you to inspect some structures, so MPLABX is the best choice for learning fast
« Last Edit: January 15, 2013, 02:25:08 PM by eagleeye »