Miniterm not showing valid output when working with NodeMCU - embedded

I am trying to use miniterm to execute Lua commands on my NodeMCU. I don't think there's any problem with my chip or cable because I can code the chip using Arduino IDE. While using miniterm, I believe we are supposed to get a interactive command prompt, but I never get that. Some articles have suggested pressing the ENTER button or resetting the NodeMCU, but that hasn't worked as well. I believe I have successfully installed the USB to UART CP2102 driver (from Silicons Lab). Any suggestions as to what else I can do?
This is my 'miniterm.py' command output. The unknown symbols continue whenever I press the ENTER key...
--- Available ports:
--- 1: /dev/ttyUSB0 'CP2102 USB to UART Bridge Controller'
--- Enter port index or full name: 1
--- Miniterm on /dev/ttyUSB0 9600,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
---␒�␒␀��K �1��a���0,␞�`!␐�(␀�␂�␅� �lO␇�`�bFa���␑␖5��������������������������������������������������������������������������������

You need to configure Miniterm to use 115'200bps instead of 9600bps.
See https://nodemcu.readthedocs.io/en/latest/upload/
The NodeMCU serial interface uses 115'200bps at boot time. To change the speed after booting, issue uart.setup(0,9600,8,0,1,1). If the device panics and resets at any time, errors will be written to the serial interface at 115'200 bps.
The gibberish you see are the SDK bootloader messages which come at 74'880bps.

Related

Arduino as HID device on Windows - Bind external button presses to a keymap in the OS?

Here's the problem: I want to press an external button attached to an Arduino, and I want that button press to translate into Windows as a keystroke.
My question is, is there a programmable device (I already own an Arduino) that can receive signals, and send them over USB to my computer which will understand it as a keypressExample: Button press acts like hitting the S key on my keyboard?
There are three (four) possibilities:
First Get an Arduino Leonardo (32U4 architecture) - there are HID drivers (so windows recognizes the hardware - short explanation: The Arduino LEONARDO is an integrated USB HID Arduino board. Ideal for projects requiring the board to behave (act) as a USB human interface devices = HID).
Two Use any other Arduino and install Processing with the relevant modules. Write code on both and use Processing to translate to windows.
Three I've seen some more or less working implementations.Example 1Example 2Example 3 Scroll down and you will see a picture of your button solution including code.
(Four) This requires also windows programming skills. Write an usb "driver" a translating engine for I/O between Arduino on usb and acting like a virtual (e.g. touch screen) keyboard. Thats the hardest way to go.

Bluetooth HC-05 sending error 1F for INQ command only

I have a problem with my new bluetooth HC-05 module. In AT-mode it works perfectly with all commands that I need... exept INQ.
I have tried to send whole bunch of other commands beforehand:
AT+INIT
OK
AT+ORGL
OK
AT+ROLE=1
OK
AT+CLASS=0
OK
They all are working just fine. I tried to change IAC and INQM settings as well... but the answer from module is always the same:
AT+INQ
ERROR:(1F)
I read related topic here and tried to push the button at HC-05, as it recommended there, but -- no result either.
I have three modules from the same shop, and they all are working the same way
I have a HC-05 with 3.0-20170601 that I managed to bind to a slave last night. It turns out that the v3 has two AT-modes.
The first is when you hold the button while you connect power. The led will blink slowly and you can connect at 38400 baud. But this is like a configuration mode, where AT+INQ is not available.
In this mode I did these commands:
AT
AT+UART
AT+RMAAD
AT+ROLE=1
(Press and hold the button)
AT+RESET
(Release the button after device restarts and led is slowly blinking)
AT+CMODE=1
AT+INQM=0,5,5
AT+PSWD="9999"
AT should give OK as answer to know connection is working
AT+UART will show configured baudrate. Default is 9600.
AT+RMAAD clears all saved connections
AT+ROLE=1 sets it as master
AT+RESET restarts the device to change to master
AT+CMODE=1 accepts all kinds of devices
AT+INQM=0,5,5 inquires in standard mode, with 5 max connections or 5 secs
AT+PSWD="9999" sets the pin code 9999, change to the pin you need
After this it is time to update the arudino code so that it connects to the configured baud rate. It will be something like
BTSerial.begin(9600);
...or what ever value you might have set the baud rate to. Then reflash your arduino.
Now enter the very irritating second AT command mode.
Power up without holding the button. You will get the fast blink speed. When its powered up, press and hold the button. The led will continue blinking fast, but while the button is pressed you can now connect to the device on the configured baud rate. So open the serial monitor and type AT to verify.
Remember that the mode is only active while the button is pressed. So keep it pressed. I had a small clamp I put on there.
Then I entered these commands:
AT+STATE
AT+STATE will show current state, should be inquiring
Then power up the slave device and the adress should start popping up. It will be something like xyz:xy:xyzw,931F00,7FFF
The first part is the address you want (xyz:xy:xyzw)
Change : to , and get xyz,xy,xyzw
Check that you connecting to the correct device
AT+RNAME?xyz,xy,xyzw
Then bind
AT+PAIR=xyz,xy,xyzw,5
AT+BIND=xyz,xy,xyzw
AT+LINK=xyz,xy,xyzw
The AT+LINK command gave me FAIL as output. But it did not matter.
I restarted and did not press any button before or after. Just normal start.
After 5-10s serial data showed up in my serial monitor.
Modules are bound. And will automatically connect at power up. If not you might have the wrong pincode. Make sure to change 9999 above to 0000 or 1234 or what ever it may be. When I hade the wrong pin I still got OK from the AT+PAIR and AT+BIND commands... It didnt work for me until I entered the correct pin.
Sorry for long post, but I wanted to be thorough since info about HC-05 v3 is very scarce on the internet right now.
A reference to all commands can be found here:
http://www.electronicaestudio.com/docs/istd016A.pdf
(Link valid 2018-08-13)
We have same problem and you can see the answer in here.
The conclusion of problem is about the firmware on HC-05 you use. If you use firmware version 3.0, you will get error 1F in AT+INQ. Maybe HC-05 with firmware version 3.0 has different parameters to run AT+INQ. Now I'm confused about how to find HC-05 with firmware version 2.0. That HC-05 have push button or not.
In short, the answer is: The (B) module with firmware version 2.0-20100601 works ok with the following commands (set PIN34 high at power-up, or press button on module and keep pressed during commands).
So HC-05 with version 2.0 use push button or not, it's the same.
If you have some information about the different between HC-05 version 3.0 and version 2.0, please let me know.

