3

i test Bluetooth speed on windows and raspberry ... on both same file and same usb dongle and same destination phone ... file size about 6.9MB .. on windows all sending process take time about 45 sec but on raspberry take time about 2 min and 26 sec !!! in raspberry i used "ussp_push" to send file to phone and in windows i used stock software in windows ...

no pairing and encryption used and i used object push to send file on both WIN and RPI.

i test this with CSR bluetooth dongle and BroadCom bluetooth dongle and same result.

how can i speed up RPi bluetooth transfer like windows ?

this is dmesg:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.12.35+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #730 PREEMPT Fri Dec 19 18:31:24 GMT 2014
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: BCM2708
[    0.000000] cma: CMA: reserved 8 MiB at 17800000
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 98304
[    0.000000] free_area_init_node: node 0, pgdat c06282a0, node_mem_map c06d9000
[    0.000000]   Normal zone: 768 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 98304 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 97536
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=592 bcm2708_fb.fbheight=448 bcm2708.boardrev=0xe bcm2708.serial=0xa6bbd15f smsc95xx.macaddr=B8:27:EB:BB:D1:5F bcm2708_fb.fbswap=1 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 374468K/393216K available (4530K kernel code, 243K rwdata, 1352K rodata, 143K init, 701K bss, 18748K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xd8800000 - 0xff000000   ( 616 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd8000000   ( 384 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05c6c94   (5884 kB)
[    0.000000]       .init : 0xc05c7000 - 0xc05eaff4   ( 144 kB)
[    0.000000]       .data : 0xc05ec000 - 0xc0628de0   ( 244 kB)
[    0.000000]        .bss : 0xc0628dec - 0xc06d85e8   ( 702 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:394
[    0.000000] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 4294967ms
[    0.000000] Switching to timer-based delay loop
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [tty1] enabled
[    0.001183] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
[    0.001239] pid_max: default: 32768 minimum: 301
[    0.001754] Mount-cache hash table entries: 512
[    0.002601] Initializing cgroup subsys memory
[    0.002711] Initializing cgroup subsys devices
[    0.002747] Initializing cgroup subsys freezer
[    0.002777] Initializing cgroup subsys blkio
[    0.002922] CPU: Testing write buffer coherency: ok
[    0.003365] Setting up static identity map for 0xc0450a78 - 0xc0450ad4
[    0.005296] devtmpfs: initialized
[    0.021530] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    0.023096] NET: Registered protocol family 16
[    0.028466] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.029098] cpuidle: using governor ladder
[    0.029144] cpuidle: using governor menu
[    0.029607] bcm2708.uart_clock = 0
[    0.031545] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.031602] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.031636] mailbox: Broadcom VideoCore Mailbox driver
[    0.031728] bcm2708_vcio: mailbox at f200b880
[    0.031830] bcm_power: Broadcom power driver
[    0.031867] bcm_power_open() -> 0
[    0.031891] bcm_power_request(0, 8)
[    0.532610] bcm_mailbox_read -> 00000080, 0
[    0.532651] bcm_power_request -> 0
[    0.532905] Serial: AMBA PL011 UART driver
[    0.533070] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev3
[    0.897291] console [ttyAMA0] enabled
[    0.923532] bio: create slab <bio-0> at 0
[    0.929068] SCSI subsystem initialized
[    0.933053] usbcore: registered new interface driver usbfs
[    0.938758] usbcore: registered new interface driver hub
[    0.944318] usbcore: registered new device driver usb
[    0.950925] Switched to clocksource stc
[    0.955197] FS-Cache: Loaded
[    0.958376] CacheFiles: Loaded
[    0.973791] NET: Registered protocol family 2
[    0.979636] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.987049] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.993640] TCP: Hash tables configured (established 4096 bind 4096)
[    1.000088] TCP: reno registered
[    1.003384] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.009255] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.016031] NET: Registered protocol family 1
[    1.021029] RPC: Registered named UNIX socket transport module.
[    1.026986] RPC: Registered udp transport module.
[    1.031776] RPC: Registered tcp transport module.
[    1.036498] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.043903] bcm2708_dma: DMA manager at f2007000
[    1.048657] bcm2708_gpio: bcm2708_gpio_probe c05f9f10
[    1.054215] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    1.063808] audit: initializing netlink socket (disabled)
[    1.069311] type=2000 audit(0.910:1): initialized
[    1.239481] VFS: Disk quotas dquot_6.5.2
[    1.243849] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.252772] FS-Cache: Netfs 'nfs' registered for caching
[    1.259637] NFS: Registering the id_resolver key type
[    1.264923] Key type id_resolver registered
[    1.269131] Key type id_legacy registered
[    1.273933] msgmni has been set to 747
[    1.279664] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.287530] io scheduler noop registered
[    1.291609] io scheduler deadline registered (default)
[    1.297107] io scheduler cfq registered
[    1.302285] BCM2708FB: allocated DMA memory 57c00000
[    1.307330] BCM2708FB: allocated DMA channel 0 @ f2007000
[    1.317876] Console: switching to colour frame buffer device 74x28
[    1.329042] bcm2708-dmaengine bcm2708-dmaengine: Load BCM2835 DMA engine driver
[    1.339683] uart-pl011 dev:f1: no DMA platform data
[    1.346835] vc-cma: Videocore CMA driver
[    1.352327] vc-cma: vc_cma_base      = 0x00000000
[    1.358443] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.365287] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.381297] brd: module loaded
[    1.390814] loop: module loaded
[    1.395771] vchiq: vchiq_init_state: slot_zero = 0xd7800000, is_master = 0
[    1.406339] Loading iSCSI transport class v2.0-870.
[    1.413885] usbcore: registered new interface driver smsc95xx
[    1.421582] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.628974] Core Release: 2.80a
[    1.633631] Setting default values for core params
[    1.639790] Finished setting default values for core params
[    1.846919] Using Buffer DMA mode
[    1.851656] Periodic Transfer Interrupt Enhancement - disabled
[    1.858879] Multiprocessor Interrupt Enhancement - disabled
[    1.865863] OTG VER PARAM: 0, OTG VER FLAG: 0
[    1.871666] Dedicated Tx FIFOs mode
[    1.876877] WARN::dwc_otg_hcd_init:1042: FIQ DMA bounce buffers: virt = 0xd7c14000 dma = 0x57c14000 len=9024
[    1.889556] FIQ FSM acceleration enabled for :
[    1.889556] Non-periodic Split Transactions
[    1.889556] Periodic Split Transactions
[    1.889556] High-Speed Isochronous Endpoints
[    1.911704] dwc_otg: Microframe scheduler enabled
[    1.911798] WARN::hcd_init:473: FIQ at 0xc0329458
[    1.917932] WARN::hcd_init:474: FIQ ASM at 0xc0329708 length 36
[    1.925313] WARN::hcd_init:500: MPHI regs_base at 0xd8806000
[    1.932460] dwc_otg bcm2708_usb: DWC OTG Controller
[    1.938794] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    1.948814] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    1.955793] Init: Port Power? op_state=1
[    1.961146] Init: Power Port (0)
[    1.966047] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.975651] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.985739] usb usb1: Product: DWC OTG Controller
[    1.991941] usb usb1: Manufacturer: Linux 3.12.35+ dwc_otg_hcd
[    1.999233] usb usb1: SerialNumber: bcm2708_usb
[    2.006094] hub 1-0:1.0: USB hub found
[    2.011473] hub 1-0:1.0: 1 port detected
[    2.017293] dwc_otg: FIQ enabled
[    2.017313] dwc_otg: NAK holdoff enabled
[    2.017322] dwc_otg: FIQ split-transaction FSM enabled
[    2.017341] Module dwc_common_port init
[    2.017789] usbcore: registered new interface driver usb-storage
[    2.025737] mousedev: PS/2 mouse device common for all mice
[    2.033526] bcm2835-cpufreq: min=700000 max=700000 cur=700000
[    2.040881] bcm2835-cpufreq: switching to governor powersave
[    2.048099] bcm2835-cpufreq: switching to governor powersave
[    2.055312] sdhci: Secure Digital Host Controller Interface driver
[    2.062991] sdhci: Copyright(c) Pierre Ossman
[    2.069041] DMA channels allocated for the MMC driver
[    2.111184] Load BCM2835 MMC driver
[    2.117963] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.125290] ledtrig-cpu: registered to indicate activity on CPUs
[    2.135018] hidraw: raw HID events driver (C) Jiri Kosina
[    2.147511] usbcore: registered new interface driver usbhid
[    2.154717] usbhid: USB HID core driver
[    2.164747] TCP: cubic registered
[    2.171645] Initializing XFRM netlink socket
[    2.179400] NET: Registered protocol family 17
[    2.185487] Key type dns_resolver registered
[    2.195902] registered taskstats version 1
[    2.201546] vc-sm: Videocore shared memory driver
[    2.207570] [vc_sm_connected_init]: start
[    2.213084] Indeed it is in host mode hprt0 = 00021501
[    2.222036] [vc_sm_connected_init]: end - returning 0
[    2.234724] mmc0: host does not support reading read-only switch. assuming write-enable.
[    2.246243] Waiting for root device /dev/mmcblk0p2...
[    2.263161] mmc0: new high speed SDHC card at address b368
[    2.281220] mmcblk0: mmc0:b368 SDC   7.51 GiB 
[    2.291962]  mmcblk0: p1 p2
[    2.391864] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.403068] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.413930] devtmpfs: mounted
[    2.418937] Freeing unused kernel memory: 140K (c05c7000 - c05ea000)
[    2.431103] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.440141] Indeed it is in host mode hprt0 = 00001101
[    2.651578] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[    2.666617] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.679806] hub 1-1:1.0: USB hub found
[    2.685599] hub 1-1:1.0: 3 ports detected
[    2.971218] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.091524] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.111270] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.136275] smsc95xx v1.0.4
[    3.205965] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:bb:d1:5f
[    3.331193] usb 1-1.2: new full-speed USB device number 4 using dwc_otg
[    3.456129] usb 1-1.2: New USB device found, idVendor=0e8f, idProduct=0016
[    3.478156] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.496595] usb 1-1.2: Product: USB HUB 2.0
[    3.510781] usb 1-1.2: Manufacturer: GASIA Semi.
[    3.526709] hub 1-1.2:1.0: USB hub found
[    3.538126] hub 1-1.2:1.0: 4 ports detected
[    3.631201] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
[    3.778717] usb 1-1.3: New USB device found, idVendor=2001, idProduct=3c19
[    3.801108] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.819257] usb 1-1.3: Product: 11n Adapter
[    3.834394] usb 1-1.3: Manufacturer: Ralink
[    3.841159] usb 1-1.3: SerialNumber: 1.0
[    3.961427] usb 1-1.2.1: new full-speed USB device number 6 using dwc_otg
[    4.104344] usb 1-1.2.1: New USB device found, idVendor=0a5c, idProduct=21ec
[    4.125300] usb 1-1.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.137165] usb 1-1.2.1: Product: BCM20702A0
[    4.147608] usb 1-1.2.1: Manufacturer: Broadcom Corp
[    4.157427] udevd[158]: starting version 175
[    4.171128] usb 1-1.2.1: SerialNumber: 001986003364
[    4.291471] usb 1-1.2.2: new full-speed USB device number 7 using dwc_otg
[    4.443236] usb 1-1.2.2: New USB device found, idVendor=0a5c, idProduct=21ec
[    4.473033] usb 1-1.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.500384] usb 1-1.2.2: Product: BCM20702A0
[    4.518621] usb 1-1.2.2: Manufacturer: Broadcom Corp
[    4.545378] usb 1-1.2.2: SerialNumber: 001986003360
[    4.671405] usb 1-1.2.3: new full-speed USB device number 8 using dwc_otg
[    4.827788] usb 1-1.2.3: New USB device found, idVendor=03f0, idProduct=d404
[    4.861067] usb 1-1.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.891072] usb 1-1.2.3: Product: HP Bluetooth Adapter
[    4.898057] usb 1-1.2.3: Manufacturer: Broadcom Corp
[    5.437243] Bluetooth: Core ver 2.16
[    5.544461] NET: Registered protocol family 31
[    5.657400] Bluetooth: HCI device and connection manager initialized
[    5.768480] Bluetooth: HCI socket layer initialized
[    5.861204] Bluetooth: L2CAP socket layer initialized
[    5.868097] Bluetooth: SCO socket layer initialized
[    6.126548] usbcore: registered new interface driver btusb
[    8.135941] cfg80211: Calling CRDA to update world regulatory domain
[    8.151007] Bluetooth: hci0 command 0x0c01 tx timeout
[    8.741237] usb 1-1.3: reset high-speed USB device number 5 using dwc_otg
[    8.932127] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0503 detected
[    9.280925] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[    9.409103] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    9.415110] usbcore: registered new interface driver rt2800usb
[   10.151003] Bluetooth: hci0 command 0x2001 tx timeout
[   12.976695] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   13.465619] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   14.362197] bcm2708 watchdog, heartbeat=10 sec (nowayout=0)
[   19.643523] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   22.259488] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   22.272473] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
[   22.705987] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   24.240101] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[   26.515862] 8021q: 802.1Q VLAN Support v1.8
[   28.655678] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   28.655714] Bluetooth: BNEP filters: protocol multicast
[   28.655763] Bluetooth: BNEP socket layer initialized
[   28.853556] Bluetooth: RFCOMM TTY layer initialized
[   28.853683] Bluetooth: RFCOMM socket layer initialized
[   28.853737] Bluetooth: RFCOMM ver 1.11
[   30.305110] Adding 102396k swap on /var/swap.  Priority:-1 extents:1 across:102396k SSFS
[   40.971438] ip_tables: (C) 2000-2006 Netfilter Core Team
[   41.380278] watchdog stopped
2

The Pi CPU is 'risc' machine running at less than 1GHz (with RAM speeds half that).

Windows is, no doubt, running on a multi-core, multi GHz CPU with quad (or better) interleaved RAM. Result is Pi is AT LEAST 10x slower than a typical windows PC ...

Worse, on Pi, anything (except video) is done in software .. on a PC motherboard all sorts of hardware support exists for data transfers (look up 'DMA').

In short, it's a miricle that the Pi is ONLY 5x slower .. if you need it faster, try upping the Pi CPU clock .. (or go find the Bluetooth drivers and re-write i.e optomise the data 'hand off' code)

  • Could you please provide some sources for all you statements. And please provide concrete answers, simply pointing out that a Raspberry Pi is generally slower than a PC does not necessarily mean that it would not be able to do bluetooth transfers at the same rate. – zpon Dec 6 '16 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.