How can I have my pc comunicate over ethernet with mbed NXP LPC 1768 - mbed

I'm an engineering student, and to be honest a beginner in drivers writing. What i'm trying to achieve right here, is have the titular board talk with my pc over ethernet, so i'm asking for some useful tips regarding the communication setup, like pinging it from my pc.
Many Thanks.

Since LPC1768 doesn't come with a RJ45 jack, you need to somehow connect a RJ45 jack to your mbed. This page may be helpful. https://os.mbed.com/cookbook/Ethernet-RJ45
Once you have physical connection, connecting a mbed device to internet is pretty easy with Mbed OS EthernetInterface library. You can find API and examples here. https://os.mbed.com/docs/mbed-os/v5.12/apis/ethernet.html

Do you need to use Ethernet? Why not using USART directly by using e.g. use a USART to USB converter like the FTDI chip.

Related

How does USB integration work from the device end?

Hopefully I will have more luck today. I have no prior USB integration and about 8 months of learning embedded systems on Atmel devices. I am trying to use an Atmel SAM L series to connect over USB to a computer. The use case is for data transfer. Specifically, the MCU will be gathering data from it's sensors and packaging it for USB transfer.
I have searched through and read up on all of Atmel's included USB examples. I have also started reading through usb.org's class specifications for CDC.
I have running now something that lets me send data along one com port, into the target usb and then out the debugger usb to another com port. However, I don't think this is real USB.
My problem is two fold.
1.) I do not fully understand what differentiates USB from serial communication on a com port.
2.) Even if I were doing it correctly, I'm not sure how to test and verify that I have indeed created a legitimate USB device that can be accepted by a host computer.
Links to documentation(Atmel or generic) or example code would be appreciated.
1) USB is defined in the USB specifications from http://www.usb.org. Serial ports were an older and simpler interface that involved sending data back and forth asynchonously on pins with names like TX and RX. The USB CDC class and its ACM subclass allow you to make a USB device that emulates a serial port. If you make your device be a USB CDC ACM device, then you don't need to supply any drivers for Windows 10, Linux, or Mac OS X.
2) You can read the USB specification and the CDC ACM specification. You can run the USB command verifier. You can test your device with a variety of different USB hosts to make sure it works.

webcam interfacing with stm32

I want to use the STM32F4 microcontroller to receive a video stream then stream it over ethernet with the rtsp protocol .
I need you guys to tell me wich circuit would be the best for interfacing with STM32.
Can I interface a webcam with the STM32 via the USB OTG ? (I have basic ideas about usb protocol, but the problem is that the webcam I have is not supported by linux so there is no code source for the drivers, so no Endpoint references ...)
Is it possible to define Endpoints and vendor-specific commands that trigger the bulk transfer of video ( streaming ) by debugging the usb traffic ?
Or, would you recommend another circuit that provide video stream simple to interface with the STM32 .
I know this is kind of crazy thing to do, but I'm asking how hard it's gonna be ?
Let me know what you think of this project ?
PS:
The rtsp part of the project is not the purpose of this topic .
Thanks in advance.
You can't easily run linux on an STM32F4, nor is getting a USB stack running on it, and writing your own webcam driver trivial. I would recommend going with some sort of embedded camera, or moving up to a processor that can support a full linux distro running on it.
As stbtrax mentioned the STM32F4 processor cannot really handle video processing, so your best to move to an embedded OS system such as Odroid.
Another option is to interface a camera direct to STM32F4 using DCMI and then stream theis over USB using UVC as this guy has done. You will be limited with resolution here.
https://github.com/iliasam/STM32F4_UVC_Camera

Is it possible to determine usb protocol from an installed driver?

Just as the question states, the goal is to reverse engineer the protocol used by a device.
Let's say you have a webcam, an Arduino and an Arduino USB Host shield. You want to talk to that webcam, from which you don't know the protocol. Can it be done by monitoring USB data packets and by analyzing the driver installed for that device?
It would be a really interesting project.
Thanks in advance.
I often use a serial spy program to look at the conversation between two devices. In windows you can pay for it...
http://www.sinnovations.com/htdocs/serial-port-monitor.htm
In Linux it's free...
http://www.cyberciti.biz/faq/howto-monitor-data-on-a-serial-port-in-linux/

Learning resources for usb device and device driver devolopment

I have never done any USB development, I'm experienced with programming PIC, AVR micro-controllers and C programming on windows (not windows programming). I want to learn how to develop embedded devices and device drivers that can communicate with PC, Not via serial port emulator in USB hardware.
I like to have some points and resources on who should I approach it.
What software and hardware should I have to start leaning that?
Read this fantastic book: USB Complete by Jan Axelson. Also in his site are comprehensive informations too.

Controlling MSP430 with computer (USB?)

I'm looking to control a bunch of LEDs from my computer, with a TI MSP430 or similar.
My computer is a Macbook Air, and so it looks like the only port I can communicate with is USB. The MSP430 has a USB port, but I can't find any information about using the USB port for anything besides programming the chip. Is there a way around this, to use USB to communicate with the board?
Thanks!
If you are using one of the processors with built in USB hardware then you should look at this Texas Instruments Page which describes the capabilities of the MSP USB. It includes links to the USB software stack that you will need to implement an HID class device.
I see two more options here. You can also use:
a) USB <-> LPT adapter to control the LEDs directly — in this case the schematics are extremely simple. See how it's done;
b) USB <-> COM or USB <-> RS232 adapter to communicate with the controller via RS232 — in this case you'll have to implement some simple protocol for communication with the controller, but the whole solution would still be much simpler than the one with USB.
The MSP430 Series 5 and Series 6 micro controllers (i.e. MSP430x6xx and MSP430x5xx) have built in USB modules that allow communication from PC and could be used to control the MSP430 via USB. Download the MSP430 USB Developers package here: http://www.ti.com/tool/msp430usbdevpack and use the USB CDC or HID API stacks to develop an application as per your requirements. In case you are using CDC(COM port) you may use a Terminal program to send the commands to control LEDs or if you use the HID stack, you may use the hidDemo PC software included in the Developers package to send/receive commands.