Author Topic: ChatServer demo and client  (Read 18805 times)

Vojb

  • Guest
ChatServer demo and client
« on: July 06, 2017, 04:42:44 PM »
Hey!

Is it possible to know if a connected chatclient has disconnected in the chatserver? Becuase if I disconnect a client from the chatserver it doesnt call the ondisconnect method in the chatserver, is this a bug or i am reading it wrong?

Thanks!

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: ChatServer demo and client
« Reply #1 on: July 06, 2017, 09:51:28 PM »
Hi

it fires on disconnect event but with some delay. I do recommend to use latest Bluetooth Framework instead of WCL. The Bluetooth Framework has that issue fixed.

Vojb

  • Guest
Re: ChatServer demo and client
« Reply #2 on: July 07, 2017, 08:26:38 AM »
Thank you for fast respond!

The thing is that I have never code in VCL at all, so would rather make my own workaaround.
But you say it fires with some delay? I dont get it to fire at all.
I was thinking of trying that the chat server would disconnect depending on the rssi it gets from the client.
Whats exactly is the rssi getting from?

Using bluesolei adapters.  Win 7 for chat server, win 10 for chat client. 

Thank you in advance

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: ChatServer demo and client
« Reply #3 on: July 07, 2017, 09:08:53 AM »
Hi,

Server can be disconnected by few reasons:

1. Connection has been closed on client or server side. OnDisconnect fires immediately.
2. Hardware has been removed on server side. OnDisconnect fires immediately,
3. Hardware has been removed on client side. OnDisconnect fires fast but with some delay that depends on BT HW implementation (when the hardware detects RF link lost).
4. Client become out of range. OnDisconnect fires with delay that depends on dongle implementation (it needs to detect link lost and reconnect attempt timed out).
It never decide to disconnect on the RSSI level. RSSI is something not usable in most cases  (in some it is usable) because of some reasons. RSSI depends on dongles hardware, environment, power settings and lot of other things.

Vojb

  • Guest
Re: ChatServer demo and client
« Reply #4 on: July 07, 2017, 09:13:39 AM »
Hi,

1. Chatserver dont disconnect , when i disconnect from client side.
2. No problems.
3. No problems.
4.Exactly what I thought,
 but i thought of making my own method for just that reason so the server disconnects manually when rssi is below - 30 or something.



Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: ChatServer demo and client
« Reply #5 on: July 07, 2017, 11:47:07 AM »
Strange that it does not. Any way I do recommend to wait when new Bluetooth Framework .NET will be released (the VCL Edition is already available).

RSSI - sure, if you have know how than it can be useful. New Bluetooth Framework also includes new algorithm that converts RSI raw value to dBi

Vojb

  • Guest
Re: ChatServer demo and client
« Reply #6 on: July 07, 2017, 12:32:35 PM »
Yeah I solved it by sending a "manualdisconnect" command to the server which disoconnect it all from the server instead of in the client.
Oh, that sounds awesome, when does .Net version launch?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: ChatServer demo and client
« Reply #7 on: July 07, 2017, 12:57:07 PM »
I think in about a week.

Vojb

  • Guest
Re: ChatServer demo and client
« Reply #8 on: July 17, 2017, 09:08:44 AM »
Will the old WCL be removed completely?  Will I be able to just switch to the bluetooth one, or do i have to change my code?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: ChatServer demo and client
« Reply #9 on: July 17, 2017, 10:08:11 AM »
We are planning to remove WCL only after all the current features will be moved to new Bluetooth Framework. It takes long time I think. At this time we are working on .NET Edition of new Bluetooth Framework (VCL has been released already) and it takes time (because of stupid Marshalling).

We are trying to save public interfaces as they are in WCL but because of completely new architecture not all interfaces can be saved as they are. So some code modification is required.

Vojb

  • Guest
Re: ChatServer demo and client
« Reply #10 on: July 17, 2017, 04:08:04 PM »
Okey I understand,do you think you can send me an email when the .NET bluetooth is finished?

thanks again  :)

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: ChatServer demo and client
« Reply #11 on: July 17, 2017, 04:29:58 PM »
Of course, will do.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: ChatServer demo and client
« Reply #12 on: July 29, 2017, 02:38:09 PM »
We have just released the new Bluetooth Framework .NET Edition. http://www.btframework.com/bluetoothframework.htm

 

Sitemap 1 2 3 4 5 6 7