spider node

keith emailed about setting up for direct connect with the spider node
pull/11/head
accius 3 days ago
parent 5c71bbeb5d
commit 8852b42bf7

@ -19,12 +19,13 @@ app.use(express.json());
const CONFIG = { const CONFIG = {
// DX Spider nodes to try (in order) // DX Spider nodes to try (in order)
nodes: [ nodes: [
{ host: 'dxspider.co.uk', port: 7300, name: 'DX Spider UK (G6NHU)' },
{ host: 'dxc.nc7j.com', port: 7373, name: 'NC7J' }, { host: 'dxc.nc7j.com', port: 7373, name: 'NC7J' },
{ host: 'dxc.ai9t.com', port: 7373, name: 'AI9T' }, { host: 'dxc.ai9t.com', port: 7373, name: 'AI9T' },
{ host: 'dxc.w6cua.org', port: 7300, name: 'W6CUA' }, { host: 'dxc.w6cua.org', port: 7300, name: 'W6CUA' }
{ host: 'spider.ham-radio-deluxe.com', port: 8000, name: 'HRD' }
], ],
callsign: process.env.CALLSIGN || 'OPENHAMCLOCK', // Callsign with SSID -56 for OpenHamClock (HamClock uses -55)
callsign: (process.env.CALLSIGN || 'OPENHAMCLOCK') + '-56',
spotRetentionMs: 30 * 60 * 1000, // 30 minutes spotRetentionMs: 30 * 60 * 1000, // 30 minutes
reconnectDelayMs: 10000, // 10 seconds between reconnect attempts reconnectDelayMs: 10000, // 10 seconds between reconnect attempts
maxReconnectAttempts: 3, maxReconnectAttempts: 3,
@ -201,7 +202,7 @@ const connect = () => {
log('CONNECT', `Attempting connection to ${node.name} (${node.host}:${node.port})`); log('CONNECT', `Attempting connection to ${node.name} (${node.host}:${node.port})`);
client = new net.Socket(); client = new net.Socket();
client.setTimeout(30000); client.setTimeout(60000); // 60 second timeout
client.connect(node.port, node.host, () => { client.connect(node.port, node.host, () => {
connected = true; connected = true;
@ -216,6 +217,23 @@ const connect = () => {
if (client && connected) { if (client && connected) {
client.write(CONFIG.callsign + '\r\n'); client.write(CONFIG.callsign + '\r\n');
log('AUTH', `Sent callsign: ${CONFIG.callsign}`); log('AUTH', `Sent callsign: ${CONFIG.callsign}`);
// After login, enable DX spot announcements
setTimeout(() => {
if (client && connected) {
// Request recent spots first
client.write('sh/dx 30\r\n');
log('CMD', 'Sent: sh/dx 30');
// Then enable the spot stream (some nodes need this)
setTimeout(() => {
if (client && connected) {
client.write('set/dx\r\n');
log('CMD', 'Sent: set/dx (enable spot stream)');
}
}, 2000);
}
}, 2000);
} }
}, 1000); }, 1000);

@ -562,12 +562,15 @@ app.get('/api/dxcluster/spots', async (req, res) => {
// Helper function for DX Spider (telnet-based, works locally/Pi) // Helper function for DX Spider (telnet-based, works locally/Pi)
// Multiple nodes for failover // Multiple nodes for failover
// DX Spider nodes - dxspider.co.uk primary per G6NHU
// SSID -56 for OpenHamClock (HamClock uses -55)
const DXSPIDER_NODES = [ const DXSPIDER_NODES = [
{ host: 'dxspider.co.uk', port: 7300 },
{ host: 'dxc.nc7j.com', port: 7373 }, { host: 'dxc.nc7j.com', port: 7373 },
{ host: 'dxc.ai9t.com', port: 7373 }, { host: 'dxc.ai9t.com', port: 7373 },
{ host: 'dxc.w6cua.org', port: 7300 }, { host: 'dxc.w6cua.org', port: 7300 }
{ host: 'spider.ham-radio-deluxe.com', port: 8000 }
]; ];
const DXSPIDER_SSID = '-56'; // OpenHamClock SSID
async function fetchDXSpider() { async function fetchDXSpider() {
// Check cache first (use longer cache to reduce connection attempts) // Check cache first (use longer cache to reduce connection attempts)
@ -754,7 +757,7 @@ app.get('/api/dxcluster/sources', (req, res) => {
{ id: 'auto', name: 'Auto (Best Available)', description: 'Tries Proxy first, then HamQTH, then direct telnet' }, { id: 'auto', name: 'Auto (Best Available)', description: 'Tries Proxy first, then HamQTH, then direct telnet' },
{ id: 'proxy', name: 'DX Spider Proxy ⭐', description: 'Our dedicated proxy service - real-time telnet feed via HTTP' }, { id: 'proxy', name: 'DX Spider Proxy ⭐', description: 'Our dedicated proxy service - real-time telnet feed via HTTP' },
{ id: 'hamqth', name: 'HamQTH', description: 'HamQTH.com CSV feed (HTTP, works everywhere)' }, { id: 'hamqth', name: 'HamQTH', description: 'HamQTH.com CSV feed (HTTP, works everywhere)' },
{ id: 'dxspider', name: 'DX Spider Direct', description: 'Direct telnet to DX cluster (works locally/Pi only)' } { id: 'dxspider', name: 'DX Spider Direct', description: 'Direct telnet to dxspider.co.uk (G6NHU) - works locally/Pi' }
]); ]);
}); });

Loading…
Cancel
Save

Powered by TurnKey Linux.