Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does brcm_patchram_plus wait almost infinite after Done setting line discpline #3

Open
GoogleCodeExporter opened this issue Sep 2, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

During use with the option enable_hci the program waits for almost infinite:

        if (enable_hci) {
                proc_enable_hci();

                while (1) {
                        sleep(UINT_MAX);
                }
        }

UINT_MAX is a very big value.

While ending the program with ^C after the message "Done setting line 
discpline" seem to be working fine.

Is the sleep really requered ? 

Original issue reported on code.google.com by [email protected] on 25 May 2014 at 6:51

@GoogleCodeExporter
Copy link
Author

I have removed the while(1) loop from the code as test and it works fine for a 
cubietruck board.

Command sequence:

root@cubian:~# echo -n "" > /dev/ttyS1  # i have to open the ttyS1 line as 
mentioned earlyer.

root@cubian:~# brcm_patchram_plus -d  --patchram 
/lib/firmware/ap6210/bcm20710a1.hcd --enable_hci --bd_addr 11:22:33:44:55:66 
--no2bytes --tosleep 1000 /dev/ttyS1

root@cubian:~# hciattach /dev/ttyS1 any
Device setup complete
root@cubian:~# hcitool dev
Devices:
    hci0    11:22:33:44:55:66
root@cubian:~# hciconfig -a
hci0:   Type: BR/EDR  Bus: UART
    BD Address: 11:22:33:44:55:66  ACL MTU: 1021:8  SCO MTU: 64:1
    UP RUNNING PSCAN 
    RX bytes:848 acl:0 sco:0 events:32 errors:0
    TX bytes:906 acl:0 sco:0 commands:32 errors:0
    Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    Link policy: RSWITCH SNIFF 
    Link mode: SLAVE ACCEPT 
    Name: 'cubian-0'
    Class: 0x420100
    Service Classes: Networking, Telephony
    Device Class: Computer, Uncategorized
    HCI Version: 4.0 (0x6)  Revision: 0x1000
    LMP Version: 4.0 (0x6)  Subversion: 0x220e
    Manufacturer: Broadcom Corporation (15)

root@cubian:~# hcitool scan
Scanning ...
    AX:EX:1X:FX:4X:BX   Nokia 3720c
root@cubian:~# 


Original comment by [email protected] on 25 May 2014 at 7:09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant