archie94 / PSync

A Android-based Sync Tool for Challenged Networks
0 stars 1 forks source link

Workflow of Discovery module is incorrect. #1

Closed hridaydutta123 closed 8 years ago

hridaydutta123 commented 8 years ago

Use UDP Broadcast packets assuming there is already wifi connection established between the devices. Connection establishment is managed by DisarmConnect App

ghoshbishakh commented 8 years ago

@archie94 As i had mentioned you need to use broadcast packets. So what you need to do is create two threads. one for broadcasting udp packets in the broadcast ip (192.168.43.255) and another thread for listening them and listing the peers

archie94 commented 8 years ago

Thanks ! I checked and there is a bug in connection establishment between devices. Will use UDP broadcast packets

ghoshbishakh commented 8 years ago

assume two devices are already connected over wifi. Now the goal is to autometically detect the presence of the devices on the same network. Thats why UDP broadcasts are required.

Example:

PhoneA and PhoneB are connected to the same wifi

So target is: in phoneA print: ip address of PhoneB

and in PhoneA print: ip address of PhoneA

archie94 commented 8 years ago

Having problem in receiving the broadcast packet in client side. Definitely the problem lies in joining the socket to the broadcast group. Need a little help.

ghoshbishakh commented 8 years ago

Let me know when you are free. Will meet in department On Mar 12, 2016 4:26 AM, "Arka Prava Basu" notifications@github.com wrote:

Having problem in receiving the broadcast packet in client side. Definitely the problem lies in joining the socket to the broadcast group. Need a little help.

— Reply to this email directly or view it on GitHub https://github.com/archie94/PSync/issues/1#issuecomment-195593536.

ghoshbishakh commented 8 years ago

@archie94 close this issue.

ghoshbishakh commented 8 years ago

ekta pull request patheachi ota merge kore neo

Ususal steps of collaborative development in github:

  1. Open repository, merge any pending pull requests if you think they should be merged.
  2. Open project folder, and do:

git pull github maser

here "github" is the remote name. it may be origin or whatever you named it.

  1. If there are any merge conflicts then resolve and merge.
  2. Work, and commit your changes and push.
archie94 commented 8 years ago

@ghoshbishakh Writing the file manager with reference to your python script. Not clear on two things

  1. what does def checkChecksum(self, fileId) do?
  2. how to generate fileID for each file present?
ghoshbishakh commented 8 years ago

@archie94 actually that calculates the checksum of the file content and assigns it as fileID. Leave that part or hardcode something. Push whatever you have done till now.

archie94 commented 8 years ago

@ghoshbishakh Pushed works up to today. I cannot work for the next two days. If you can you may modify whatever you feel like. Will resume from Saturday.

ghoshbishakh commented 8 years ago

@archie94 thanks! ill take a look tomorrow