How to acces u-boot via ethernet? - serial-port

I have demoboard and it has an u-boot. In u-boot, I want to send command through ethernet rather than serial port(Like bootm 0x20000000 0x70000000). Actually, I want to use ethernet rather than serial port. Is this possible? If so, what should I do?

You need to provide much more details such as what board you're using and if you're using mainline U-Boot or some vendor tree. But the general answer is that yes, you can. See http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.NetConsole;h=af7fc6043a3f3f02497f7527342b18551402be9d;hb=HEAD for more details on how to use netconsole.

Related

Changing the name of BM70 BLE module without Microchip's evaluation board

I am trying to customize the name of my BM70 BLE module. I am not using the BM70 PICTail evaluation board. Instead I am using the MSP430F4799 microcontroller to communicate with the module and to configure the P2_0 pin and other necessary hardware pins. I tried with the UI configuration tool and manual pattern test tool to change the name of the BM70 module with the COM port where the UART of the MSP430 is connected but it did not work. Now my question is there any way to access command set protocol of BM70 module without using the PICTail evaluation board?
you can do that in the same way as BM71 module. You can read about the whole process in my blog at bijan.binaee.com/index.php/2018/08/03/bm71-no-uart-response/
ps: I wish I could post this as a comment but I don't have required reputation at this community (If you are a moderator I appreciate if you delete this answer and make it as a comment if possible)
Of course you can use your MSP 430. Please have a look at the BM70 user guide. There are some hardware connections required to interface the module (see page 63). You had to use the default baudrate to connect the module the first time.

Serial communications over stlink with stm32f4discovery, is it possible?

I have the following: STM32F407G-DISC1. My goal is to communicate (sending strings back and forth) between my pc and the mcu over serial and I currently am able to do so using the micro-usb (otg) port, while powering separately using the mini-usb st-link port (so using two cables).
Is it possible to use the mini-usb port for serial communications? (eliminating one of the cables)
I have read the user manual and my interpretation is that this is not possible without physical modifications. But I am a beginner and would like to verify I am correct in this interpretation. I have researched thoroughly however most sources seem to not refer to this specific board and it is my understanding with the newer version of st-link it uses this should be achievable.
It is possible - just send the messages via the USART2
You need to solder those two wires as they screw up the design.

Program an Atmel Chip (AT90CAN128) via CAN Using AVRDUDE

Can AVRDUDE be used to program the AT90CAN128 micro controller via Controller Area Network (CAN)? Any help would be greatly appreciated!
You cannot use AVRdude for that - It doesn't know how to handle the CAN bus. And in order to do so, it would need to reserve CAN bus message IDs which it obviously cannot.
As the AT90CAN128 does have self-programming capabilities, you may be able to write something using your own messaging on CAN that updates the Flash on the AVR.

Has someone used QSockeNotifier (Qt library) to read/write serial ports in Linux?

I am currently linux API like sigio,sigaction, etc. to interface with serial ports in Linux. And for a GUI I am using Qt 4.2. I know about 3rd party QextSerial but I would stay away from it. I also was tinkering with QSocketNotifier as an alternative.
Can someone give a rough example to read/write from a serial port using QSockeNotifier?
Here are the docs for the class. And here is an example for using QSocketNotifier with serial ports.
Also there was another question which might help you, it is written in Python, but pretty clear:
How do I watch a serial port with QSocketNotifier (linux)?

List machine's serial ports

I have an Arduino-based device which connects through USB.
I'd like to detect it from my Qt 4 application, using QExtSerialPort (or whatever necessary), when it's plugged in.
If this weren't possible, I thought I could somehow get a list of the system's port names and just try all of them in search for my Arduino (where I'd implement some kind of handshaking procedure for it to detect it correctly). My concern in this approach is that I'm not sure if a device (for example, printer) would get damaged if I send some kind of handshaking ack at a different baud rate.
So, I don't really know where to start for any of them. Which would be the best approach? How would I implement it?
I believe you can find list of serial ports on Windows by looking into
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM
registry key
Each serial port on a UNIX system has one or more device files (files in the /dev directory) associated with it:
System Port 1 Port 2
IRIX® /dev/ttyf1 /dev/ttyf2
HP-UX /dev/tty1p0 /dev/tty2p0
Solaris®/SunOS® /dev/ttya /dev/ttyb
Linux® /dev/ttyS0 /dev/ttyS1
Digital UNIX® /dev/tty01 /dev/tty02
more details on serial programing on POSIX systems here
Since your device is USB, your UART port will be emulated by some kind of conversor in his hardware. So first you must understand what driver is being used on your system.
The most common SERIAL->USB conversor uses PL2303/PL2301 chip, so it would create a path on /dev, if its the first device, it will appear as "/dev/ttyUSB0", but you may also see the list reading the proc path (like "cat /proc/bus/usb/devices").
Under Windows it usually creates a virtual "COM", just go to device manager and check the port.
When you are sure about how the HW talks to your system, you may use QExtSerialPort for wrapping the system API and talk to the device.
Way too hard and too platform specific, using weird Windows Registry keys or rely on hard wired device nodes on Linux.
You are on the right way. Get QextSerialPort or QSerialDevice (which I preffer in my projects, because it got integrated in Qt5), have a look at the examples and simply use it. In both libraries you get some kind of port enumerator class which returns you a list of all configures serial ports. Only platform/device specific settings you will have to do manually (like getting RS485 in half-duplex mode on my current embedded project), but "standard" problems are perfectly encapsulated in a QIODevice implementation.
You can use both QextSerialPort and QSerialDevice like a file. Open it (instead of a filename you specify the device name ie. "COM1" on Windows or "/dev/tty0" on Linux, depending on your configuration) and then read or write like you are doing it with an ordinary QFile, QBuffer, Qwhatever-inherits-from-QIODevice.
If you have any problems opening the port and communicating, don't hesitate to ask! :)

Resources