connections blocked [caused by ignorant user]

Everything else that doesn't fall into one of the other PB categories.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

connections blocked [caused by ignorant user]

Post by heartbone »

I am trying to figure out why my network connections aren't working as they should.

I am using the PB supplied example programs, "NetworkServer.pb" and "NetworkClient.pb".

In the testing loop are three machines,
(A) my main development desktop, dual booting Windows® XP Pro & Ubuntu 13.10
(B) my laptop, Windows® Vista x64
(C) my daughter's desktop, Windows® XP Pro

The problem is that machine (B) or (C) will not connect to (A) when machine (A) runs the server (in either Windows or Linux).
The other combinations of connections work.
(A)XP & U13.10 client, and (B)Vista client connects to the (C)XP server.
(A)XP & U13.10 client, and (C)XP client connects to the (B)Vista server.
However neither the (B)Vista client, nor the (C)XP client will connect to the server on (A)XP or U13.10.

I have not experienced any major problems with networking on my system, I use it every day without apparent problems.
But I do recall that there have been a few LAN games where I could not host, and I had to let my daughter do it for us to play.
Most networked games have no problems with my machine hosting, and I even occasionally port forward to host a game of Planet M.U.L.E..

Does anyone have a clue to why this might be happening?
What could be the likely culprit?
I'm hoping that the solution is simply to adjust some unknown communications protocol system setting,
but because it happens in both Linux and Windows® I'm thinking it's not OS level software.
If no one has any experience with this problem to offer possible solutions, then I may have to go for a different network card.
Last edited by heartbone on Thu Jan 29, 2015 7:48 am, edited 3 times in total.
Keep it BASIC.
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: connections blocked

Post by Thunder93 »

When running server application, be sure it's not complaining about creating server on (A)XP.

Recheck the Router and (A)XP firewall configurations.

Remember if you have third-party software firewall installed, configuring that and if XP built-in firewall is also still enabled, to configure that also.

Make sure that you configuring the firewall to use the correct TCP port .. 6832 based on PB examples.

Are you trying to connect via Private IP (192.168... ) or the ISP external IP address? If you testing just under the same private network, be sure to specify Private IP addresses.


It would be nice to know if your computer hosting a server actually receives the TCP SYN requests. Have the firewall configured to monitor for incoming TCP connections requests to the specified port .. or 6832 based on PB examples.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: connections blocked

Post by heartbone »

Thunder93 wrote:When running server application, be sure it's not complaining about creating server on (A)XP.
Check.
Recheck the Router and (A)XP firewall configurations.
Check.
Remember if you have third-party software firewall installed, configuring that and if XP built-in firewall is also still enabled, to configure that also.

Make sure that you configuring the firewall to use the correct TCP port .. 6832 based on PB examples.

