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

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 45
Registered: ‎04-11-2012
My Device: Z10 Limited Edition
My Carrier: 00201003883386

All Sockets (TCP/UDP) tutorials don't work on my BB10 Dev alpha device

[ Edited ]

Hi All,

          I am developing network app based on Sockets (TCP/UDP)  using cascades. I tested my code on PC using QTCreator and it worked fine. when I ported client code to BB10 cascades and tried to connect to PC, it failed to connect.

 

I downloaded all sockets tutorials from BB10 tutorials repositories and they failed to connect to PC.

 

I uploaded sample code that doesn't work with me: MyUdpTest

 

Please help as it is very important for me to finish my app

 

Thank you,

Hisham

When you are young, work to learn. Not to earn !
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: All Sockets (TCP/UDP) tutorials don't work on my BB10 Dev alpha device

Check the firewall on your PC...

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Contributor
Posts: 45
Registered: ‎04-11-2012
My Device: Z10 Limited Edition
My Carrier: 00201003883386

Re: All Sockets (TCP/UDP) tutorials don't work on my BB10 Dev alpha device

the issue is not related to firewall

 

I alreade developed Android app : https://play.google.com/store/apps/details?id=com.allinoneremote

 

and I ported it to BB10 with android runtime and it works fine on bb10 device 

but I am rewriting my app using cascades and it doesnt work

When you are young, work to learn. Not to earn !
Contributor
Posts: 45
Registered: ‎04-11-2012
My Device: Z10 Limited Edition
My Carrier: 00201003883386

Re: All Sockets (TCP/UDP) tutorials don't work on my BB10 Dev alpha device

any help Smiley Sad

When you are young, work to learn. Not to earn !
Highlighted
Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: All Sockets (TCP/UDP) tutorials don't work on my BB10 Dev alpha device

hi,

 

the problem appears to be your bind - you are telling the socket to only accept from and send to LocalHost.

 

-         mySocket2->bind(QHostAddress::LocalHost,9876);
+         mySocket2->bind(QHostAddress::Any,9876);

 

change it to Any - and I see data in my packet sniffer...

 

hope this helps!

--
Rob is no longer associated with BlackBerry.
Contributor
Posts: 45
Registered: ‎04-11-2012
My Device: Z10 Limited Edition
My Carrier: 00201003883386

Re: All Sockets (TCP/UDP) tutorials don't work on my BB10 Dev alpha device

It works Smiley Happy

 

Thank you very much for your support.

 

I also managed to communicate with my current server developped by Java using UDP Smiley Happy

When you are young, work to learn. Not to earn !