Wifi UDP Control Documentation

Status
Not open for further replies.

blantonl

Founder and CEO
Staff member
Super Moderator
Joined
Dec 9, 2000
Messages
11,115
Location
San Antonio, Whitefish, New Orleans
Is there any documentation on the UDP protocol (control and view) for the 536 over Wifi?

Proscan has it implemented nicely, however I'm interested in developing a custom client application.

Can anyone point me in the right direction?
 

ProScan

Software Provider
Premium Subscriber
Joined
Jul 2, 2006
Messages
7,465
Location
Ontario, Calif.
I sent Lindsay an email with basically the same info as below along with some source code so this reply is mainly for anyone that is considering working with the BCD536HP Wi-Fi.

Data
Set up the UDP socket and that's it. Send and receive the scanner protocol data normally just like a RS-232 serial connection.

Audio
The audio uses the RTSP protocol. https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol

Basically this is how to do it.
1. Create TCP socket
2. Create UDP socket
3. Establish handshake via TCP socket
4. Receive data on the UDP socket
5. Decode the Mu-Law Data into PCM
6. Send keep alives on the TCP socket
 

blantonl

Founder and CEO
Staff member
Super Moderator
Joined
Dec 9, 2000
Messages
11,115
Location
San Antonio, Whitefish, New Orleans
Thanks folks! This got me started... here is a short little PHP script that grabs the scanner info over UDP

Code:
<?php
$ip = "10.xx.xx.xx";
$port = 50536;
$str = "GSI\r";

$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);

while(true) {
  usleep(100000);
  socket_sendto($sock, $str, strlen($str), 0, $ip, $port);
  $ret = @socket_recvfrom($sock, $buf, 4096, 0, $ip, $port);
  if($ret === false) break;
  $buf = trim(preg_replace('/\s+/', ' ', $buf));
  echo "Message : < $buf >\n";
}

socket_close($sock);
 

ProScan

Software Provider
Premium Subscriber
Joined
Jul 2, 2006
Messages
7,465
Location
Ontario, Calif.
So this works without explicitly sending a periodic keepalive packet?

My testing results is If no keep alives then the audio stops sending on the UDP socket.
On the data side, no keep alives as a TCP socket not used.
 
Status
Not open for further replies.
Top