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

Developer

Forums

Forums:

I am trying to write a project that gets a file from the web. Can anybody help me with what headers I might need to use. And better yet any help with the callback stuff will help, like how do I get pMe into one of the functions.

You should probably use the IWeb API. Here is a helpful article:
https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/knowledgebas...
The netdiagnostics sample app in the SDK gives a good example of how to use this API.

You should probably use the IWeb API. Here is a helpful article:
https://brewx.qualcomm.com/bws/content/gi/common/appseng/en/knowledgebas...
The netdiagnostics sample app in the SDK gives a good example of how to use this API.

Would I need to open a socket, or will Brew handle that itself for me?

Would I need to open a socket, or will Brew handle that itself for me?

Nevermind, got it, Thank you very much.

Nevermind, got it, Thank you very much.

I took that code and tried to use it, but pMe is coming up as undefined in the callback function...what's up with that?

I took that code and tried to use it, but pMe is coming up as undefined in the callback function...what's up with that?

How do I keep my app open long enough to catch a response? Does the Brew Simulator work with the web?

How do I keep my app open long enough to catch a response? Does the Brew Simulator work with the web?

pMe is not working inside callback functions, I get errors about it not being available.

pMe is not working inside callback functions, I get errors about it not being available.

Ok, worked out most of my bugs last night, but I still got one.
ISOURCE_Read(pMe->pISource, pMe->text, 8);
Causes a Memory Access error with MEMMOVE on the phone and restarts it. I call this in a callback function of ISOURCE_Readable. I'm not sure if it's the number on the end, and I think I need to know what that number is supposed to be to just get the whole thing.

Ok, worked out most of my bugs last night, but I still got one.
ISOURCE_Read(pMe->pISource, pMe->text, 8);
Causes a Memory Access error with MEMMOVE on the phone and restarts it. I call this in a callback function of ISOURCE_Readable. I'm not sure if it's the number on the end, and I think I need to know what that number is supposed to be to just get the whole thing.

Is there any other way than here and the Brew Alliance Program where I can get documentation for Brew?

Is there any other way than here and the Brew Alliance Program where I can get documentation for Brew?

Kahlner wrote:Ok, worked out most of my bugs last night, but I still got one.
ISOURCE_Read(pMe->pISource, pMe->text, 8);
Causes a Memory Access error with MEMMOVE on the phone and restarts it. I call this in a callback function of ISOURCE_Readable. I'm not sure if it's the number on the end, and I think I need to know what that number is supposed to be to just get the whole thing.
Is pMe->pISource a valid pointer (not equal to NULL)?
Did you malloc space for the pMe->text? This function expects a pointer to a valid chunk of memory.
The last number is the memory chunk size referenced by pMe->text. 8 bytes seems like a really small buffer. Why are you using such a small buffer? I would use at least 1k-2k to get a full MTU.

Kahlner wrote:Ok, worked out most of my bugs last night, but I still got one.
ISOURCE_Read(pMe->pISource, pMe->text, 8);
Causes a Memory Access error with MEMMOVE on the phone and restarts it. I call this in a callback function of ISOURCE_Readable. I'm not sure if it's the number on the end, and I think I need to know what that number is supposed to be to just get the whole thing.
Is pMe->pISource a valid pointer (not equal to NULL)?
Did you malloc space for the pMe->text? This function expects a pointer to a valid chunk of memory.
The last number is the memory chunk size referenced by pMe->text. 8 bytes seems like a really small buffer. Why are you using such a small buffer? I would use at least 1k-2k to get a full MTU.

Ok, changed it to 2000 and made sure that it's not NULL, and I don't know what that last part means. I also need a response on the third post.

Ok, changed it to 2000 and made sure that it's not NULL, and I don't know what that last part means. I also need a response on the third post.

There is documentation on the BREW website that includes FAQs and Knowledge base. There is also plenty of info in the API reference, but the most info is here on the forums. I would start by searching the forums before you post a question. Usually the question has already been asked.
As for your current issue, could you post some code so I can see what you are attempting to accomplish.

There is documentation on the BREW website that includes FAQs and Knowledge base. There is also plenty of info in the API reference, but the most info is here on the forums. I would start by searching the forums before you post a question. Usually the question has already been asked.
As for your current issue, could you post some code so I can see what you are attempting to accomplish.

Thanks, finally found out what my problem is, thanks.

Thanks, finally found out what my problem is, thanks.