firmware merge requestshttps://git.flow3r.garden/card10/firmware/-/merge_requests2021-12-25T18:33:49Zhttps://git.flow3r.garden/card10/firmware/-/merge_requests/505ble: Increase max size of the firmware string2021-12-25T18:33:49Zrahixcard10@rahix.deble: Increase max size of the firmware stringFor some development builds, the firmware version string can get quite
long. For example: `v1.17-123-g2120027c87da-dirty`. To ensure such
long versions still get transmitted properly, increase the buffer size
to 32 bytes. Let's hope t...For some development builds, the firmware version string can get quite
long. For example: `v1.17-123-g2120027c87da-dirty`. To ensure such
long versions still get transmitted properly, increase the buffer size
to 32 bytes. Let's hope that's enough for now...schneiderschneiderhttps://git.flow3r.garden/card10/firmware/-/merge_requests/466Make sleep work again when BLE is disabled2021-04-03T21:42:03Zrahixcard10@rahix.deMake sleep work again when BLE is disabledIn commit 4944aa485d02 ("fix(ble): Update to changes from new SDK")
a call to `BbDrvDisable()` was added to `sleep_deepsleep()`. This
function must, however, only be called when BLE was previously
initialized, otherwise a wakeup from de...In commit 4944aa485d02 ("fix(ble): Update to changes from new SDK")
a call to `BbDrvDisable()` was added to `sleep_deepsleep()`. This
function must, however, only be called when BLE was previously
initialized, otherwise a wakeup from deepsleep will not be possible (if
it ever reaches it?).
Fix this by reworking the BLE enabled check to also be usable here, to
only call `BbDrvDisable()` when BLE is active.
Fixes: 4944aa485d02 ("fix(ble): Update to changes from new SDK")
Fixes: #231v1.17schneiderschneiderhttps://git.flow3r.garden/card10/firmware/-/merge_requests/380BSEC support2020-12-24T21:39:59ZschneiderBSEC supportAdds basic Bosch BSEC support.
BSEC is a proprietary library from Bosch which uses the BME680 to calculate an estimation of an "Indoor Air Quality". It takes complete control of the BME680 and performs a measurement every 3 seconds. Thi...Adds basic Bosch BSEC support.
BSEC is a proprietary library from Bosch which uses the BME680 to calculate an estimation of an "Indoor Air Quality". It takes complete control of the BME680 and performs a measurement every 3 seconds. This consumes about 0.9 mA on the 1.8 V rail. A later iteration of this driver might also allow to change the interval to 300 seconds to save energy.
Two configuration options are introduced. One to enable the driver (as it is a binary blob) and one to enable the debug prints of the driver. If the library is active, calls to the BME680 API will stop using the sensor directly and return a subset of the data gathered by the BSEC library.
You can use this https://phyphox.org/ "experiment" to access the data:
![download__1_](/uploads/c5fc1dfc1189e56491730c21b2ee2bf2/download__1_.png)
![cwNiWbhBMDGanPdkseSkGBCn](/uploads/d6d4fed5084a53e2398a7f1087218575/cwNiWbhBMDGanPdkseSkGBCn.png)
In addition the pycardium BME680 API and the BLE Environmental Sensing Service have been extended.https://git.flow3r.garden/card10/firmware/-/merge_requests/400Use CSPRNG for BTLE2020-09-20T14:57:55ZschneiderUse CSPRNG for BTLEA followup after merging https://git.card10.badge.events.ccc.de/card10/firmware/-/merge_requests/399:
This directs all calls from the BTLE stacks internal `BbBleDrvRand` to our `__wrap_BbBleDrvRand()` which forwards it to `epic_csprng_r...A followup after merging https://git.card10.badge.events.ccc.de/card10/firmware/-/merge_requests/399:
This directs all calls from the BTLE stacks internal `BbBleDrvRand` to our `__wrap_BbBleDrvRand()` which forwards it to `epic_csprng_read()`v1.16rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/387feat(ble): write HCI layer log file2020-06-17T13:51:54Zschneiderfeat(ble): write HCI layer log fileAdds an option to write a btsnoop compatible log file containing BLE
traffic. A new file is created after each boot if BLE is activated and
the `ble_log_enable` option is set in `card10.cfg`. The last 10 logs are
kept via log rotation.Adds an option to write a btsnoop compatible log file containing BLE
traffic. A new file is created after each boot if BLE is activated and
the `ble_log_enable` option is set in `card10.cfg`. The last 10 logs are
kept via log rotation.rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/385BLE fixes 2020-22020-06-12T20:33:35ZschneiderBLE fixes 2020-2Just some minor changes to more rigidly define the pairing requirements and behaviour. A secure implementation still needs https://git.card10.badge.events.ccc.de/card10/firmware/-/issues/74Just some minor changes to more rigidly define the pairing requirements and behaviour. A secure implementation still needs https://git.card10.badge.events.ccc.de/card10/firmware/-/issues/74rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/378Linux script to transfer a file to a card10 via BLE2020-04-28T21:30:40ZschneiderLinux script to transfer a file to a card10 via BLEI got tired of going in and out of USB mode to transfer scripts to the card10. I also didn't want to use the more or less reliable serial connection.
This script used bluepy to open a connection and uploads the file using the same mec...I got tired of going in and out of USB mode to transfer scripts to the card10. I also didn't want to use the more or less reliable serial connection.
This script used bluepy to open a connection and uploads the file using the same mechanism that the apps are using.
Caveats:
- Linux seems to always use the slowest allowed connection speed that the device offers. This severely limits data transmission speeds with the currently released firmware. It specifies a 1 second maximum connection interval, leading to one transaction every 2 seconds. Android apparently does not care about the announced connection interval...
- Needs a pairing with the Linux machine. This can be done following the steps in `Documentation/bluetooth/card10.rst`.
- Does only work under Linux as bluepy only support Linux.
- Further documentation is missing
I'd like to merge this in it's current state.
Things to improve:
- Abstract a file transfer away into a class.
- Allow transmission of multiple files
- Allow transmission of directories
- Honor the `--silent` option
- Offer pipenv with the requirementsrahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/367Ble misc fixes2020-01-02T09:07:51ZHauke MehrtensBle misc fixesThis fixes some random BLE problems, but I do not think this is very relevant.This fixes some random BLE problems, but I do not think this is very relevant.https://git.flow3r.garden/card10/firmware/-/merge_requests/319Update BLE bianry blob, patch it and turn off encryption when needed2019-10-04T19:03:06ZschneiderUpdate BLE bianry blob, patch it and turn off encryption when neededThis contains a few experimental changes which should increase BLE stability and also allow multiple successive encrypted connections.
Needs testing.This contains a few experimental changes which should increase BLE stability and also allow multiple successive encrypted connections.
Needs testing.https://git.flow3r.garden/card10/firmware/-/merge_requests/227read state of rockets2019-08-31T09:30:45Zgenofireread state of rocketsv1.10rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/242read state of rgb LEDs2019-08-30T08:20:02Zgenofireread state of rgb LEDs- [x] impl
- [x] epicardium
- [x] pycardium
- [x] ble
- [x] test
- [ ] epicardium
- [x] pycardium
- [x] ble
- [x] doku
- [x] lint- [x] impl
- [x] epicardium
- [x] pycardium
- [x] ble
- [x] test
- [ ] epicardium
- [x] pycardium
- [x] ble
- [x] doku
- [x] lintv1.10rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/244BLE: Some cleanups and security updates2019-08-28T20:52:25ZHauke MehrtensBLE: Some cleanups and security updatesv1.9genofiregenofirehttps://git.flow3r.garden/card10/firmware/-/merge_requests/248Hauke/ble extra logging2019-08-24T19:33:49ZHauke MehrtensHauke/ble extra loggingv1.7rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/208ble: card10 svc - time read2019-08-23T13:54:58Zgenofireble: card10 svc - time read- [x] build
- [x] lint
- [x] test- [x] build
- [x] lint
- [x] testHauke MehrtensHauke Mehrtenshttps://git.flow3r.garden/card10/firmware/-/merge_requests/196ble: card10 svc - personal state2019-08-23T10:15:24Zgenofireble: card10 svc - personal state#112#112Hauke MehrtensHauke Mehrtenshttps://git.flow3r.garden/card10/firmware/-/merge_requests/197BLE: FileTrans: activate security2019-08-22T17:23:44ZHauke MehrtensBLE: FileTrans: activate securityOnly allow paired devices to use this Service.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>Only allow paired devices to use this Service.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>genofiregenofirehttps://git.flow3r.garden/card10/firmware/-/merge_requests/151ble: card10 svc - rewrite2019-08-22T15:02:21Zgenofireble: card10 svc - rewritefixed #84fixed #84Hauke MehrtensHauke Mehrtenshttps://git.flow3r.garden/card10/firmware/-/merge_requests/181Ble file trans const init2019-08-22T14:52:39ZHauke MehrtensBle file trans const initDo it like the card10 service.Do it like the card10 service.genofiregenofirehttps://git.flow3r.garden/card10/firmware/-/merge_requests/152BLE: FileTrans: Create a directory if needed2019-08-21T21:29:03ZHauke MehrtensBLE: FileTrans: Create a directory if neededWhen a file should be created in a non existing folder, it will now be
automatically created.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>When a file should be created in a non existing folder, it will now be
automatically created.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>schneiderschneiderhttps://git.flow3r.garden/card10/firmware/-/merge_requests/161ble-uart: Prevent buffer overflow2019-08-21T19:13:40Zrahixcard10@rahix.deble-uart: Prevent buffer overflowFor messages with lines longer than 129 characters, ble_uart_write would
start overwriting adjacent memory. This commit fixes this by starting a
new line once the buffer runs full.For messages with lines longer than 129 characters, ble_uart_write would
start overwriting adjacent memory. This commit fixes this by starting a
new line once the buffer runs full.schneiderschneider