Is it possible to target a specific Arduino device with the CC3000 Wifi over the web? - arduino-uno

I've got my CC3000 Wifi shield and Arduino Uno working as intended using the several libraries, including the aRest.h library. In order for me to control the Arduino from anywhere across the web, I configured the port-forwarding settings on the router to address the Arduino via the routers ip address.
My question is this: If I had a multiple Arduino modules/devices that relied on two way communication (client/server), how is the setup configuration automated for each device so that I could target a specific Arduino with regional data? I don't expect the end user to know how to access the router and configure port forwarding.
I hope this makes sense, I'm a newbie to the world of micro-controllers, but have had some success with progress as of late

You should be able to make a simple way to setup the Wifi, when this job is done you connect via socket so a socket server ( python,node,etc... ) and this will avoid any port-forwarding.
You will not need to care about all this messy tasks, you can have as many as you want arduino in the same network and access from the internet.

Related

Route websocket data through USB link to PC client (Android)

I have an issue where WiFi is not available on an Android device. We want to stream image data from the device using a websocket server (written using WebSocket++) through to the PC. However, I'm not sure if this is possible without operational WiFi. So, the position we are in is that we may only have the USB link available.
Someone today suggested we might be able to get Websockets working using adb port forwarding (see https://developer.android.com/studio/command-line/adb#forwardports), but I'm not sure if that's correct. Could this work, and what would that solution look like?
Are there any other reasonable options. I'm not certain if tethering is available on the device and if that could be another solution?

From WiFi to Cellular 3/4G on ESP32

I am building a project utilizing Wifi on the ESP32 module. Using RTOS, I am running a web server on 1 core and a web client on another core. This works very well and I can access the web server remotely via my browser and the WiFi provided IP address. The Web client reads some sensors and sends the data via WiFi to my database. All good and everything works as desired.
Now I need to do the next step and move beyond the reach of the WiFi and reproduce the same result via 3/4G cellular. I looked at the "easy" solution to use an industrial 3/4G WiFi router and simply keep what I have. Cost of these "industrial" type routers are on the high side, where as 3/4G module which also include a GPS chip are around half or less. Problem is that I cannot get my head around how I will "replace" my current WiFi functionality with one of these modules. The modules seems to expect you to connect via serial (rs232) and using modem AT commands establish a connection to the internet. Question is, after connecting to the internet, how do you continue to have "network functionality" same as with the built-in WiFi? Is there some library that will do ethernet over the serial port? Can I still have the WiFi and the "serial ethernet" running at the same time or switch between the two?
Thanks!

Developing a Mac OSX Network Driver for a Serial Port AT Command Based Modem

First allow me to say that I don't have any experience developing drivers for OSX, nor drivers for Windows. So, there are a lot of things that I don't understand about how drivers work; I'm sure it'll be evident in my question.
I have a modem that is able to open and close TCP/UDP sockets using AT commands. I would like to create some kind of program (kernel extension? driver?) that implements a network driver, converting the network interface calls into AT command serial messages.
That's the basic jist of it. I'm essentially asking if anybody can point me in the right direction / give me a high level overview of how they would approach it and what Apple guides to focus on.
The XNU networking stack -- like most network stacks -- expects network devices to send and receive IP packets directly. It isn't tooled to work with network devices that handle part of the network stack (like TCP or UDP) internally -- it won't be possible to implement a network driver which uses this device.
You might have more luck exposing this device as a SOCKS proxy. You will need to write a userspace daemon which listens on a TCP port on localhost (on the computer) and relays traffic to the serial device; once that's done, you can set the computer to use that device as a SOCKS proxy in the Networking control panel.
(As an aside: most devices that implement this type of interface have a very low limit on the number of open sockets -- often fewer than 10. They're unlikely to be able to handle the network load generated by a desktop OS.)

how to convert RS232 communication to TCP/IP communication

I have a created hardware communicating application using RS232 protocol in MFC. But as there is problem regarding voltage signal strength, i would like to shift from RS232 to TCP/IP.
Can anyone help me on this topic...?
The solution is to extend the microcontroller board with a serial device server.
Known brands are Lantronix or Moxa, but there are many other options and manufacturers. For an "embedded" solution that is integrated on your board, the "Lantronix XPort" is a typical product.
http://www.lantronix.com/device-networking/embedded-device-servers/xport.html
(I'm not affiliated with the Lantronix company.)
The Serial Device Server will connect to your RS232 on one end, and on its TCP/Ethernet side it offers usually a TCP server. It is usually configurable via network, through a built-in web interface, much like an Internet router.
Your PC application then needs to be changed as follows: Instead of opening a Windows COM port, you need to make a TCP client connection to that server, on a preconfigured TCP port. (Lantronix has 10001 as the default TCP port for this.)
But there is also special Windows driver software that lets you talk to your Serial Device Server / your microcontroller through a "virtual COM port". This is sometimes the best solution for legacy PC applications, where you cannot change the original code and have to use a Windows COM port. For a MFC application this might be a good choice.

Communicate from blackberry to winform app over wifi

I need to communicate to a winform app from a blackberry. Most of the development docs talk about webservice, which I am not hosting in my desktop app. Is there any other protocol I can use to communicate from the blackberry device? I was looking at sending very small commands via UDP.
The communication has to be done over WIFI only.
I can speak to the BlackBerry side of things. To open a UDP connection from the BlackBerry use the Connector class in javax.microedition.io. You'll have to specify WiFi as the radio interface to use.
The BlackBerry JavaDocs do a pretty good job of outlining things, but say you want to create a send-only UDP connection over WiFi to host 'test' on port 80, something like the following should work:
javax.microedition.io.UDPDatagramConnection connection = (UDPDatagramConnection)Connector.open("udp://test:80;interface=wifi");
Take a look at the JavaDocs for Connector for more information about the connection string format.
It sounds like you will need to be listening on a specific port on the computer, then sending commands to that computer on that port over the WIFI connection you'll be able to get them and respond accordingly.
you could possibly use http://www.codeproject.com/KB/IP/TinyUDP.aspx.

Resources