Are you trying to connect via Private IP (192.168... ) or the ISP external IP address? If you testing just under the same private network, be sure to specify Private IP addresses.
I only have the default XP firewall. My initial testing is using the LAN addresses 192.168.0.100-104 (My router was set to use the 101-104 range until I updated my router firmware last night.
It would be nice to know if your computer hosting a server actually receives the TCP SYN requests. Have the firewall configured to monitor for incoming TCP connections requests to the specified port .. or 6832 based on PB examples.
Yes it would, but knowing how to accomplish that is beyond my current expertise.

I swapped the ethernet cables at the router ports, and rebooted everything but the cable modem, yet my systems kept the same local IP addresses after rebooting.
And the same blocking problem occurred.
I upgraded the router's firmware and still the same problem persisted.
This morning I again swapped the cables to different ports and rebooted everything and still I get the same IP addresses....
but the server now works on my desktop(A) when running XP
and the server now can't be connected to when it is running on the Vista laptop (B)!
So it seems as if the problem is somewhere in my router.
For now, until the router changes, I can run either the client or server example from my desktop (A) running XP,
and successfully connect with daughter's XP desktop (C) running the client or server.

Now the next issue is to determine why the server software running in Linux does not get connected to, when the XP version of the server running on the same network does.
The Linux client running on my desktop does connect to the XP server running on my daughters desktop.
I neglected to install Samba on my daughter's Linux installation, and her OS version is now too old to get updates through the software center.
I'm not sure, but to test a Linux to Linux connection, I think that I might have to update her computer to a new version of UBUNTU and she doesn't want that.
I certainly hope that it won't be Windows® only hosting for now. :?
Keep it BASIC.
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: connections blocked

Post by Thunder93 »

What's the manufacturer name and model # of your Router?
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: connections blocked

Post by Thunder93 »

You swapped ports, and even though all the IP assignments remains the same now the other computer is affected. Sounds like either the Router configuration is misconfigured or a bad Ethernet port on the router.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: connections blocked

Post by heartbone »

Thunder93 wrote:What's the manufacturer name and model # of your Router?
Tenda W311R
Keep it BASIC.
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: connections blocked

Post by RichAlgeni »

There is no reason why you can't run the server and client process on the same machine. Make sure that works correctly before trying to move to multiple machines.

If you are still having an issue, you can use built in Windows Command Line tools like 'telnet' and 'tracert'.

Take small steps when learning sockets. If you need more help, just let us know.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: connections blocked

Post by heartbone »

RichAlgeni wrote:There is no reason why you can't run the server and client process on the same machine.
Actually there are several.
The main one is that both processes need to use the keyboard and I'd have to rewrite existing working code that otherwise does not need to be altered.
I believe that it is much better to develop the programming while testing in the target operating environment if at all possible.
Make sure that works correctly before trying to move to multiple machines.
It can't work correctly on the same machine without extensive unproductive and unnecessary changes.
In addition to the just finished Psychic Deducer (3 players) and last spring's SURROUND (2 players), I have another three long ago finished console style multiplayer game programs (DarkBASIC; 2 player and 5 player) (AMOS; 4 player) all containing AI opponents which could be substituted in case of a player disconnect, that are just begging to be ported to PureBasic and networked.
If you are still having an issue, you can use built in Windows Command Line tools like 'telnet' and 'tracert'.

Take small steps when learning sockets. If you need more help, just let us know.
LOL, are you trying to confuse or scare me?
I have no plans, or need, to learn sockets to make my simple games.
If the PureBasic commands work as documented, then I should be able to make them do the necessary communication.
Over a decade ago I wrote a real-time networked 3D tank shooter using DarkBASIC without knowing a lick about sockets,
so I doubt it I'd need to learn about them to develop a 2D game using PureBasic.
At least that's the plan.
Keep it BASIC.
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: connections blocked

Post by RichAlgeni »

I am constantly amazed at people who ask for help on an advanced subject, yet seem to have no concept of reusable code or unit testing. When I made the comment 'there is no reason why you can't run the server and client process on the same machine,' I assumed you had broken out your code into procedures or even modules. This would allow you to plug that code into a small console calling routines, and perform what the industry describes as 'unit testing.' This is testing small units of code in as many ways as possible, so that code can be reused in other programs. I also meant that there is nothing system wise that would prohibit running a client and server process on the same machine.

Breaking your code down into procedures would also allow you to paste it to a thread easier, and you would be more likely to receive a helpful response.

The PureBasic commands WORK fine as documented. Of course, there will be the occasional bug. However, in my opinion, and with the experience of having PureBasic network code running on multiple client's production systems for a number of years now, I can say with great certainty that the network code is reliable.

Since the network code is solid, and with your 10 years experience with networking, I'm sure this task will turn out to be trivial for you.
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: connections blocked

Post by heartbone »

RichAlgeni wrote:I am constantly amazed at people who ask for help on an advanced subject, yet seem to have no concept of reusable code or unit testing. When I made the comment 'there is no reason why you can't run the server and client process on the same machine,' I assumed you had broken out your code into procedures or even modules. This would allow you to plug that code into a small console calling routines, and perform what the industry describes as 'unit testing.' This is testing small units of code in as many ways as possible, so that code can be reused in other programs. I also meant that there is nothing system wise that would prohibit running a client and server process on the same machine.

Breaking your code down into procedures would also allow you to paste it to a thread easier, and you would be more likely to receive a helpful response.
Dude, you are posting these replies into the wrong thread, because you clearly are not responding to the contents of this one.
My problem and question was not code or programming related, and as I suspected, it turned out to be a hardware related issue.
The PureBasic commands WORK fine as documented. Of course, there will be the occasional bug. However, in my opinion, and with the experience of having PureBasic network code running on multiple client's production systems for a number of years now, I can say with great certainty that the network code is reliable.

Since the network code is solid, and with your 10 years experience with networking, I'm sure this task will turn out to be trivial for you.
I only have one year experience with network programming in BASIC from eleven years ago.
Real life experience tells me that the actual programming tasks that await me will be many, and I can assure you will be non-trivial.
RichAlgeni, I will be comforted by your great certainty about the reliability of PureBasic networking functionality... if it includes Linux development. ;)
Keep it BASIC.
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: connections blocked

Post by RichAlgeni »

Great!

Let us know when you get done, I'd like to see it.
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: connections blocked [caused by bad router]

Post by Thunder93 »

I had a feeling it could be bad hardware. I'm happy that this was sorted out. :)
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: connections blocked [caused ignorant user]

Post by heartbone »

My plans are to include a chat function within PSYCHIC DEDUCER.
Yesterday afternoon I decided rather than trying to develop that chat functionality within the game's framework, I'd attempt to make a trivial stand alone chat client/server program.
I did it primarily to explore and verify what I've learned this past month about PureBasic's version of network programming, without having to muck around with the existing game code.
Then I could get quicker results to verify the networking behavior, or detect any more nasty hidden technology problems.
RichAlgeni wrote:Let us know when you get done, I'd like to see it.
Here you go Rich. It's named ESChat , and it uses the SendNetworkString() command (without any socketry) to instantiate a server supporting up to 3 clients.
I've tested it as much as I think necessary over my LAN, but being a lone ranger, I don't have anyone available to help me with internet testing.
Also I've recently switched from DSL to a cable connection, and I have not learned how to do port forwarding for my current router and modem.
So if any of you out there have easy internet access to other tech savvy individuals, and are setup to host networked connections, please check out my tiny program by connecting over the internet.
Anything written in such haste is bound to have bugs, but at this point, I don't know of any.
I'd really like some other eyes to take a look to find some, so I can squish them before I bake them into the DEDUCER.
Of course, any positive and or constructive feedback is always appreciated.
Keep it BASIC.
User avatar
RichAlgeni
Addict
Addict
Posts: 914
Joined: Wed Sep 22, 2010 1:50 am
Location: Bradenton, FL

Re: connections blocked [caused by ignorant user]

Post by RichAlgeni »

Great! I'll take a look.

Sorry for before! I am a bit over-enthusiastic when it comes to network connections! As you can probably tell. I have to realize that everyone has their own interests, and their own way of doing things!

Rich
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: connections blocked [caused by ignorant user]

Post by heartbone »

There was an intermittent bug with the display of logged in guest names, and I finally found and corrected it.
Without any feedback, I'll assume that the code is otherwise good.
I deleted the buggy executable linked above, and posted the source Rich, so you can see how I do network programming in PB without socketry.
Keep it BASIC.
Post Reply