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.
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.
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.
I have to go on a trip in a few minutes.
Please look at Page 95 of the Reference Manual:
https://radarspotting.com/forum/index.php?action=tportal;sa=download;dl=item456
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]
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'
Ignore the firmware options.
The raw data should be on port 30006 - check the Reference Manual. I am still away from home.
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]
Do you have any other application using port 30006?
Do you see data on that port using Telnet?
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).
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?
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]
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 :)
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.
Telnet:can not connect 192.168.1.170 30006
You can't just Telnet into the SBS-3 and see what it is sending. You would need to get a connection up and running and then examine the data in that connection. Hence the NetCaT suggestion ;)
Thanks for all of suggests,i finally solve the problem. I order to use port 30006 or 30003, BaseStation should be on.In third application,the IP must use the one of computer running BaseStation,not the ip of sbs-3 box.
Thanks again.Thanks to Faramir.
Quote from: junjun on April 12, 2022, 03:30:28 AM
Thanks for all of suggests,i finally solve the problem. I order to use port 30006 or 30003, BaseStation should be on.
Yes that will work. But the SBS-3 can be used as a stand-alone receiver with raw data available without running Basestation, which is what you were trying to achieve.
OK. Apologies for not testing this earlier but I have been away from home.
There are some prerequisites to using the SBS-3 as a stand-alone receiver.
1. Launch Basestation so you can access the Non-Volatile Memory Settings. Settings -> Non Volatile Memory Settings (see attachment). If you can't see this option you're not using an SBS-3!
2. On the Stand-Alone Data tab, enable the first three options (see attachment).
3. On the Ethernet Setup tab, check the Main Connection "SBS-3 as Server" and set the required port number, default should be 10001. (see attachment). Also check IP address.
Close Basestation and your application should be able to access data on the IP address and port number configured on the Ethernet Setup tab. Mine does.
[attachment deleted reduce file load]
Thanks for your patience.In the mode of Stand-alone receiver,i can receive raw data from port 10001 without running Basestation. The data just like the post.But I can not receive any data from port 30003 or 30006 if Basestation don't run.
Quote from: junjun on April 12, 2022, 03:25:53 PM
The data just like the post.But I can not receive any data from port 30003 or 30006 if Basestation don't run.
That's correct. If you want to use the SBS-3 as a stand-alone receiver, the raw data is on port 10001. If you want data on ports 30003 and/or 30006, you must run Basestation. Or change the port number for "SBS-3 as Server" as described in my previous post.
@junjun - once you are at a place that you have your python code up running/outputting data, let me know. I would be happy to test as I can network my SBS-3 and run the code on a Raspberry Pi. I can not write code to save my life, but happy to test.
Quote from: junjun on April 12, 2022, 03:25:53 PM
Thanks for your patience.In the mode of Stand-alone receiver,i can receive raw data from port 10001 without running Basestation.
Reading your first post, isn't this what you wanted to achieve?
Quote from: junjun on April 11, 2022, 03:00:15 PMTelnet:can not connect 192.168.1.170 30006
That would be the expected response - as Faramir explained above, you can't connect to the SBS (box) on port 30006.
You need to Telnet, not to the IP address of your SBS, but to the IP address of the PC running BaseStation.
Conversely, if your application is capturing data direct from the SBS (without BaseStation being in the loop), then it's port 10001 on the SBS that you need to connect to (unless you have changed it from the default).
Dave (getting back into SBS networking after a very long break).
Quote from: DaveReid on April 14, 2022, 07:51:21 AM
Dave (getting back into SBS networking after a very long break).
Welcome back Dave, you've been missed.
Quote from: DaveReid on April 14, 2022, 07:51:21 AM
Dave (getting back into SBS networking after a very long break).
Fantastic to welcome you back!!!
It's like riding a bicycle young sir!Trust you are keeping well.
Regards-
G.B.
Thanks for all of your help.