I wanted to test if my UART(ttyMT1) is working on my custom board (android project). I have 2 UARTs on my board- ttyMT0 & ttyMT1. UART ttymt0 is my debug port. I have microcom on my board as well.
Test1:
I connected Tx and Rx of ttyMT1 with a female to female jumper wire. Then, on my ADB, i opened microcom for ttyMT1 using the below command:
microcom -s 115200 /dev/ttyMT1
On my debug port (using minicom), ttyMT0, I transmitted to ttyMT1 using echo as shown :
echo -ne 'Hello' > /dev/ttyMT1
and i was able to get the transmitted data print (HELLO) on ttyMT1.
What i wanted to know was, is this enough to verify that my UART ttyMT1 is working fine or do i need to try something else?
Test2:
What i tried again was to connect ttyMT0 to my PC's usb port and ttyMT1 to another USB port of my PC using 2 separate USB to UART connectors. Then i opened 2 minicom, one for each and tried to transmit the same Hello from ttyMT0 to ttyMT1 (ttyMT0 shows as ttyUSB0 on my PC and ttyMT1 as ttyUSB1). But i didn't receive any print on ttyMT1. Why is that?.
p.s. I'm unable to type anything on ttyMT1. I probed ttyMT1 on Oscilloscope and i got the Tx signal but I didn't get anything on my scope when I probed on Rx.
I think you need to have SELinux permission to access serial port in android. However check this code here to read serial port : https://programmer.help/blogs/serial-port-operation-with-jni-method-under-android.html. It will require you JNI.
Related
I connect com3 to com4 from my pc to another pc using Prolific USB-to-Serial Comm Port on both sides (using Rs232 female between both). I can send data to port from both computer successfully.
But I can't receive any data on both sides.
Ports config on both sides is the same.
When I monitor this connection, I see status of CTS,DSR,DCD,RI is Disable(Red) (just RTS,DTR is Enable(Green)).
I using "null modem" and tested cable.
Do you have a solution for receiving data?
You need to cross Rx/Tx signal lines, or use a "null modem" cable. The latter does not only cross the data lines (pins 2 and 3 on DB9 connector), but also the corresponding flow control signals.
A simpler test would connect pins 2 and 3 on a DB9 RS232 port, and use a terminal program with "local echo" set to off. This setup just receives anything you send out - veifying that the USB2UART adapter actually works.
I've been trying to test a FT201XQ USB-I2C breakout board: UMFT201XB-01, so I can connect it to a master device such as an Arduino and sniff what that device is sending through I2C.
To see the output of the slave device I have successfully configured a Virtual COM PORT by installing the D2XX drivers provided by ftdchip.com. I can open the serial port through puTTY and everything seems fine in that regard.
Then, i've loaded the "master_writer" example on my Arduino, which sends 1 byte at a time to an address (0x22 is specified in the UM201XB-01 datasheet as the default address).
Nothing seems to happen in the COM port that i've earlier opened. Do I need to configure/program the FTDI device in some way? In that case, how can I do it, in a general way?
UMFT201XB-01 board http://www.ftdichip.com/Support/Documents/DataSheets/Modules/DS_UMFT201_220_230XB.pdf
Thank you in advance, and sorry if this is a "noob" question : P
I've installed the Arduino virtual USB serial port driver, it's appeared as COM4 on my device manager. I double checked by listing all available serial ports in powershell
> [System.IO.Ports.SerialPort]::getportnames()
COM1
COM4
However, when I try to do an echo to the serial port, it says it does not exist
> echo helloworld > COM4
The system cannot find the file specified.
I am trying to upload some firmware in to my arduino, but I kept getting denied by the port. Trying a different USB gives me the same result. I wrote a small program to test the serial port and I get the error:
The serial port "COM4" does not exist.
The device name of a serial port on Windows is \\.\COMn where n is the port number. A device driver can emulate the DOS device name, like "COM4" if it chooses to do so, very simple to do in the device driver code. But that's an increasingly rare thing to do, especially for port numbers larger than 2 and extra especially for port numbers larger than 4. So seeing your echo command fail is not unusual.
A serial port cannot be shared, it can only be opened once by a process and everybody else that tries to open it will get the fail-whale ERROR_ACCESS_DENIED error code. Necessarily so, serial ports sit at the very bottom layer of the OSI model, there is no protocol that arbitrates access to the port. Or to put it another way, the operating system has no guidance on who should get the data that the port receives. There can be only one candidate, the process that opened the port first. So the error message you got is not unusual, you have to make sure that nobody else is using the port. Including the Arduino serial port monitor.
Background
I am trying to connect to a serial GSM - modem of Wavecom type.
I was able to communicate with the modem using the guide
http://www.easysw.com/~mike/serial/serial.html
on my Ubuntu machine.
but when I tried to connect it through a device with serial port and running on Linux kernel Linux 2.6.14.7-tiny1-WR1.3al_small I get junk data returned. I have tried all of the baud values to connect to the modem. It connected on 115200 baud value when it was working, but the same value does not work from this Kernel. Its a ARM target machine. note : I cross compiled the code for ARM
Question
Do I need a driver for a modem to just be connected through a serial terminal Program ?
Please make sure that the RS232/TTL converter of your ARM board is working correctly. for example you can connect it to your Ubuntu machine at first and transmit something with a terminal program.
question : 1 ) Do i need a driver for Modem to just be connected through a Serial Terminal Program ?
No.You can connect to your GSM modem simply by having a serial port and a terminal program.
I am using a EVB for siemens MC45 GSM modem. Itried to send At commands to it via serial port with Hyperterminal in windows (both Xp and 7). But the hyperterminal window is showing that I am connected but when I type something it doesnot show my writings. and no response from the GSM modem is received.
What Can I do ?
The problem is with your hyper terminal settings when you are connecting with the modem.
Use these settings: Baud rate:9600 data bits:8 stop bits:1 parity bits: none flow control:none Should work now. Also check whether you are communicating with the correct port
Have you configured the hyperterminal session properly? I think you will probably need to set it up as follows:
BaudRate 19200
Databit 8
No Parity
Stopbit 1
No Flow control