Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 days ago.
Improve this question
I have several Raspberry Pi connected to an ethernet hub. Every Raspberry Pi knows all the MAC addresses of the other Raspberry Pi connected to the hub.
Is there any way to make them communicate without the need to set up IP addresses and only using the MAC addresses?
The communications protocol that I need is very simple:
One Raspberry Pi is the master and always starts the communications.
It sends a message to another Raspberry Pi using the MAC address.
The addressed Raspberry Pi replies back to the master with the requested information.
Ideally, I'm looking for some kind of library that exists already and that I could use.
What you're planning to do it not generally advised as there's minimal error handling in the data link layer. So, you're going to have problems making sure packets are successfully received, let alone getting a reply.
Using layer 2 (data link layer) comes with its own problems and does not necessarily increase the link speed, as Raspberry Pi supports 1GBs ethernet.
I believe the only reason behind such question is to evade the hassles of changing dynamic IPs. You could always set static IPs for your RPis and target them using Http and such.
That being said, you could give python full access to the ethernet driver using this qustion.
Communicate on the data link layer (prior to obtaining IP address) with Python
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am currently teaching a remote middle school summer camp next year that involves microcontroller programming. I’ve chosen to avoid Arduino microcontrollers for the camp and use a MicroPython compatible microcontroller instead. One microcontroller that I am interested in using is the Lolin V 1.1.0 with an ESP-Wroom-32 chip since it is cheap and reliable.
One downside that I’ve noticed with this MCU is that a VCP driver needs to be installed in order to establish a USB to UART connection (It contains a CP210x chip). I’m not too sure how many Operating systems have a VCP driver installed by default. However, I tested to see if the microcontroller was able to be registered on three of my different laptops. On two MacBook airs, my computer was successfully able to locate the MCU without a virtual driver installed. Similarly, I used a Windows computer and a connection was able to be established after 10 minutes (Not sure why it took this long). Finally, I tried it on my friend’s European MacBook and his computer wasn’t able to locate the microcontroller until I installed the driver.
I’m expecting that the camp would be ~300 students and I don’t want anyone to not be able to connect with their Microcontrollers and don’t want to include the installation of the driver since it can be tedious.
Does anyone know how big companies that teach Microcontroller programming to beginners such as MicroBit, Raspberry Pi, or Arduino deal with this problem? How do they ensure that the microcontrollers are read by the computer without having to have students to go through the tedious process of installing a driver?
What percentage of Operating systems have a CP210x VCP driver already installed?
Are there any microcontrollers that don’t require a USB to UART driver installation altogether?
Thanks!
Ryan
It's usually not so much dependent the choice of microcontroller, but rather the USB-UART chip on board. There aren't many of those to choose from. SiLabs CP210x and FTDI's FT232/FT2232 are widely used families, so you can't really go wrong with them. Windows installs drivers for both automatically and seamlessly. Linux has support built into the kernel for all major distributions. Don't have experience with Macs, I'm a little surprised you had to do anything manually. Driver support for FTDI devices tends to be a little better across the board.
If you're interested in ESP32 and have a little more budget than for the Lolin, feel free to try the ESP-WROVER-KIT which has the FTDI FT2232HL chip and is generally much more feature-rich.
The only one I am aware of that is pre-installed in windows is microchip PIC (eg PIC16F1454) but a PIC is not the best device for teaching. You have to run an application on the device to use USB VID:PID 04D8:000A.
I don't have a machine to test it but maybe a microchip MCP2200 (04D8:00DF) will be the same.
I am working on edge computing for IoT applications and expected to create a system that acts as a near edge computer with the use of a raspberry pi hooked up to a dht11 sensor. How do I send this data over to a computer that is at the edge? Ideally I want to use my PC as this device but I have no clue how to send this data over in real time.
So far I have created the circuit and can view the temperature and humidity readings on the raspberry pi in python. Unsure of what the next steps are - I don't want to send this data over to the cloud just yet.
Side note: I believe i may be missing knowledge regarding this but is the raspberry pi an edge device because it is hooked up to the sensor directly?
Any help is greatly appreciated.
You need to think this through a bit more. What will you do with the temperature and humidity data that you receive?
For example, if you're just experimenting and want to just see the readings in a console on your PC, you can use netcat to send the console output of your Python program from the RPi to PC. No SW development needed, they just have to be in the same network. Not particularly useful for anything else, either.
Otherwise you need to set up some client-server solution between the RPi and your PC. There's a ton of possible solutions, all depending on what you plan to do with the data. You can use MQTT, HTTP, a straight database connection (MySQL, PostgreSQL), etc. You have to supply both sides of the connection. The Python code on client side which connects and sends data; and the server side thing that accepts the samples and stores them somewhere. Plus all the networking, authentication etc.
Or you can just download the Python client libraries for your favourite cloud solution and set that up according to a tutorial. TBH, this sounds a lot less work to me.
I want to make a network camera, stm32 through the camera to collect images, and then sent to the server through the WIFI module. As 1 second need to transfer a lot of data, so I would like to use the USB interface wifi module program to achieve. Or what better solution to achieve.
Thank you!
I think that you have no idea how the USB works.
You have a couple solutions.
Use a wifi module with SPI interface.
Use a SOC like CC3200.L
Use ESPxxxx module or similar (RTL8710)
You can of course try to use STM with host usb interface, but you will have to implement the USB host stack + driver for USB wifi module + network stack (eg TCP/IP stack). But it is quite complicated as the STM ones are not very good, there are some better paid ones - but expensive. USB host is not easy to implement.
If you want to go along the "networking over USB" path on STM32 (and I'm assuming you're not planning to buy any commercial drivers) it's going to be rough for you.
When it comes to USB, vast majority of the WiFi dongle drivers are proprietary and unless you're on an operating system such as Windows or Linux you're out of luck, unless you want to for the reverse engineering or porting at least parts of the drivers from Linux. With the USB you can think of using the USB-ECM (ethernet over USB) class, but two things here. One - ST doesn't provide any free implementations of this class so you're down do searching for it or implementing it yourself. After a bit of googling I've found one instance of this on githbu, although I havent tested it myself. Second thing - this is no longer wireless as you'll need to be connected to some kind of host providing internet connection, at which point it's probably better to not use USB-ECM and networking at all and just send data using a class that can be implemented easily (USB-CDC or USB-HID). I'm a bit worried about the throughput here.
You can also try to find WiFi modules that are connected over other interface. Generally those modules are connected over UART, some over SPI. This way, integrating it with the TCP/IP stack will also be up to you, at least when it comes to implementing the WiFi module protocol (most likely AT-commands) and implementing network interface so that the stack can "talk" to it. In this approach, I'm almost sure that you'll lack the throughput required for your application.
Personally I'd strongly suggest trying Ethernet if that's an option for you. It's going to be highest bandwidth (which you're going to need), plus it's most "out of the box". There's multiple projects implementing various applications using a free LWIP stack over this interface, including examples generated by ST's CubeMX.
I am newbie. I am having jennic nodes jn5148 ek010 and i am using jennet stack.I am using eclipse and provided libraries on win 7 . I wanted to know that whether wireless interface between these nodes , using jennet, is possible ,if yes then how?
Your question is not clear. So please, update your post to clarify what you actually mean.
Some background to the JN5148 boards is that they communicate via the IEEE802.15.4 protocol:
JN5148 product page
The IEEE802.15.4 standard provides a MAC and a PHY layer: Wikipedia reference. You can use this MAC layer directly or you can use Zigbee, which allows an application interface to the wireless communication: Jennic's implementation of Zigbee
If your question is whether you can communicate from your JN5148 to your PC directly, this is only possible if your PC supports IEEE802.15.4, which it probably doesn't. Otherwise you can always connect one dedicated node to your PC and communicate via a serial interface.
If your question is whether you can connect your nodes to the internet, then the answer is yes. 6LoWPAN is the version of IPv6, which can be communicated over IEEE802.15.4 or other low-power wireless communication: Wikipedia reference. In order to connect your 6LoWPAN network to the actual IPv6 internet you need an 6LoWPAN gateway as described here: Designing a 6LoWPAN Gateway
If I did not answer your question, please clarify what you want to know.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to do a high school project, where i want to create a remote control car with mecanum wheels using matlab. Would anyone know if this is possible and how it is done? I have ordered matlab now and it being shipped, therefore i can mess around with it soon.
MATLAB can communicate with external peripherals using an RS-232 serial port. (That kind of port, usually found on older computers, can be added to newer computers using a USB adapter.) You'll want to build or find a radio control system that can use that interface to connect to the computer, and then you will need to write a MATLAB program to send the correct commands in response to user input, sensors, etc.
Typically you need the following:
A computer with matlab, and an
gpib or some kind of io port
that can interface with your
actuator (in your case you
probably have 2, 1 for steering and
moving back and forward).
An I/O device that matlab can
connect to (typically it is serial
port as idealmachine said, but you
can get serial to usb/serial to
Ethernet drivers that make the
device look like serial devices if it is not specifically an RS-232 connector)
such as the serial port, and
make sure that device can properly
interface with your actuator. You may need the Instrument Control Toolbox
You must find an I/O device (the gpib or some other device - national instruments has a large variety that are as easy as plugging in a USB and only as hard as plugging a PCI card into a pc) that can read/write to your actuator. Make sure you:
Have the proper device drivers for your I/O
device for you PC
Understand what kind of signals your
actuator will accept
The fact that you are using mecanum wheels is less relevant than setting up your interface to those wheels. This undertaking is not simple, and may be out of the scope of your high-school courses, unless you have some really great teachers of course. Also this project will probably cost at least $3-400 after buying the I/O devices and your R/C car (if you have a computer you can use), matlab, and your actuation devices (if you need to get different ones or modify the existing equipment on the R/C car). Doing this wirelessly is just one more complication to your system - start off wired, then once you get the hang of it move up to wireless.
well you can always use an Arduino, Arduinos will be connected to Transceivers which will act as master and slave at the same time, control your car from Matlab, send code to Arduino and watch the magic happen.
Am I sure?
Yes, I am building one now however with automatic response, initial tests worked
so to answer your question, it is possible.