Help with PIC+Internet project


Closed Thread
Results 1 to 19 of 19
  1. #1
    Join Date
    Jan 2010
    Posts
    51

    Default Help with PIC+Internet project

    Hi, during my summer holidays now, I would like to do some project involving internet + PIC. I have bought a module ($15) which can connect to wifi. Can work as server and client. Can be used in adhoc or infrastructure mode.
    Following the advise in the device's manual and using the provided software, from my laptop I can configure the module ->> I am able to load my home network details into the module and it then connects to my home wifi fine. I can also load the server address and port number where it can then send data to (which currently is my laptop IP, running a server software and listening to the that port). Connected to the same network, I can send data from the module and receive it.

    I would like to know if there is any thing out there which can help me see if the data can be sent outside my home network somewhere on the web. I would like to know if there is any service which can give me an ip address and port number to which I can send data and then see it.

    The ultimate aim is to control something at my home via an app on the phone or something. Thanks

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,042

    Default Re: Help with PIC+Internet project

    What module is that?

    Keep us updated on any progress, I have the same project coming soon (residential alarm system).

    Robert

  3. #3
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    159

    Default Re: Help with PIC+Internet project

    Quote Originally Posted by Demon View Post
    What module is that?

    Keep us updated on any progress, I have the same project coming soon (residential alarm system).

    Robert

    I too would like to know. When my smoker controller is running well in automatic mode, I want it to be able to update me via text message.
    "I have noticed that even those who assert that everything is predestined and that
    we can change nothing about it still look both ways before they cross the street"


    -Stephen Hawking

  4. #4
    Join Date
    Jan 2010
    Posts
    51

    Default Re: Help with PIC+Internet project

    Quote Originally Posted by Demon View Post
    What module is that?

    Keep us updated on any progress, I have the same project coming soon (residential alarm system).

    Robert
    I tried uploading the user manual but it breached the limit. Here is the link to it - http://sdrv.ms/13MwvSh

  5. #5

    Default Re: Help with PIC+Internet project

    Briefly,
    1)Your router gives your wifi device a local address, 192...., 127..... or 10...., (unless you set a static address that must be the same local network) and you set your port number on your wifi device to listen on and/or send recieve.
    2)Log on to router and add a setting in 'port forwarding' to direct recieved (from internet) request with port number of your device to go to your local address of your device.
    3)now, if your PIC simply, continously ser-out's stuff, and you can place wifi device to tcp-listen mode, HyperTerminal can connect and continously display your data until closed.
    4) you can connect locally as you said you did, and ...... use 'WHO AM i' web site to get your Internet Service Providers given address to connect to your device the same way from the internet.

    don

  6. #6
    Join Date
    Jan 2010
    Posts
    51

    Default Re: Help with PIC+Internet project

    Thanks Don. 1 problem, I can't find the port forwarding option. I have taken a screenshot of (what I think is) the closest option. Please guide me through this. ThanksName:  1.png
