Welcome to Radarspotting. Please login or sign up.

May 20, 2024, 06:08:18 AM

Login with username, password and session length

New Members

New Members

You should get an activation email when you join.  If not, please use the Contact option.

About receive Raw data from SBS-3

Started by junjun, April 08, 2022, 05:17:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

junjun

I got a SBS-3 used by someone for many years. But it's still workng. I want to receive raw data from it using python. I've read a lot of posts about receiving data using  network in our website,especially Guides.I don't get the points. So,i wonder is there  someone can  write something about SBS-3's network usages in detail. Thanks a lot.

Python program:
import socket
sk=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
address=('192.168.1.170', 10001)
sk.connect(address)
data= sk.recv(1024*2)
print(str(data))
sk.close()

return no data.

Anmer

Welcome to the forum.

Does the SBS-3 deliver data to Basestation across your local network?  Maybe first confirm that the SBS-3 is receiving usable data which can be processed by Basestation connected over your network?

To do this you need to connect the SBS-3 via Ethernet cable to your network, either using your router or a network switch.  The SBS-3 isn't WiFi capable.

Then launch Basestation and set the Data Source to Network:

Settings -> Data Source -> Use Network

The default IP:Port address of the SBS-3 is 192.168.1.170:10001.

Make sure in Basestation you have this address set:

Settings -> Hardware Settings -> Network

But:

1. The SBS-3 IP address and port may have been changed by the person who supplied it?
2. Your local network range isn't 192.168.1.nnn

I suggest you first of all confirm the SBS-3 is receiving and processing data across your local network.  This also requires a suitable antenna.

If you can confirm this we can move onto Python and Raw Data.

Here to Help.

junjun

Thanks for your quick response. According to your suggests, Basestation can display plane's information using Ethernet interface. I want to design the third application such as python program to process raw data. The program is shown on the top post. It receives no data. I don't know the reasons. 

Anmer

Here to Help.

junjun

I post my SBS-3's firmwareOptions. Only option 1 and 8 are enabled. I don't know what is the meaning of each option. There is not any notes about it in the referenceManual. Can anyone explain it?Thanks !

[attachment deleted reduce file load]

junjun

Thanks your help.I can receive the data from 10001 port with Ethernet using loop in my python program. The received data is strange and is not satisfied with API format.Are there any wrong.I post some received data below.
b'\x02\t\x00\x80\x1d\x00\x08\x0c\x10\x03c\x18'
b'\x10'
b'\x02\t\x00\xfc\xa1\x01\x08\x0c\x10\x03|f\x10\x02\t\x00`I\x03\x1c\xab\x10\x03\xb44\x10\x02\t\x00\xaeu\x04\x08\x0c\x10\x03\xa4\xd5'
b'\x10'
b'\x02\t\x00:\xb9\x07\x08\x0c\x10\x03\xae\x9f\x10\x02\t\x00\xe2\xe6\t\x08\x0c\x10\x03!\x84'
b'\x10'
b'\x02\t\x00\xa8*\r\x08\x0c\x10\x03V\x14'
b'\x10'
b'\x02\t\x00\xc4/\x12\x08\x0c\x10\x03\x17\xf4'
b'\x10'
b'\x02\t\x002{\x1d\x08\x0c\x10\x03v\xdc'
b'\x10'
b'\x02\t\x00\x05n!\x08\x0c\x10\x03\n\xc0'
b'\x10'
b'\x02\t\x00i\xe67\x1c\xab\x10\x03;\xb5'


Anmer

Ignore the firmware options.

The raw data should be on port 30006 - check the Reference Manual.  I am still away from home.
Here to Help.

junjun

#7
I try to use port 30006 in my python program. SBS-3 refused to visit. The result is posted in attachment.
import socket

sk=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
address=('192.168.1.170', 30006)
sk.connect(address)

while True:
    data= sk.recv(1024)
    if not data:
        break
    print(data,len(data))
sk.close()

[attachment deleted reduce file load]

Anmer

Do you have any other application using port 30006?

Do you see data on that port using Telnet?
Here to Help.

Faramir

Port 30006 is available via the BaseStation Software, so you need to connect to the IP of the computer running BaseStation and not the SBS3 itself. Maybe the stream from the SBS unit needs to be enabled too as was the case with a user trying to connect a Rpi to a SBS3 (or a SBS1eR, I forgot). Basestation does 'negotiate' with the hardware to enable the stream. To check, see if the green LED on the SBS is lit (when using Ethernet).

rikgale

I presume that you are trying to replicate what ModeSMixer2 does? Pull in the data from the SBS-3 and re-broadcast?

Don't know if there is anyway you can examine ModeSMixer2 input port. I.E. run ModeSMixer2 and run NetCat and examine what is shown in the datastream on the input port. Might be worth a shot?


Auto updated daily ZIP files on GitHub

Anmer

Quote from: Faramir on April 10, 2022, 05:51:06 PM
Port 30006 is available via the BaseStation Software, so you need to connect to the IP of the computer running BaseStation and not the SBS3 itself.

Raw data on port 30006 from an SBS-3 doesn't require Basestation to be running.  Page 95 of the Reference Manual:

https://radarspotting.com/forum/index.php?action=tportal;sa=download;dl=item456

[attachment deleted reduce file load]
Here to Help.

Faramir

I stand corrected! The SBS-3 I never owned so I can't see the extra options in BaseStation that can be configured for a stand-alone SBS-3. I referred to the SBS-1 usage that referred to port 30006 on BaseStation
I'll have to try and get my hands on a SBS-3 or keep my mouth shut when that model is the one used. Or both  :)

Anmer

Quote from: Faramir on April 10, 2022, 08:05:45 PM
I'll have to try and get my hands on a SBS-3 or keep my mouth shut when that model is the one used. Or both  :)

You were trying to help which is always a bonus.  Please continue to do so.
Here to Help.

junjun

Telnet:can not connect 192.168.1.170  30006