Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I am facing a strange problem on Moto V3c while implementing licensing ,what I want is once my license is over application will take me to cmshop.

But somehow ISHELL_BrowseURL is returning FAIL and my application is not moving further(although my device is not live but I think it should at least display message like"unable to retrieve catalog......")

// retrieve download ID
myAppDownloadID = ISHELL_GetClassItemID(GET_SHELL(), MYCLASSID );

DBGPRINTF("Class Item Id : %u", myAppDownloadID);

if(myAppDownloadID)
{
char szURL[30];
SNPRINTF(szURL, sizeof(szURL), "cmshop:ItemID=%u", myAppDownloadID);
DBGPRINTF("myAppDownloadID= %d",myAppDownloadID );
DBGPRINTF("szURL= %s",szURL );
if(SUCCESS == ISHELL_BrowseURL(GET_SHELL(), szURL))
{
// successful invocation
DBGPRINTF("SUCCESS");
ISHELL_CloseApplet(GET_SHELL(), FALSE);
}
else
{
DBGPRINTF("FAIL ");
}

else
{
ISHELL_CloseApplet(GET_SHELL(), FALSE);
DBGPRINTF("Invalid download ID ");

I checked on logger its showin message "OEM/ResCtl will not allow start..."

I am returning FALSE for EVT_BUSY.

Any Help or Hint regarding this is highly appreciated.

-Priyank

If n/w is not available or class is not found ISHELL_GetClassItemID will return 0 & according to your code it shouldn't try sending cmshop command.

If n/w is not available or class is not found ISHELL_GetClassItemID will return 0 & according to your code it shouldn't try sending cmshop command.

Thanks for your concern Atul.
but on logger I am getting myAppDownloadID as 100, so its going inside the condition and prints "FAIL" inside that.
Also I think, if n/w is not available then also it should show connecting... and then shows unable to retrieve catalog.....
Please correct me if I am wrong
-Priyank

Thanks for your concern Atul.
but on logger I am getting myAppDownloadID as 100, so its going inside the condition and prints "FAIL" inside that.
Also I think, if n/w is not available then also it should show connecting... and then shows unable to retrieve catalog.....
Please correct me if I am wrong
-Priyank

Yes, you are right it should try to connect & throw connection error. Can you print and see what error IShell_BrowseUrl is throwing?
I tried on V3C & it tried connecting & then displayed error "Unable to connect".

Yes, you are right it should try to connect & throw connection error. Can you print and see what error IShell_BrowseUrl is throwing?
I tried on V3C & it tried connecting & then displayed error "Unable to connect".

Its giving error saying:
OEM/ResCtl will not allow start...
please check attached logger file also.

Its giving error saying:
OEM/ResCtl will not allow start...
please check attached logger file also.

Try printing error message returned by ISHELL_BrowseURL. Looks like issue with handset provisioning...make sure you can manually launch mobileshop.

Try printing error message returned by ISHELL_BrowseURL. Looks like issue with handset provisioning...make sure you can manually launch mobileshop.

I tried printing the error code for ISHELL_BrowseURL by writing
DBGPRINTF("before error code");
int tmp=ISHELL_BrowseURL(GET_SHELL(), szURL);
DBGPRINTF("error code = %d",tmp); DBGPRINTF("after error code");
...
...
if(SUCCESS == ISHELL_BrowseURL(GET_SHELL(), szURL))
{
....

else
{
DBGPRINTF("FAIL ");

but more strangely is not printing the DBGPRINTF having error code, I know it sounds stupid but I cross checked it n I am not doing any silly mistake.
it prints "before error code" then directly jumps to "FAIL"
Is their any reason that logger doesn't print DBGPRINTF
also Atul other applications are working fine on the same device, so I am assuming that the problem is with my code.
Please refer the logger file attached.

I tried printing the error code for ISHELL_BrowseURL by writing
DBGPRINTF("before error code");
int tmp=ISHELL_BrowseURL(GET_SHELL(), szURL);
DBGPRINTF("error code = %d",tmp); DBGPRINTF("after error code");
...
...
if(SUCCESS == ISHELL_BrowseURL(GET_SHELL(), szURL))
{
....

else
{
DBGPRINTF("FAIL ");

but more strangely is not printing the DBGPRINTF having error code, I know it sounds stupid but I cross checked it n I am not doing any silly mistake.
it prints "before error code" then directly jumps to "FAIL"
Is their any reason that logger doesn't print DBGPRINTF
also Atul other applications are working fine on the same device, so I am assuming that the problem is with my code.
Please refer the logger file attached.

I am stuck at the same point....
If Atul or somebody else has any idea, please guide me.
Thanks in advance.

I am stuck at the same point....
If Atul or somebody else has any idea, please guide me.
Thanks in advance.

Can you try attached app?

Can you try attached app?

I tried those files on device.
Its connecting to the cmshop but as the device is not live it showing message "unable to retrieve catalog. please try again later.(18)"
this proves that the problem is with the code, and now I am more eager to know the possible reasons.
please help me with the same
logger file is attached for your reference.

I tried those files on device.
Its connecting to the cmshop but as the device is not live it showing message "unable to retrieve catalog. please try again later.(18)"
this proves that the problem is with the code, and now I am more eager to know the possible reasons.
please help me with the same
logger file is attached for your reference.

Priyank, I've used same code as yours. I am calling this at the EVT_APP_START. reiterating code:
uint32 myAppDownloadID = ISHELL_GetClassItemID(pMe->m_pIShell, 0x01120301);
DBGPRINTF("Class Item Id : %u", myAppDownloadID);
{
char szURL[30];
SNPRINTF(szURL, sizeof(szURL), "cmshop:ItemID=%u", myAppDownloadID);
DBGPRINTF("myAppDownloadID= %d",myAppDownloadID );
DBGPRINTF("szURL= %s",szURL );
if(SUCCESS == ISHELL_BrowseURL(pMe->m_pIShell, szURL))
{
DBGPRINTF("SUCCESS");
ISHELL_CloseApplet(pMe->m_pIShell, FALSE);
}
else
{
DBGPRINTF("FAIL ");
}
}

Priyank, I've used same code as yours. I am calling this at the EVT_APP_START. reiterating code:
uint32 myAppDownloadID = ISHELL_GetClassItemID(pMe->m_pIShell, 0x01120301);
DBGPRINTF("Class Item Id : %u", myAppDownloadID);
{
char szURL[30];
SNPRINTF(szURL, sizeof(szURL), "cmshop:ItemID=%u", myAppDownloadID);
DBGPRINTF("myAppDownloadID= %d",myAppDownloadID );
DBGPRINTF("szURL= %s",szURL );
if(SUCCESS == ISHELL_BrowseURL(pMe->m_pIShell, szURL))
{
DBGPRINTF("SUCCESS");
ISHELL_CloseApplet(pMe->m_pIShell, FALSE);
}
else
{
DBGPRINTF("FAIL ");
}
}

ok now its very frustrating, I tried the same code lines in APP_START and the result is same.
Just to summarize:

My other applications are running fine on this device (i.e Moto V3c).
My current application is running fine on other devices(i.e Moto v9m).

the only combination that doesn't work is "this application+moto v3c"
Also Atul,
1. You used certain dependencies in your helloworld mif.
2. Quote:uint32 myAppDownloadID = ISHELL_GetClassItemID(pMe->m_pIShell, 0x01120301); classid mentioned above is different from that you used in helloworld mif.
3. I am getting myAppDownloadID as 100 but in helloworld we are getting 0.

ok now its very frustrating, I tried the same code lines in APP_START and the result is same.
Just to summarize:

My other applications are running fine on this device (i.e Moto V3c).
My current application is running fine on other devices(i.e Moto v9m).

the only combination that doesn't work is "this application+moto v3c"
Also Atul,
1. You used certain dependencies in your helloworld mif.
2. Quote:uint32 myAppDownloadID = ISHELL_GetClassItemID(pMe->m_pIShell, 0x01120301); classid mentioned above is different from that you used in helloworld mif.
3. I am getting myAppDownloadID as 100 but in helloworld we are getting 0.

I recognized the problem.
actually, the problem is with handle event. Although I am returning FALSE to EVT_BUSY but that value is suppressed somewhere else which I am unaware of.
And I am really felling bad that I wasted my and more importantly Moderator's time in this thing.
But 1 thing is still not clear to me that, how come the buggy code is working on other devices??

I recognized the problem.
actually, the problem is with handle event. Although I am returning FALSE to EVT_BUSY but that value is suppressed somewhere else which I am unaware of.
And I am really felling bad that I wasted my and more importantly Moderator's time in this thing.
But 1 thing is still not clear to me that, how come the buggy code is working on other devices??

May be other devices were BREW 3.1.5. There is EVT_BUSY behavior change in Brew 3.1.5.

May be other devices were BREW 3.1.5. There is EVT_BUSY behavior change in Brew 3.1.5.