Views: 1397
Size:  53.1 KB

  7. #7
    Join Date
    Jan 2010
    Posts
    51

    Default Clarification

    I saw some videos on your tube and found out how it is done. But before I start making changes to the router I would like to confirm
    1) If the information (based on my understanding) in the attached picture is correct?
    2) If yes then: Would it be correct to enter the external port 30000 and internal port 25000? (I just chose these ports randomly)
    3) If Yes then: Should I start listening to the 25000 port number at my laptop? As any data sent to the external IP of my router at port number 30000 should arrive at port 25000 of my laptop (provided I enter my laptop's IP in internal host (eg 192.168......) ?

    I am just a little worried about messing something up as I do not have any knowledge about this. All help is appreciated. Thanks
    Attached Images Attached Images  

  8. #8

    Default Re: Help with PIC+Internet project

    back to you when company leaves, you are on right track
    d

  9. #9
    Join Date
    Jan 2010
    Posts
    51

    Default Re: Help with PIC+Internet project

    Quote Originally Posted by amgen View Post
    back to you when company leaves, you are on right track
    d
    Thanks. I am sorry but I did not understood the expression "back to you when company leaves".

    I tried the above settings. This is what I did:
    1) Wrote IPconfig on the command window and got my laptop's internal IP-->> Inserted it at 'internal host'
    2) Chose a random port 5579 (external) & 2500 (internal)
    3) Chose protocol TCP/UDP
    ------SAVED THE SETTINGS SUCCESSFULLY ------

    Got my iPad, downloaded an app where if you supply ip and port, it sends a UDP packet to that address at that port. Ran the NETAssist software on laptop, chose UDP data, and started monitoring port 2500 at my laptops ip address.

    App tried to send data to my routers external IP which I got from google by typing 'my ip' at port 5579.
    ----RESULT: NOTHING SHOWED AT Net Assist software------

    Tried the same with TCP settings instead of UDP. Still nothing.
    Tried making both the ports same (internal/external) still nothing.
    What can I try next?

  10. #10

    Default Re: Help with PIC+Internet project

    check firewall on laptop (windows.....xp,7 ??) and allow or open for port 2500 and/or NetAssist program....... to allow data passing through firewall.
    d

  11. #11
    Join Date
    Jan 2010
    Posts
    51

    Default Re: Help with PIC+Internet project

    I have gone through endless options in Norton Internet Security to allow port 5578 (External port) but could not find any option. (Using windows 8).

    I tried sending the data through my ipad app internally (internal IP of laptop rather than external IP or router) directly to port 5579 (Internal port being monitored currently on laptop) and data did arrived. DO you still think it is a problem of firewall? As it does work internally but when sent to external IP of router it does not arrive. Could it be a setting on router, not opening the port 5578?

    Thanks

  12. #12

    Default Re: Help with PIC+Internet project

    windows8 .........control panel>system and security>windows firewall.........allow an app........... etc

  13. #13
    Join Date
    Jan 2010
    Posts
    51

    Default Re: Help with PIC+Internet project

    Thanks. The problem is HALF solved.

    I get the data if it comes from another place, I mean--> I switched on my phone's 3G connection --> I connected my ipad to internet by creating a hotspot through my phone --> I sent the data through the app to my router's external IP and this time it showed up on my laptop.

    Why is it not coming when my iPad is connected to the net through home wifi?
    Last edited by Tina10; - 16th June 2013 at 03:54.

  14. #14

    Default Re: Help with PIC+Internet project

    seems like it... is external port 5578 or 9 and internal port 2500, then net assist should be listening on 2500

  15. #15
    Join Date
    Jan 2010
    Posts
    51

    Default Re: Help with PIC+Internet project

    Sorry for the confusion earlier. As I kept experimenting, I kept changing the ports as well. For now, external is 5578, internal is 5579.

  16. #16

    Default Re: Help with PIC+Internet project

    Port forwarding in routers normally only work for traffic coming from external IP addresses, it will not work if you are logged on internally, that is why your Ipad when connected to 3G works, it is an outside access.

  17. #17
    Join Date
    Jan 2010
    Posts
    51

    Default Re: Help with PIC+Internet project

    Quote Originally Posted by aerostar View Post
    Port forwarding in routers normally only work for traffic coming from external IP addresses, it will not work if you are logged on internally, that is why your Ipad when connected to 3G works, it is an outside access.
    Is there any way around it?

    Thanks for the help everyone.

  18. #18

    Default Re: Help with PIC+Internet project

    at first i thought i could connect back to my LAN through router using the WAN (external address) because on connect, data was being returned,,,,,,,,,,but, unpluging the WAN cable to router, the data STILL continued comming.....meaning the router itself looped the connection back without exiting the LAN......
    looks like real external testing needs external sourcing.

  19. #19
    Join Date
    Jan 2010
    Posts
    51

    Default Re: Help with PIC+Internet project

    I have a hosting space. Is it possible to have some kind of arrangement like some kind of code or something which can listen to the incoming data at some port and then redirect it to the routers external address at specified port?

Similar Threads

  1. Need info on PIC+Internet
    By financecatalyst in forum Ethernet
    Replies: 4
    Last Post: - 9th September 2012, 08:04
  2. Remote light control using internet. Need Advise
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th March 2012, 15:38
  3. Replies: 5
    Last Post: - 28th January 2011, 14:21
  4. TCPIP/internet and Picbasic Pro
    By robertg in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th December 2008, 10:14
  5. Internet-Ethernet and Local Net
    By Ioannis in forum General
    Replies: 15
    Last Post: - 7th January 2008, 22:16

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts