weird characters displayed during serial communication OSX - linux

I have tried communicating via serial (OSX w/ prolific drivers -> USB RS232 adapter -> Tx,Rx and GND pins on device serial ttl port) to a device and done so successfully using
screen /dev/tty.usbserial 115200 8N1
I get to log in and use it as if I was SSH or TelNetted in...
However whenever I try to go into system recovery mode (holding CTRL+1) while the device is powering on, it starts displaying weird characters and until I close the screen session it will continue showing weird characters:
Of course when we tried doing the same thing on my boss' macbook running windows and PuTTY and everything worked fine, even in system recovery mode; characters were displayed properly.
What gives? Id like to learn the intuition to use because up till now I concluded that since I can bot into the system and see characters normally everything about the connection should be fine and its must have been the recovery partition that was broken. This was wrong of course...
Niko

Dunno if it is a OSX problem,
I had similar problems before. I fixed it either by changing the Baud rate of the com ports or by making sure the Ground on the circuit is the same as the ground of the supply.

Related

How to upload to Arduino STM32 with HC-05 Serial Bluetooth

I got myself a little STM32F103C8T6 based board that is similar in size to the Arduino Nano, but with a little bit more memory and speed. But for me more important, with 3.3V I/O. It can also be used with the Arduino IDE after you install the correct libraries.
I wanted to connect this to a HC-05 serial bluetooth, especially for remote uploading. But this didn't work. Basic transfer worked, but upload for reprogramming failed.
I tried to adjust the baudrate with AT-commands of the HC-05: e.g.:
AT+UART=57600,0,0
But it still didn't work. What is wrong?
After several tests I noticed that stm32flash printed "8e1" as upload setting. This means even parity. So the correct AT-command should be:
AT+UART=57600,0,2
Baudrates 115200 and 230400 also worked as long as the parity is correct.
But since there are even more things that can go wrong, here is some more information:
Connecting via bluetooth to the HC-05 required using the default password "1234". (This can later be changed with command "AT+PSWD=....".)
Then on my Windows 10 machine two new COM-ports appeared, of which only one was functional.
The most confusing thing was that on Windows you still can adjust the baud rate and serial settings, but it has no effect!
To use the AT-commands I had to connect to another serial port (from an USB to serial adapter). Holding the "Key"-button during power-on enables the AT-mode with 38400 baud.
There is a video that shows the details for a regular Arduino:
https://www.youtube.com/watch?v=xXUKfTNHkKE
"HC 05 Bluetooth Wireless Upload to Arduino" (Wayne Holder)
Even with the correct baud settings, remember to put the STM32 board into correct boot mode and press RESET. And use the correct COM-port.
If you use the serial port in your uploaded program you also must remember to use these settings. E.g.:
Serial.begin(57600,SERIAL_8E1); // for serial init

Alternate ways to log into BeagleBone Black when static IP is unknown

I am attempting to access my BeagleBone Black but I am having some issues and I'm needing some help.
I messed around with my BBB almost 2 years back and I statically set the IP address for eth0. Unfortunately, I don't recall what I changed it to. If I knew the network, I could probably figure it out but I haven't the slightest clue what it could be.
I am running Windows 10 on my laptop and I have a USB to USB-mini running to the device which provides to it power and a connection.
I have installed the latest drivers, PuTTY, and WireShark. I made sure the drivers were imported, ran WireShark for DHCP requests/ARP broadcasts, LL DNS updates, or SSH port references but I wasn't seeing anything on that particular interface on my laptop (ran as promiscuous and nonpromiscuous).
I read that the default IP address for the beaglebone.local is 192.168.7.2 but I wasn't able to reach it via ICMP, HTTP, or SSL.
I assumed the USB connection provides either an Ethernet-over-USB connection or a serial connection (UART through USB), so, I have both the USB connected and the Ethernet cable connected.
To see if I could just use a serial connection with PuTTY (Serial-to-USB), I opened Device Manager to see which COM port it was using. The odd thing is that COM ports aren't listed in Dev Manager, not even by default when nothing is connected. There also wasn't section for Unknown Devices.
I figured at this point, it wouldn't hurt to download the latest release of Debian for BeagleBone. I wrote the .img to a 32GB MicroSD card and held down the USER/BOOT button while I applied power (as per the instructions).
Still no luck and I'm now out of ideas.
I only have a laptop at my disposal, currently. I don't have immediate access to a monitor, mouse, and keyboard so I wouldn't be able to view what is happening internally. The LED0 is giving me the standard heartbeat flash (2 consecutive flashes followed by a longer off period).
Does anyone have any suggestions?
TIA

Emulate a UART like piece of hardware in linux

In order to test a piece of software, I need to write an emulator. This emulator has to represent the hardware very closely, it has to be able to start off at 300 baud, then negotiate with the software and eventually end up at another baudrate, for example. Also, things like parity and additional stop bits are very important.
How can I emulate such a device under Linux? I tried pty's, but it seems immume for baudrate settings and parity settings. I also tried socat, but it suffers the same fate: no matter how you configure the receiver, the data always arrives fine. I need this emulator to be able to send out the data on 300 baud in such a way that if you listen at 9600 baud you get rubbish at best. How can I do such a thing?

Bluetooth SPP module SPP-C SPP-CA BK3211 chip - entering AT mode?

I have Bluetooth SPP module SPP-C / SPP-CA , it is cheap module that should work the same way as well known HC-06 / HC-05 modules.
I have got one problem, everything works, module is communicating over serial interface pairing etc... but i can not enter the AT mode to change device name pin or baud rate. Does anyone had the same problem and how to solve it ? there is a very small data published and sellers are not responding.
So I assume that someone may help with that situation. http://www.ebay.com/itm/Bluetooth-Module-UART-Serial-Interface-SPP-CA-works-with-YZXstudio-USB-Monitors-/201414967094 that's the module. it is based on Beken BK3211 chip.
It seems that nothing special is needed to enter command mode on the SPP-CA module I have.
Whenever you connect or disconnect by bluetooth, the module will print:
CONNECTED
.. serial data is transferred ..
+DISC:SUCCESS
When the module is disconnected, you can execute AT commands such as AT+BAUD just like with HC05 modules.
3 years later and I've looked everywhere for an answer to this question and finally stumbled upon the solution by fiddling away.
I am connecting via an FTDI module using Teraterm software to enter commands.
You need to power up the FTDI and BT modules by plugging into PC USB. open Teraterm and set up to see the COM port.
Now you have to momentarily connect GND to port 11 on the BT module to 'reset' the module. The module will power down and back up again and in doing so will enter AT mode and you should be able to communicate with the module.
Good luck
Old question however still relevant, I found the solution! It is pretty simple, you can use an breadboard and some jumper wires however you can also create an adapter like I did. Like explained in this document with AT-commands, you need another UART (serial connection) to program the SPP. The SPP must not connected to anything (discovery mode) to be able to program it.
You can do this, like I did, with another SPP or you can use serial programmer or an Arduino. Notice that the serial connection is 3V, so when using an Arduino you need some resistors (1K and 2K) to create a voltage divider (google it).
The schematic is pretty simple (when not using an Arduino), I designed this adapter:
You need these components to create the adapter (and maybe some wires):
Connect everything like in the schematic above (STATE and EN are not connected), insert the modules (take care of pin orientation!), insert an USB cable and connect it to some power source.
In Arduino IDE, select the com-port you want to configure and launch the Serial monitor, you can now enter AT-commands to configure the one that is not connected:
Done! That is pretty easy right? When you want to configure the other, disconnect the one that is connect and connect the other one. An overview of AT-commands can be found in the document in provided link above.
Hopes it helps ;-)

Windows 8.1 Bluetooth searching issue

I have a windows 8.1 based lap top which supports Bluetooth.
I wrote a java based bluetooth server which gets connections from Android.
The issue is, the device sometimes get invisible(or to say not shown) on android devices.
I've tried with other laptops or Android phones, but sometimes it just doesn't get searched.
I think it's not about my java server program. Even if there's a problem with my program, it should at least be shown on the bluetooth search list of other devices.
I found a very crude solution about this issue.
Always running the 'change pc settings(not the exact name)' app of windows 8.1, and going to 'PC, devices' -> Bluetooth makes it always searchable. If I turn this off(I mean the 'change pc settings' app, not turning off bluetooth), the bluetooth cannot be found by other devices.
Why is this happening? My purpose is, bluetooth server must be turned on automatically after boot, but the reliability of the bluetooth device is failing my intention. However, since my crude solution above is temporarily solving my issue, I do not think it's a hardware issue.
So, my question is :
1) Why is this happening? And how can I mend this?
2) How can I run windows metro app through windows shell? If I can't find any other solution about this, I will have to write a batch script to always run the solution thing above.
Going to Change PC Settings>PC and devices>Bluetooth is initiating a Bluetooth device search. As a side effect, the Bluetooth is also made Discoverable (pairing mode). However, this Discoverable setting is temporary, only while the PC is searching for remote Bluetooth devices.
If you wish to keep Bluetooth Discoverable at all times, you need to check the "Allow Bluetooth devices to find this PC" button box, found in Bluetooth Settings. I found Bluetooth settings by right clicking the Bluetooth system icon. Can also be found in Devices and Printers, by right clicking the Bluetooth adapter icon.

Resources