![]() |
Forum Index : Microcontroller and PC projects : Networking Hell...
Page 1 of 3 ![]() ![]() |
|||||
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
God bless DHCP - and I am not even Christian. Manually configuring network IP's etc, is more of a problem then I first thought! ![]() I am playing with the WizNet107SR network-to-serial module, and have had some basic success. Armed with the module, a suitable PSU and the configuration tool, I was able to find the module on my network, and set it's IP address so that it is in the same subnet as the rest of my network, which is the very common 192.168.x.x I can ping the module from my other machines - yay! ![]() So far, so good, but if I wanted to be able to ping this module from OUTSIDE of my home network - from the WAN, in other words, how would you go about doing that? I am guessing that I would need to setup some kind of port-forwarding on my router, so that specific connection requests would be forwarded to this WizNet module, and only that module, but I have really no idea where to start reading about all that stuff, so can anyone here point me in the right direction? This is a follow-on thread from the other one where I am talking about networking with the MaxiMite, but rather then go on there, I thought a new thread would be the way to go, then by the end of it - hopefully - we will have a thread explaining how to use something like the WizNet modules, connected to either the MicroMite or the Maximite to drive it's console over the net. That is the goal, anyway. Also, assuming you have a module like this, that is really a serial port on the network, how can you get the likes of TeraTerm to talk to a network serial port? TT expects a COM number, not an IP address last time I checked, so would love information on how you bridge that problem too. EDIT: I see that TT can talk to IP addresses, but I can't make it talk to the module - comes back with connection refused. Here are my current settings: ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
ajkw Senior Member ![]() Joined: 29/06/2011 Location: AustraliaPosts: 290 |
Does TeraTerm need the port number along with the device Ip address?? eg. 192.168.1.5:5000 |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Good thinking - tried that - refused. I put the 5000 in the port box that is on the TT window. I will try it as part of the IP address as you have written.... EDIT: 192.168.1.5:5000 asks for authentication, which is one step up on where we were before - I left the TT port number as the default of 22. Next, I changed the protocol to Telnet, and tried to connect again, and this time ir worked! Reading the manual a bit more, that makes sence, as Telnet is the supported protocol, so it says on page 21 - opps... ![]() I think I now have a connection to the device, so I will try hooking a MicroMite to the serial-port of the network module, then reconnect and see if I can talk to the uM via the network and TT - stay tuned! Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
It should be working. This is the setting I would try: ![]() You might have to allow the connection in the firewall settings. Jim VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
I have connected a MicroMite to the 107 module, and although it would SEEM I can connect to the 107 module via TCP/IP, I get no response at all from the uM. ![]() The experimentation continues. Once we can get it working on the LAN, I can then work on the WAN side of the idea. Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
When you get TeraTerm talking, you might find that it only sends text a line at a time. This is great for long distance connections but can be a pain for local networks. To change TeraTerm to send each character as it's typed, you need to edit teraterm.ini Find ; Line at a time mode EnableLineMode=on and change it to ; Line at a time mode EnableLineMode=off It will be about 2/3rds of the way through the ini file. Jim VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Thanks Jim - will look in INI shortly. Here is how I have the 107's serial port setup: ![]() Basically, default settings, and the uM is talking fine via standard serial on 38k4, so I know that part is right. EDIT: Changed the line in the INI file as suggested - still no response. The traffic LED on the network module is blinking every time I type anything in TT, so this would seem to suggest that the module IS hearing the data from TT via the connection, but I am just not getting anything on the TT screen. EDIT: Hang on a minute - this unit has on-board RS232 port, NOT TTL port, so the levels will be wrong, and the data will be inverted. I will pass it through a 232 corrector, then to the uM. ...hope I have not killed the uM with the 232 voltages - will check it now on the standard USB connection... EDIT: No, uM seems fine... Voltage measurement between TXD and GND and RXD and GND of the network module reveals only 5v there, so not sure what the hell is going on there. Manual says that these pins are "RS232C" TXD and RXD. At the very least, I guess that means it is inverted data. I have a few spare laptops - I will hook one up to the module's TXD and RXD directly, as it is supposed to be RS232, and see if I can send characters from TT via the network to the laptop terminal.... Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
SUCCESS!!! RS232 comms are working. From laptop terminal: ![]() ...and on TT on the main machine, via the network: ![]() You only see the goodbye message here, as I changed the font size in TT once I was getting something, to make it easier to read, that is why the hello message is missing from the TT screenshot. More experiments now - I will connect the network module via an external 232 corrector, THEN to the uM chip, and hopefully, we will be at talking stage on the LAN anyway. WAN will be next step. Smoke makes things work. When the smoke gets out, it stops! |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
For WAN just go into router and hunt around its settings. There will be posts on the www showing how. John |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Good news. When you get to WAN, all that you need to do is port forward port 5000 to the module address. Then you connect TT to your public IP port 5000 and it gets to the module. If you don't have a fixed IP, you can use one of the DNS services. This is one example of a web page that gets some data from behind a firewall/router and talks to something very much like a maximite with ethernet. http://www.c-com.com.au/VK7RBU.htm Most of the page is stored on a webserver and only the lower frame comes from the micro. This way, the workload on the micro is reduced. My IP is dynamic but I check it each hour and automatically update the web page with the new address as required. If you are doing anything critical, security can be a problem. Port scanners will find the open port and could do undesirable things to the system. Jim VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
The module software included a password, but I am not having much luck at setting it: ![]() Note that for testing purposes, I have set this simply to PASS. I can still connect to the module as before, but as soon as I type ANYTHING in TT, starting with 'P', the connection is closed. Don't know why at this stage, but if I can make the password bit work, then this would provide some degree of security against port scanners. Manual says: So, not sure what I am doing wrong here, but it is not liking my test password attempt at this stage. Can anyone see anything I am doing wrong here? Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Try with the password disabled for a start. Try setting network protocol to Telnet Jim VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Password disabled, and it works fine. Telnet is greyed out - the radio dot has to stay where it is. Telnet WAS selected as part of the connection from the TT end of things. EDIT: Additional - with respect to the port number, can you use any number as a port number, or do you have to use certain ones? I used 5000, as that was what was in the demo videos(along with 7000), so I just started there. Could I, for example, use something like 2468 as the port number? Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
I would avoid any of the 'well known ports' - numbers below 1024. It is possible that you will have problems with your ISP for some ports, depending on the firewall settings (if any). http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_number s It is also worth avoiding ports that are used for common applications because they might be scanned more often. Jim VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
My God - 61,000 possible port numbers - yikes! ...but, having said that, can I IN THEROY choose any port number I like from 0 through to 61,000? Smoke makes things work. When the smoke gets out, it stops! |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2944 |
regarding Port Numbers, in theory, yes any can be used BUT to be safe there are some exceptions as certain ports have a global (non) standard! Google will tell you which numbers are recommended NOT to use. Watching this with interest. By the way, can anyone say in a simple sentence what benefit a 'cloud' module gives over a non-cloud module? Thanks . . . |
||||
viscomjim Guru ![]() Joined: 08/01/2014 Location: United StatesPosts: 925 |
WhiteWizzard, I am no expert in this, but from what I can tell is that due to service providers constantly changing your ip address, I think this is called dynamic ip, not static ip, using a "cloud" it won't matter. Your device is now communicating with a known address instead of a constantly changing one. I noticed alot of web cameras do the same thing. |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
Where did that question come from? I can't find where anything talks about cloud (or non-cloud) modules :( John |
||||
viscomjim Guru ![]() Joined: 08/01/2014 Location: United StatesPosts: 925 |
Hi JohnS I think we were referring to modules like the electric imp that makes it easy to access from www but requires the use of their cloud to do so. Google electric imp, its pretty cool. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
There is a New Zealand agent here who sells the WizNet modules, and there is a newer version of the module. The ones I am playing with are Rev. 1.0, and the newer ones are Rev. 1.3 My ones are also RS232, and I plan to get a couple of the 1.3's in TTL, which should mean I can directly connect to the MicroMite or MaxiMite without needing an external 232-TTL converter. The ones I have here I bought from Sparkfun(I think it was) a good three or four years ago, so it would probably be prudent to do any further testing with the newer version of this module, and this step also allows me to go directly to TTL. EDIT: All working via the network, to the MicroMite. ![]() ![]() As my 107's are RS232, I had to use an external 232 corrector in-line with the network module and the MicroMite, but that done, it sprung to life. I can get rid of the 232 corrector once I have the TTL versions next week. EDIT: Well, HALF working - uM keeps failing to respond after about 5 seconds of active use. I can make the link work again fine, if I cycle power to the uM module, but again, the connection only works for 5-10 seconds, then all I get are the > prompt characters and nothing else. ![]() EDIT: I've changed the port number to 23 instead of 5000, as TT help was suggesting that port 23 should be used for Telnet stuff. Same result - talks OK for 5-10 seconds, then all I get are > prompts. However, this DOES mean that the link is essentially working, and the uM is responding, but only with the prompt, so I guess there must still be some setting or timing issue that I need to find. Another photo: ![]() EDIT: I have disabled debug mode in the config tool for the 107, hoping that this might have been the problem. From the manual: Nice idea, but did not help at all. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Page 1 of 3 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |