Looking for a Wi-Fi microcontroller to use with a robot - webserver

I want to make a Wi-Fi controlled robot.
After a lot of research, I decided to use an Asynclab's BlackWidow which was the best way for me to do this.
But unfortunately, this product is out of stock everywhere!
I ordered one on roboshop and I got the message 25 days later: Sorry, this product is sold out.
So, I'm looking for another microcontroller with a Wi-Fi interface.
I also need this very quickly (because it is for a school project), and it must be as cheap as possible.
I've been looking all the day but I couldn't find something as "good" as the BlackWidow.

You can get the WiFly shield from sparkfun.

In the past I have used a Linux router (with positive results) with Gargoyle (OpenWrt based) as a wireless gateway and communicate with it through a serial port, as most of them attach a console to the serial port so that you just have to send the command and '\n' to be executed. With the cURL libraries should be fairly easy to communicate without much effort with whatever you want.
You have the power of Linux and a pretty powerful CPU, can configure it through the command line or web page, and most important, a lot of routers are much cheaper than the 'BlackWidow'.
The one I used is the Fonera+ (unmounted doesn't take much more space than an Ethernet Shield) and used to cost around $28 although it is now deprecated, but some other routers from Linksys, TP-Link, etc. are also compatible as stated in the OpenWrt Compatibility Table.

Related

Is it hard to code in Perl a network analyzer if you scan the whole network instead of a single switch?

May I ask this question for experienced programmers in Perl and knows a thing or two about network programming. Here's the thing, We have a program to develop in Perl about network analyzers, our scope is that we only scan traffic passing through the switch where the host is connected to, will it be difficult if we scan the whole network instead of only one switch? Me and my team are wondering if this will take a lot of time in coding it, or maybe it will only take up one line of code, something like that. I hope my question is clear. Thanks in advance.
That's not a problem of Perl, but how you get the data to the machine where your analyzer runs. Usually you will only get data for the local machine when using a switch (except for ARP requests), so you need get access to a specifically configured port of the switch (mirror port). To get access to all the data in the network you either need to be connected to all the mirror ports of all switches in the network, have special devices to collect all traffic (network tap) or create some kind of sensor network to accumulate data from various places.
Apart from that I would not use Perl for high-speed network analysis (which is usually needed if you want to analyze data from the whole network). Even with C it is not simple to do a fast capture and Perl introduces too much overhead. But you might use Perl for the analysis of a reduced dataset, e.g. after doing lots of filtering on the original data.

Where would I learn more about interpreting network packets?

I'm working on a personal project. It's to recreate server software for the game "Chu Chu Rocket" for the Sega Dreamcast. Its' servers went down in 2004 I believe. My approach is to use dnsmasq to change the originl hostname that the game originally connected to, to my own system. With a DC-PC server set up, I have done just that, now instead of it looking up a non-existent dns record, it connects to my computer which will eventually run the server software. I've used tshark (cli wireshark) to capture what's going on between the client (dreamcast) and the server (my computer). The problem is, I'm getting data, but I'm not sure how to interpret it, I don't know what it's saying, but I'm sure it can be done because private PSO servers were created, those are far more complex.
Very simply, where would I go about learning how to interpret data packets, and possibly creating packets that will respond to such queries from the client?
Thanks,
Dragos240
If you can get the source code for the server software on your PC, then that is the best place to look.
Otherwise, all you can do is look at the protocol, compare runs, and make notes of similarities and differences. With any luck, the protocol won't be encrypted.

What software can I use to simulate cellular connection

We need to do some stress testing of our system, and we would like to be able to simulate non-ideal situations: things like latency, jitter, etc. In particular, we would like to simulate behavior of data over a cellular network.
Do you know of any hardware/software/both solutions that would work?
Thanks
Ideally you would get some idea about parametrization from a real simulator like ns3. Or write one yourself.
Additionally you could use the Linux kernels built-in QoS stack which provides the netem module which can be used for these purposes. netem provides network emulation functionality for testing protocols by emulating the properties of wide area networks. The current version emulates variable delay (jitter), loss, packet corruption, duplication and re-ordering. It supports distribution based opteration or you could script it to change certain values during run time.
Wifi card with an older access point/router, simply take the test station to the edge of the range and you should be able to reliably cause the connection to fail and reconnect. Only reason I sugest an older model is that the range generally weren't that fantastic on the older "802.11b" stuff.
But other than just being a lossy connection, I am not sure you'd be able to use this setup to test certain characteristics of a cellular connection, but it should work.
If you are in the US, an iPhone on AT&T would probably do it..
Probably need something along the lines of:
USRP Board, OpenBTS, TrixBox/Asterisk
You can check out OpenBTS(http://openbts.sourceforge.net/) and see if it will do what you need. You could have it use the USRP board as a tower, then use it similar to a loopback. I do know that the above combination will allow phones to connect to it like a cell tower(See BurningMan/DEFCON 18), so in theory it should allow you to broadcast out to saturate the spectrum.
OpenBTS-UMTS include 3G data http://openbts.org/w/index.php?title=OpenBTS-UMTS
You can download and compile on Ubuntu 16.04, there is some issue with dependencies on Ubuntu 18.04.
About hardware, i used both Ettus USRP N210 and X310.

Interface between a DSP/Microcontroller and a PC application

I'm using a DSP to control a sensorless brushless DC motor, The DSP is on a board which has a parallel port and a jtag connection (it's an eZdspTMS320F2812). What would be the best way to communicate between a PC application and the DSP as it was running? Ideally I'd like to have a GUI program with buttons like start, stop, accelerate, decelerate... but I've never done anything like that before. Which ports and method would be easiest to use?
Thanks
You can also use simple RS232 communications. I use always because it`s cheap and easy to implement.
The RS232 transceivers are very cheap (like MAX232 from Maxim-IC), and easy to use. Also they come in many packages like DIP or SOIC for example and can be found almost every electronic shop.
You can use any USART from your microcontroller to link with MAX232. Then, using a PC serial-usb converter (or if your PC does have a serial port it`s easier), you can use serial port programming from any programming language to develop your desktop application.
After that, all you have to do is create a protocol to exchange data between your PC programm and your DSP (some simple commands to start, stop and change motor direction for example).
Good luck in your project.
The parallel port is probably the easiest route. Depending on what OS and programming language you are using you should be able to find example code or libraries to support bi-directional communication via the parallel port. Since you have a small set of commands that you might want to send to the DSP board then you can probably just send a single character to the board for each command, e.g. 'R' = start, 'S' = stop, etc.

How to Monitor Sockets activity in a computer?

I want to write a program from scratch to see the sockets activity, what they send, what they receive, etc. I don't want to use a Library because it's more for academic purposes than anything else.
Where should I start?
Just to be clear: my program won't be connecting to anything or creating any socket, it just wants to listen to the activity in a computer.
Any thoughts (in any OS) about where to start will be appreciated.
Thanks in advance.
Take a look at libpcap/WinPcap.
You are out of luck as far as portability goes.
Although the application APIs are the same or similar for UNIX and Windows, and, both implementations are historically based on the same Berkeley Sockets BSD code, the operating system architecture and hence the ways you access low level OS functions such as network IO are completely different.
Linux has a number of 'network sniffing' tools(tcpdump, ethereal etc.) easily available. Not so sure about windows, MS provides a Network Monitor and there are some tools available -- Google 'Sysinternals TDImon' for the MS tools.