howto send data to (linux based) embedded system - linux

i got a Linux Kernel from http://www.at91.com/linux4sam/bin/view/Linux4SAM/LinuxKernel running on my ARM board.
I have a connection through serial port to my host system windows,
i also got a SAM-ICE JTAG debugger device.
so how can i send some data from my windows to my embedded linux?

It's depends on your at91 controller. Most at91 has two UARTS (some at91 has also Ethernet port). You can use second UART to send your data.

Related

uart communication in Linux kernel

I have a UART-based device, ESP8266EX, and I need to write to its driver for Linux. Since I am new to writing kernel drivers is there any example or method for accessing uart reading and writing through kernel driver. How is it different from user space uart code?
I have a small iot board with mu device connected to /dev/ttymxc1 port so the uart port will remain fixed for this device and also the device will work at fixed 115200 baud rate. I should be able to read and write to uart from kernel.

How can serial data be sent over a USB port to a microcontroller?

I'm designing a system that has a linux machine communicating serially with a microcontroller over a USB to RS-485 interface. I'd like to do this in Go if possible.
How can I programmatically send data over the linux machine's USB port?

Tracing traffic in Linux-based usb gadget (CDC/NCM)

I have a linux platform* that is connected as a usb device to an automotive device which acts as the USB host. The two devices should communicate over CDC/NCM, but the linux platform is not recognised by the automotive device and therefore the connection is not established. Surprisingly a connection to my computer is established correctly.
I now need to create a trace of that USB connection in order to check if there is an error in the USB handshake that can't be handled by the automotive device. As I cannot access the USB host, I need to create the trace from the gadget side.
I tried using usbmon and tcpdump, but this seems to work only for USB controllers configured as hosts on the tracing platform, not for ones configured as devices.
How can I configure usbmon to work also on devices?
If that is not possible are there any other possibilities to achieve this? (preferrably without hacking any drivers...)
Or do I have to use a Hardware USB sniffer?
BTW, all required modules (esp. g_ncm) are correctly loaded.
Thank you for your help!
stefan
*custom distribution on a freescale iMX6 processor (ARM), Kernel Version 3.0.35

Linux driver for embedded Linux

I'm looking to attach some USB devices to my embedded Linux board.
It is an TI-ARM processor running embedded Linux, but I guess it could be any embedded Linux board.
If I purchase an USB device which has Linux support/driver, can this driver (generally) be re-compiled to work with the ARM architecture? (Instead of Windows ect.).
Yes, USB drivers can generally be expected to compile for other architectures other than x86. Of course this presumes that your board does have a host USB port. There are a few boards that have only USB device ports, and many SoCs have both USB host & device ports.
But successfully compiling the (USB) driver may only be part of the task.
Some (USB) devices may require additional packages of libraries and other drivers for interfacing to application programs. For instance a USB digital TV tuner requires numerous packages (V4L, ALSA, I2C driver, userland firmware loading) to actually work.
Clarification
These additional dependencies that you may have to build are not because of USB.
The dependencies are related to the type of device.
An Ethernet interface, whether integrated into the SoC or offboard using USB, would be easily configured for full support in the kernel (e.g. protocol stack) and userland (e.g. Busybox has ifconfig, ping and routing apps).
A PCI TV tuner would have the same dependencies as the USB tuner. But the embedded environment typically means that you don't have any/most of these multimedia dependencies already built/installed.

I want to run a Linux based device application without hardware

Is there any simulation environment that allows to run and test Linux based USB device application on host machine running Linux?
Also same thing for Linux based USB host side applications where one can run and test Linux based host applications with physical/virtual USB devices.
Regards,
Mooni
Are you asking if it's possible to use a general purpose PC to simulate a USB device? If so, no, the hardware on, say, your motherboard is not physically capable (in almost all cases) of emulating a USB client device.

Resources