top of page

"Rasmus geht seinen Weg" - Gruppe für Lehrer

Öffentlich·11 Mitglieder
Daniel Foster
Daniel Foster

Bcsp Bluecore Serial Protocol |TOP|

This is a serial interface and there are several protocols used, e.g. H4, H5, BCSP. The H4 protocol is probably the most common and uses serial control lines. The H5 protocol is a three-wire protocol so no serial control lines are used. There are also a number of proprietary protocols, BCSP (BlueCore Serial Protocol) being an example.

Bcsp bluecore serial protocol

To support flexible partitioning of software between the host and the Bluetooth subsystem, and to enhance the speed of product design, CSR offers a multi-protocol communications link known as BlueCore Serial Protocol (BCSP). BCSP provides a more sophisticated option than currently defined Bluetooth serial protocols: H4/UART or H3/RS232.

BCSP (BlueCore Serial Protocol) is serial protocol for communicationbetween Bluetooth device and host. This protocol is required for nonUSB Bluetooth devices based on CSR BlueCore chip, including PCMCIA andCF cards.

BlueZ supports the core Bluetooth protocols, including host controlinterface (HCI), logical link control and adaptation protocol (L2CAP),personal area networking (PAN), service discovery protocol (SDP),synchronous connection oriented (SCO) audio and serial port emulation(RFCOMM). It also comes bundled with a bunch of user space dæmons andconfiguration tools.

BlueZ supports the different user profiles described by the Bluetoothspecification. BlueZ BNEP (Bluetooth Network Encapsulation Protocol)implements Ethernet emulation, which lets TCP/IP run directly overBluetooth. The BNEP module, together with a user mode dæmon calledpand implements Bluetooth PAN. BlueZ RFCOMM allows serial portapplications, such as terminal emulators, and protocols, such as point-to-pointprotocol (PPP), to run unchanged over Bluetooth. The RFCOMM module,along with a user mode dæmon called dund implements Bluetoothdial-up networking.

The Bluetooth specification defines the use of UART and USB transportmechanisms to transfer HCI packets between a Bluetooth device and ahost system. For UART interfaces, the main protocols available to encapsulate HCI packets are H4/UART and Blue Core SerialProtocol (BCSP). Whereas H4 serves as the standard method fortransmitting Bluetooth data over a UART interface, BCSP is aproprietary protocol from CSR that supports error checking andretransmission. BlueZ supports both H4 and BCSP. If the Bluetooth chipused on your board has a UART interface to the host processor and isprogrammed to encapsulate HCI packets using BCSP, you need toinform the BlueZ stack of this. Do so using hciattach: hciattach ttySxbcsp, where x is the UART channel number connected to theBluetooth chip. The BlueZ UART link driver hci_uart now talks to thechip using BCSP and passes the Bluetooth data to and from the BlueZstack.

where ttySx is the physical or virtual serial device over which PPPruns and connection-script is a file in the /etc/ppp/peers/directory that contains the AT command sequences exchanged betweenpppd and the service provider in order to establish a link. Afterestablishing the link connection and completing authentication, PPPstarts a network control protocol (NCP). Internet protocol controlprotocol (IPCP) is the NCP used for running IP. Once IPCP successfullynegotiates IP addresses, PPP starts talking with the TCP/IP stack.Your device now is ready to run TCP/IP applications over the GPRSlink.Listing 2 is an example PPP connection script for connecting yourdevice to a GPRS service provider.

To open the ttySA1 serial port and initialize the module @ 230400 baud, 8E1, no hardware flow control, the following command is used in Affix:#btctl open_uart /dev/ttySA1 bcsp 230400 pareven,low

But it wouldn't be much sense for Deep Sleep if it can't be used with UART, would it? So CSR cameup with their own proprietary serial protocol - BlueCore Serial Protocol (BCSP). BCSP can coexist with Deep Sleep quite nicely, since it has a mechanism for recovering from lost or corrupted data. If BlueCore receives a BCSP packet while in Deep Sleep mode, packet still can be lost or corrupted, but RX line activity wakes the chip up, and since BCSP supports CRC checksums and packet retransmission, the packet gets re-sent after certain time-out (normally 250ms, adjustable via PSKEY_UART_SEQ_TIMEOUT (0x405) key),by which time the chip is awake and ready to receive.There's a work-around against loosing 250ms on every retransmission - after long period ofinactivity just send a short neutral packet to wake it up (i.e. BCSP ACK packet), wait for10ms and then start transmitting the data. Or alternatively, use PIO or CTS lines to signalcondition and wake the chip up instead of sending wake-up packet to UART. Of course, there'redrawbacks of using BCSP too, one of them is protocol overhead that consumes some of thebandwidth. I guess that's the price to pay for reliable connection.

Having a donor USB dongle in my hands with aim to prove the concept, I wired UART RX and TX, module's +3.3V and ground linesfrom USB dongle with flying leads to TTLRS232 transceiver (old cell phone serial cable collecting dust in my closet was donating the transceiver chip and DB9 connector assembly).The CSR module was still soldered to dongle's PCB (and powered up fromUSB lines). The transceiver chip was powered from CSR module. On initial bootup, BC2 configures itself to use USB protocol. Then I reprogrammed it overUSB bus to use UART BCSP protocol by writing new key values into RAM persistent store (that is important to notice, sinceprogramming keys into RAM can't damage module permanently - if something goes wrong, power-cyclingwould erase RAM and old keys (from flash memory) will be used again. After changing protocol to BCSP,warm reset (which doesn't erase RAM) was issued and viola! I can get BCSP sync packets and establishBCSP connection over serial line! The patient is still on life support, but at least it can breath! ;)Please see pictures below...

Il Serial Line Internet Protocol (protocollo di interfaccia per linea seriale, SLIP), è un protocollo di rete di Livello datalink, usato per stabilire connessioni dirette tra due nodi specie su connessioni seriali asincroni via modem o diretti con l'ausilio di un null-modem. In passato costituiva uno degli standard più usati per l'IP commutato. 350c69d7ab


Willkommen in der Gruppe zu unserer Aufführung "Rasmus geht ...


Die Schule der magischen Tiere

Theaterstück für eine Schulklasse nach dem Buch von Margit Auer

Im Kinderhaus der Brunsviga in Braunschweig haben wir im Herbst 2022 das Theaterstück "Die Schule der magischen Tiere" mit Kindern aufgeführt, und eine tolle Aufführung mit fast 300 Besuchern zum Abschluss des Aufführungsworkshops erleben dürfen. Wir bemühen uns weiter darum, hier mehr Fotos aus der Aufführung zeigen zu dürfen, und bereiten zumindest einen weiteren Aufführungsworkshop mit diesem Stück vor. Interessierte Schulen oder andere Einrichtungen für Kinder können sich einfach direkt an uns wenden!

bottom of page