Flash NodeMCU v3 without tools - linux

I've got NodeMCU v3 board with ESP8266 chip on it. I'd like to flash it with my firmware through usb without using any tool like esptool. How can I do this from Linux?
I've got several questions:
1) Can I just write for example to /dev/ttyUSB0? Will board get this signal?
2) What should I send before sending
binary? How to tell to board that I want to flash it?

It won't work to just write the file to a /dev device. That's why we have flashing tools, to deal with setting up the board and properly transmitting the binary to it. To do what you're asking you'd have to write your own flashing tools. What's the problem with just using the existing ones?

Related

Hardware communication with Python

Is it possible to write an API with Python so you can connect a physical ON and OFF switch via USB to a PC and when user presses the switch to ON or OFF, the python program detects it and send a signal to a web app and shows ON or OFF message on the website?
I am sorry if what I am asking its not clear enough!
Yes, it is possible. Reading USB devices can be done with Python. In linux USB device inputs can be found in some files(e.g. /dev/ttyUSB0). By reading those files you can get the information that you need. Putting here link that will be helpful
similar post
Firstly, you can't write an API to interact with hardware in python. You would have to use the pre-existing windows API(or the API provided by the Operating system that you are using) in order to interact with hardware in such a high-level language.
If you want to interact with hardware in python, and detect switch presses, releases etc, I would recommend you used a microcontroller such as a raspberry pi(for python) or an arduino(for C++). The respberry pi provides a very easy way to interact with hardware in python. If you still want to interact with a USB stick in python(but not acting as a switch) you can use the pyusb library.

How to flash NUCLEO F401RE with command line

I am looking for a command line tool for flashing my NUCLEO card in ubuntu. I want this tools for flash my NUCLEO remotely with node.js. I already try st-flash and stm32flash but these tools don't work properly. My programs are generated by mbed online tool.
Do you have any suggestions ?
Thanks for your answers
You can update Nucleo boards simply by copying the mbed image to the mass storage device presented when you connect to the composite USB interface.
The image file is automatically written to the microcontroller flash by the integrated STLink device when the file is placed on the USB drive. This is a "write-only" device; the written file cannot be read back - if you interrogate the drive it always appears empty.
In Ubuntu you may have to explicitly mount the device. If it mounts automatically it will appear under /mnt (I guess).
Since it is a standard USB mass storage interface, you should not need any Nucleo or ST specific driver or software. It is a "drag & drop" programming interface.
If your board does not appear as a mass storage device, you may need to update the integrated STLink firmware as described at https://os.mbed.com/teams/ST-Americas-mbed-Team/wiki/Preparing-the-STM32-Nucleo-Board

Can PulseAudio/ALSA work without built-in soundcard?

I am new to PulseAudio and ALSA, so please go easy on me. This might seem like a dumb question, but it is quite important to have it answered.
I am developing application on ARM imx6 board (lets call it BOARD1), with built-in sound card support. With ALSA, I am able to play audio throgh Headset_OUT. But now, we want to move to a new board (lets call it BOARD2), which does not have built in soundcard. But the idea is to connect a bluetooth module to the BOARD2 and have the audio streamed to the bluetooth speaker.
My question is, is it possible to use PULSEAUDIO to send/receive audio to external (bluetooth) audio device without local embedded soundcard (i.e. is it possible to do audio encoding/decoding in just software with pulseaudio and gstreamer combination) ?
Regards

Teensy 2.0 / Atmega32u4 as Keyboard: Send and Receive

I'm currently working on a device which is able to work as a keyboard and communicate via Serial with a self-written software.
Now I have to install serial drivers (from Arduino) on different computers if I want to communicate with my application which I actually want to avoid.
Is there any other solution to solve this problem? Is it possible that my microcontroller works as a keyboard AND is able to send and receive data as HID device?
Thanks and greetings!
I actually do something similar with a 32u4, but it receives its serial over the built-in UART. I do this because it's linking between two separate systems. If it were only one system I could implement a 2nd interface. (Don't forget, a USB HID device must have an IN endpoint even if you are not using it.) Or you could just throw a $2 USB/TTL converter on and do it the same as I did.

Arduino Bluetooth N64 Controller - Writing a Linux Driver?

I'm working on a little Arduino project to create a bluetooth N64 joystick for my Ubuntu box.
I managed to find a sketch to output the controllers state via serial and it works great. Also sending the TX and RX to the little CSR bluetooth module I have works fine.
When I pair with the device I have to use "rfcomm bind" to see the device in my dev directory and 'cat'ing the output shows all the data is coming through as well.
My question is this, what are my next steps for getting Linux to recognize this device as a joystick - i.e. /dev/js0. If I know what I need to do to achieve this I can read up on the necessary steps but at the moment I have absolutely no clue where to start - having not done anything like this in the past. Should I be looking into creating a Kernel Module?
Any information or pokes in the right direction at all would be greatly appreciated - even if it's just an observation.
Writing custom kernel code is definitely not the way to go here.
To make your project appear as a joystick device in Linux you'll want to present it using the Bluetooth HID profile. With that in place everything should "just work" on the client side and you'll see an entry in /dev. The HID profile is pretty comprehensive and is used by most Bluetooth interface devices - keyboards, mice, game controllers etc. the Bluetooth part of this is actually mostly just a thin wrapper around the USB HID protocol.
From the sounds of things your device is currently not advertising itself using that profile.

Resources