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

Adobe AIR Development

Reply
New Contributor
Posts: 6
Registered: ‎06-13-2011
My Device: playbook
My Carrier: software engineer

Regarding to the method of using PlayBook and USB

I'd like to connect an external device with PlayBook through USB.

The USB's API was found in the Java Application Development of BlackBerry.
Please refer the following:
(http://docs.blackberry.com/en/developers/deliverables/1076/development.pdf
  "Use USB or serial port connections" section)


However, the USB's function was no found in the API Reference of WebWorks and Adobe AIR.
Isn't this function being offered in Tablet OS?

I'll very appreciated if you could tell me the method how to use the PlayBook and USB.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Regarding to the method of using PlayBook and USB

This is not possible yet.

While the USB port on the PlayBook could technically support a "host mode" of operation, there is currently nothing available to us in the OS that would support that. RIM has also made no official statements regarding this, though most of us expect something within the next year...

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Contributor
Posts: 6
Registered: ‎06-13-2011
My Device: playbook
My Carrier: software engineer

Re: Regarding to the method of using PlayBook and USB

Thank you for replying.

I could understood that USB "Host mode" is impossible.

 

Instead, if connect Playbook with PC as USB divice to
exchange data at original protocol.

 

Question 1: Could Playbook connected with PC as USB divice?
Question 2: Would you please tell me which functions (Adobe AIR or WebWorks) should be used to receive data which sent by PC?

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Regarding to the method of using PlayBook and USB

The PB can connect to a PC and the shared directories show up as a drive on the PB. The user can copy files to and from the PB once connected to the PC. In this use case scenario, there is no need for an app to receive data since the OS does it. An app can monitor a directory in case the contents change if that is what you're looking for. What are you trying to do so we can better answer your question? AIR supports standard socket and web access protocols as well.
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Regarding to the method of using PlayBook and USB

The USB connection involves the PlayBook providing an NDIS interface of some kind, and acting rather like a DHCP server.  It provides an address to the PC, which runs an NDIS driver that provides TCP/IP communication with the PlayBook over the USB port.

 

Once connected, you can simply use the regular socket APIs, or anything else that does TCP/IP, to communicate between the PC and PlayBook. 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Contributor
Posts: 6
Registered: ‎06-13-2011
My Device: playbook
My Carrier: software engineer

Re: Regarding to the method of using PlayBook and USB

Thank you for your replying.

What I'm trying to do is to connect other device with Playbook using USB and then exchange data in a specified port.
Therefore, I'll be able to open an USB port at Playbook.

Well, so far I still couldn't find the best way to implement it.
I'll appreciate you if you could give me some suggestions.

Highlighted
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Regarding to the method of using PlayBook and USB

Unless the other device is a Windows PC, you will not likely be able to do this right now.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!