Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Push Development

Reply
Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Push - rc=10001 in response to the second PD_subReg?

Hello, all,

I've banged my head at the wall a few times trying to make BlackBerry BIS push work for me. I even managed to register with 5.0 Push API (SERVER_TYPE_NONE with no server url) and got back STATUS_ACTIVE in my onStatusChange(). The problem was, our server person did not see anyone subscribed. Trying SERVER_TYPE_BPAS with http://pushapi.eval.blackberry.com produced a STATUS_FAILED with REASON_NETWORK_ERROR for reason and IllegalArgumentException for error.

 

I then decided to go by the book - BlackBerry Development Fundamentals by John M. Wargo (replacing https: with http: as suggested in several places here on the forums). My second PD_subReg request produced rc=10001, which means (by the same book) "device PIN is missing or invalid". I also started a Thread listening on the RIM-provided port (shamelessly stealing from httppushdemo), but it is no good without proper registration first.

 

Our server person went by the same book on the server side, registering on https://pushapi.eval.blackberry.com and getting a success return code. He can send to a specific PIN or to "all" but sees no one subscribed.

 

What is the best way to push successfully?

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.
Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Push - rc=10001 in response to the second PD_subReg?

[ Edited ]

After some pondering, I realized that we are using our custom HttpConnection - we open the socket ourselves and try reusing it as long as the request is for the same server using the same protocol. This enabled a much better performance than with the built-in HttpConnection so we stuck to it.

 

However, we might be missing some HTTP headers which the built-in HttpConnection is adding. Is there any special header containing the device's PIN used by the BlackBerry infrastructure? This is probably for one of the RIM employees to answer...

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.
Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Push - rc=10001 in response to the second PD_subReg?

Well, I've tested it heavily over these days and it seems RIM infrastructure extracts device PIN from something other than HTTP headers - most probably its data service layer. So the question still stands - what is going wrong?

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.
Contributor
efung
Posts: 11
Registered: ‎05-06-2010
My Device: Bold 9700
My Carrier: Rogers

Re: Push - rc=10001 in response to the second PD_subReg?

In your URL, are you appending the connection suffix String so that you connect over BIS-B? The push registration must be done using this transport.

Please use plain text.
Developer
massimo_olive
Posts: 235
Registered: ‎11-08-2010
My Device: Not Specified

Re: Push - rc=10001 in response to the second PD_subReg?

Agree with the poster above - you need to ensure you are going through BIS-B. The 10001 usually happens when you are not going through BIS-B which as you correctly deduced injects the PIN that is used by BlackBerry Push Service. You can't put the PIN in the header yourself - it won't work.

Please use plain text.