iOS Question communicate via bluetooth or wifi??

Discussion in 'iOS Questions' started by ilan, Jan 29, 2015.

  1. ilan

    ilan Expert Licensed User

    hi

    does anyone know if its possible to communicate between 2 ios devices via bluetooth or wifi??

    just sending string no images only string...

    thanx
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can use wifi if both devices are connected to the same network (see iNetwork library).
     
    ilan likes this.
  3. ilan

    ilan Expert Licensed User

    thanx erel

    i looked in it and tried it but nothing happens when i send string

    i used the same code install the app on my ipad and iphone4 both connected to the same wifi

    do i need to change the host maybe??

    (sorryi do it for the first time :oops:)
     
  4. ilan

    ilan Expert Licensed User

    i could manage to send a string between the two devices like this

    Code:
    Dim p As UDPPacket
       p.Initialize(
    "Important message".GetBytes("UTF8"), "192.168.2.3"18901)
       USocket.Send(p)
    i just change the ip and put the other device ip and used the same port the that i intialize USocket in app start
    and it worked

    is it possible to get a list of all connected devices to the same wifi?? like this i could choose the opponent ip...
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    There is no simple way to find all the connected devices.

    You should be able to use TCP as well. Your code was probably wrong.
     
  6. ilan

    ilan Expert Licensed User

    ok erel, i solved it (was not easy)

    i think there is a bug, when i send a word that include the letter "X" several times it arrived the first time as an "X" but then it arrived as "8" so i used only numbers and it worked (maybe it has something todo with UTF8??)

    numbers allways arrived as sent...

    thank you
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Can you post the code?
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice