On Monday, February 23, 2015 at 7:14:45 AM UTC+11, Al Thomas wrote:
>
> It looks as though modifying the Broadcom program allows you to use the 
> ioctls on the Linux UART driver because it is written in C so it is easier 
> for you to access the ioctl. Have you heard of or used stty ? I've just 
> done a bit of research on it and this program is part of the coreutils 
> package that comes with most GNU/Linux distributions. So a more general 
> solution than forking the Broadcom tools. I wish I was further along with 
> my board to try this myself, but instead of forking the Broadcom tools 
> maybe the procedure should be:
>
>    1. Reset Bluetooth chip
>    2. Wait 1 centisecond for the chip to re-initialise itself
>    3. Issue: stty -F /dev/ttyS2 115200 crtscts -clocal cread
>    4. Wait a bit for luck?
>    5. Upload firmware with Broadcom tool
>
> The stty program hopefully sets up the UART on the host side, for line 
> control (crtscts), no modem control (-clocal) and I'm hoping cread sets RTS 
> to 1 on the host interface side and consequently 0 on the CTS at the 
> controller side.
>

Hi Al,

Thanks for updating the linux-sunxi page;  I'm sure it will be helpful to 
some.

I've checked stty.  The -clocal option causes patchram to hang when opening 
the serial port.  The crtscts option doesn't help unfortunately.  If this 
handshaking is done properly I'd expect the host to leave RTS off until 
there is something to send.  Then it should raise (i.e assert) RTS, wait 
for CTS, send the data, then drop RTS.  So this wouldn't leave RTS asserted 
which is what we want.

My latest testing here just confirms that RTS must be asserted when the 
BT_REST pin goes from low to high (i.e. end of reset pulse).  There is 
still an unexplained difference between kernels 3.4 and 3.19 where the 
patchram program gets a response to the "start download" command with 
kernel 3.9 but not 3.19.  The program times out here and continues.   I'm 
not losing any sleep over this.

Thanks for all your help and suggestions here.  Thanks also to Chen-Yu Tsai 
for his help which saved me a lot of time checking a non-existant problem.

Cheers,
Steven 

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to