Following describes the configuration of the system and other details. The problem is mentioned after that. If the initial description is too much or not needed, please skip it.

enter image description here

I have a VPN (between two SIMs). One SIM is in a USB dongle, other one is in a WiFi Router. The dongle is connected to computer 'A', and another computer ('B') is wirelessly connected to the WiFi router which can access the dongle. VPN is between the router and the computer 'A' (dongle). As WiFi router lease 'B' a private IP, 'A' can't ping 'B'. But 'B' can ping 'A'. There is no any issue up to now.

I have created a socket based simple java network application (client - server pair). Client is running on 'B', server is running on 'A. Only client can send data to the server, other way is not possible. This part also is OK. Now I need to replace the computer 'B' with an Arduino. I need to send some data from Arduino to computer 'A' through the same network.

For this Arduino need a WiFi module to access router. I've this Usart WiFi module with the shield.It can successfully connect to the router, (i can ping it from a computer which is also connected to the router).


Now the configuration is as below.

enter image description here

There's the (server) application running on computer 'A', which is listening on a given port (port 8090). How can I send some data (eg. some text "hello!"), from Arduino to the computer 'A'.

Please note the WiFi module I'm using, i found some examples for applications based on Arduino WiFi shield, but i can't apply them for my configuration (isn't it?).

  • 1
    \$\begingroup\$ From the page it looks like the Wifi module is listening for HTTP connections and will feed them to the serial port. So you'd have to initialize a connection from the computer to the module, in order to exchange data. \$\endgroup\$ – svens Aug 17 '13 at 12:07
  • 1
    \$\begingroup\$ Okay, I had a look at the datasheet and you can switch the mode to server and specify a hostname/IP with AT+ commands. See page 34 of the manual. \$\endgroup\$ – svens Aug 17 '13 at 12:27
  • 1
    \$\begingroup\$ While there's a lot of complexity to your setup, most of it should be transparent - you simply need to initiate an outbound connection to a server. So it does not actually seem like your problem should be any different from the case of the "use a wifi shield to tweet whenever the refrigerator is opened" type example projects. \$\endgroup\$ – Chris Stratton Aug 17 '13 at 15:43
  • \$\begingroup\$ thanks ChrisStratton, think you are correct. I'll look for such a project. Thanks to @svens too. Though still there's some problems, i could find a kind of temporary fix (which is good for the moment). The module does what i need when it is configured as a client. I'll get back to this thread after a while. \$\endgroup\$ – Anubis Aug 17 '13 at 16:55
  • 1
    \$\begingroup\$ And why do you need VPM on your Arduino? So some hacker can't figure out when you start you coffee pot via Twitter? Such sensitive information you're dealing with. :P Anyway, are you trying for a router or an Arduino to manage the VPN? I think that an Arduino couldn't handle it... have you seen other tutorials? Wait... building on what @svens wrote: You'll have to use the AT+ commands to open the port, connect to the router, and manage the device. When something comes in, it should just send it directly to your Arduino and you can read it with the Serial library; like the serial monitor. \$\endgroup\$ – Anonymous Penguin Aug 18 '13 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.