i managed to get hello_world working on my c121, connected through a pl2303 usb/serial cable to my macbookpro.
but found that the connection is extremely noisy. often the movement of me putting down the phone on the table is enough to break the upload. is that a common problem with these headphone/serial cable plugs?
for the serial device i can use /dev/cu.PL2303-0000201A or /dev/tty.PL2303-0000201A
but when using the '/dev/tty...' variant, i have to add this to osmocon.c
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c index f934dd7..b361eb1 100644 --- a/src/host/osmocon/osmocon.c +++ b/src/host/osmocon/osmocon.c @@ -128,6 +128,9 @@ static int serial_init(const char *serial_dev) /* hardware flow control off */ options.c_cflag &= ~CRTSCTS;
+ /* ignore modem status lines */ + options.c_cflag |= CLOCAL; + /* software flow control off */ options.c_iflag &= ~(IXON | IXOFF | IXANY);
=============================
willem
Hi everyone,
Willem wrote:
i managed to get hello_world working on my c121, connected through a pl2303 usb/serial cable to my macbookpro.
but found that the connection is extremely noisy. often the movement of me putting down the phone on the table is enough to break the upload. is that a common problem with these headphone/serial cable plugs?
My question to the more experienced Calypso hackers (Harald?):
How reliable are your uploads, do they work at the first attempt all the time, or should we expect some intermittent errors? How many?
I'm using a self-made cable consisting of a known good FT232R converter @ 3.3V and a cut off headset cable (that also worked flawlessly without any noise on another mobile phone before). My C123 also looks pristine. I manage to upload and run hello world successfully in maybe one out of ten attempts, often have to remove the battery because the phone just gets stuck. So I have ordered a new cable from Akku-King as suggested on the Wiki.
Chris
On Mon, Mar 29, 2010 at 12:39:35PM +0200, willem wrote:
i managed to get hello_world working on my c121, connected through a pl2303 usb/serial cable to my macbookpro.
but found that the connection is extremely noisy. often the movement of me putting down the phone on the table is enough to break the upload. is that a common problem with these headphone/serial cable plugs?
no. maybe something about your cable or plug or socket in the phone? I only get unreliable/noisy transmissions if the plug is not properly inserted all the way to the end (which is likely since the plug housing diameter is typically a bit larger than what the phone case can take unless you remove the PCB from the phone, or have a very low-diameter plug housing of your cable.
Initially I was using a 2.5mm to 3.5mm headphone adapter cable (the ones for attaching regular 3.5mm headphones to phones that have a 2.5mm plug, as those plugs are smaller than anything I've seen from the T191 serial cables so far).
- /* ignore modem status lines */
- options.c_cflag |= CLOCAL;
This is something I pondered of doing anyway... it simply made no difference on Linux / pl2303 so I never bothered...
But I'm happy to merge it.
Regards, Harald.
fyi, using the /dev/cu.** variant solved my problem of osmocon being unable to write CMD1 to the port. At least, it worked with an FTDI cable I built. I imagine it will solve the issue with the prolific cable as well (will try later).
On 29/03/2010 03:39, willem wrote:
i managed to get hello_world working on my c121, connected through a pl2303 usb/serial cable to my macbookpro.
but found that the connection is extremely noisy. often the movement of me putting down the phone on the table is enough to break the upload. is that a common problem with these headphone/serial cable plugs?
for the serial device i can use /dev/cu.PL2303-0000201A or /dev/tty.PL2303-0000201A
but when using the '/dev/tty...' variant, i have to add this to osmocon.c
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c index f934dd7..b361eb1 100644 --- a/src/host/osmocon/osmocon.c +++ b/src/host/osmocon/osmocon.c @@ -128,6 +128,9 @@ static int serial_init(const char *serial_dev) /* hardware flow control off */ options.c_cflag &= ~CRTSCTS;
- /* ignore modem status lines */
- options.c_cflag |= CLOCAL;
- /* software flow control off */ options.c_iflag &= ~(IXON | IXOFF | IXANY);
=============================
willem
baseband-devel@lists.osmocom.org