Help with Fastrack Supreme GPIO 21 & 25

I’m trying to set up the GPIO for the pins on the power connector (GPIO 21 and 25) on a Wavecom Fastrack Supreme, product type Q2687G. I’m using the command:

gpiohandle = adl_ioSubscribe(1,ADL_IO_GPIO | ADL_IO_DIR_IN | 21 ,ADL_TMR_TYPE_100MS,100,(adl_ioHdlr_f) GpioEventHandle);

to try to set up a polling cycle. However this returns a value of “-2”, which means it has failed if I understand correctly.

Can anyone explain the adl_ioSubscribe function more comprehensively than the user manuals do?
Can anyone spot what is wrong with the command above?

LARGER CODE SNIPPET

gpioeventhandle = adl_ioEventSubscribe((adl_ioHdlr_f) GpioEventHandle);
									gpiohandle = adl_ioSubscribe(1,ADL_IO_GPIO | ADL_IO_DIR_IN | 21 ,ADL_TMR_TYPE_100MS,100,(adl_ioHdlr_f) GpioEventHandle);
									if (gpioeventhandle < 0)
									{
										adl_atSendResponse ( ADL_AT_RSP,"\r\nioEvent Not Successfully Subscribed\r\n");
									}
									if (gpiohandle < 0)
									{
										adl_atSendResponse ( ADL_AT_RSP,"\r\nIO Not Successfully Subscribed\r\n");
										sprintf( agpio, "%i", gpiohandle);
										adl_atSendResponse ( ADL_AT_RSP,agpio);
									}

You need to state what version you’re using - the GPIO handling has changed significantly between versions!

Have you looked up the specific meaning of the -2 return code?

Have you looked at the samples?

Oh - and use the ‘Code’ tags to make you code legible!

I’m using M2M Studio 1.0 and my Build Version is 1.0.2.200903311200, it seems the Open AT OS version may be v06.30
What are the new & old versions of ioSubscribe? I know it’s not ideal but perhaps I could try both to see which works.

Not a good idea.

You need to ensure that you have the correct version of the ADL User Guide - and follow what that tells you!

The correct version of the ADL User Guide will be the one that says, ADL User Guide for Open AT OS v6.30 on the cover page.

You also, of course, need the correct version of SDK.
If your SDK contains the correct version of the ADL User Guide, then it will be the correct version of SDK, and will contain the correct versions of the samples…

Could you possibly refer me to a link to download the v6.30 User Guide, as all I was given to work with was the modem and its serial cable.

That is totally inadequate!

You should go back to the whoever gave you that, and insist that they give you proper support!

Sierra Wireless have only recently completely revamped the website, so I’m no better placed than you to find the downloads now!

Start at: sierrawireless.com/ - I would start looking under “Intelligent Embedded Modules”…