Fail in loading flash loader on IAR Workbench

I am working on IAR Workbench platform V7.70.1 and I am triying to download a simple code (a simple main with a while(1) only into it), but I'm not succeding to download the code on the processor. I am using the board NUCLEO-F401RE of STM company, based on the processor STM32F401RE. I'm am getting the following message:
Failed to load flash loader: C:\Program Files\IAR Systems\Embedded Workbench 7.5\arm\config\flashloader\ST\FlashSTM32F401xE.flash
If someone is familiar with the issue, some help would save me. I read something about this issue on this link but I did not understand what I'm supposed to do:
Thank you in advance
the solution is very simple -
go to Project->Option->Debugger->Download - uncheck the checkbox "Override default.board file".
have a good day
Itshak
Look at the ST-Link reset type. Often the ST debug interface can not connect due to the processor state.
Form the menu bar select Project->Options then ST-Link from the list on the left. The Reset box is normally set to Normal but can be changed to Connect during reset which will hold the processor in reset while connecting the debugger before any code can execute.
For me this worked:
I erase my Port with "CrossCore Serial Flash Programmer"
Then under Project->Options->Debugger->CMSIS DAP->Setup I choose "Software".
Then I debug once.
Then I choose "Hardware" in the same setting window.
Debug again.
Then it worked. Some other software might mess up the correct serial settings, thats why you have to erase and reset them.

Launch GUI program at host through SSH

I've got a Raspberry Pi connected to my TV, with no mouse or keyboard.
I'm sshing into it, starting X and then I want to launch VLC (or any other GUI program, for that matter). If I ssh -X, that will open the program in the computer I'm sshing from, not on the TV.
How can I launch a program and make it appear on the TV?
Slightly less typing than Joachim's (and actually slightly different behavior):
DISPLAY=:0 vlc
This doesn't actually set the DISPLAY variable to :0 for the whole shell session, only passes it to vlc.
So:
If you want to start other X programs in that session after VLC, Joachim's is better.
If you just want to run VLC ASAP, this is faster by 9 keypresses. :)
(I wanted to add this only as a comment, but I didn't have enough points for that, sorry.)
The DISPLAY environment variable needs to have a value set to which display the program should be opened. If you set it to :0, it means the first local screen.
This should in other words open vlc on the first local screen;
export DISPLAY=:0 ; vlc

Opticon F31 can't enter VCP/Serial mode

I've just purchased an Opticon F31 2D barcode scanner for use in a cocoa mac application as a USB Serial device.
We've used the NLV 2101 and scanned the C01 barcode from the universal manual which works, but the F31 always gives back a bad scan error and stays in HID mode (acts as a keyboard). Have I bought the correct scanner or is this one faulty?
It turns out that the command code to switch the scanner to VCP mode doesn't work on the F31. You need to use the barcodes on the following URL to switch between VCP and HID mode.
http://wiki.opticon.com/index.php/2D_Scanner_USB_Default