how to ping a device that has been disconnected by wifi

asked 2015-02-09 09:02:56 -0700

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi there,

I would to know how can a ping a device. for example:

I have two peers A and B. B turn off your wifi and i need ping B by your ID to know if B is connected or not and remove from list of devices from A.


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-02-17 16:48:36 -0700

jprestwo gravatar image

There are ping API's for both standard and thin client. You can use them on any peer that you have seen, whether that be one in a session with you or one that you have received an advertisement from. All you need to know is the peers well-known or unique name. AllJoyn also does a periodic heartbeat to all peers in your session and if one does not respond you will receive a session lost signal. You can use either the heartbeat and/or explicitly ping the peer depending on your use case. Here are the API's for thin and Standard Client:

Standard: QStatus BusAttachment::Ping(const char* name, uint32_t timeout)

Thin Client: AJ_Status AJ_BusPing(AJ_BusAttachment* bus, const char* name, uint32_t timeout)

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-02-09 09:02:56 -0700

Seen: 909 times

Last updated: Feb 17 '15