# owonb35
Bluetooth Client for Owon B35 Multimeter for newer (post mid 2017) multimeters with the Semic CS7729CN-001 chip.
Older multimeters that use the Fortune Semiconductor FS9922 chip should use [inflex/owon-b35](https://github.com/inflex/owon-b35).
The [Owon B35](http://owontme.com/products_owon_3_5%7C6_digital_multimeter_with_bluetooth) series of multimeters use Bluetooth Low Energy (BLE) to transmit readings to remote monitors such as smartphone apps. This Linux client allows to to caputure measurement data to you computer to record in a file or display on charting software such as gnuplot or KST.
## Requirements
This client requires the [Gattlib](https://github.com/labapart/gattlib) BLE library to be installed. Compiled packages are available to install without needing to compile.
## Installation
Either download the [compiled binary](https://github.com/DeanCording/owonb35/releases/) or the source code to compile your own.
Compiling is a simple `make`.
## Usage
The client is designed to be a simple receiver of measurement data that outputs in formats that can be piped into other tools for processing or display.
```
owonb35 [-s|-S|-t|-T|-d] [-c|-j] [-n|-u|-m|-b|-k|-M] [-x] [-r] [-q] [-h|-V] [<device_address>]
Measurement collection
owonb35 -R <seconds per measurement> <number of measurements> [<device_address>]
Start offline measurement recording
Client for Owon B35/B35+/B35T+ digital multimeters using bluetooth.
-i Interactive remote control
-s Timestamp measurements in elapsed seconds from first reading
-S Timestamp measurements in Unix epoch seconds
-t Timestamp measurements in elapsed milliseconds from first reading
-T Timestamp measurements in Javascript epoch milliseconds
-d Timestamp measurements with ISO date/time
-c Comma separated values (CSV) output
-j JSON output
-n Scale measurements to nano units
-u Scale measurements to micro units
-m Scale measurements to milli units
-b Scale measurements to base units
-k Scale measurements to kilo units
-M Scale measurements to mega units
-x Output measurement value without units or type for use with feedgnuplot
-R Start offline measurement recording
-r Download offline measurement recording
-q Quiet - no status output
-h Display this help and exit
-V Display version and exit
<device_address> Address of Owon multimeter to connect
otherwise will connect to first meter found if not specified
Interactive controls:
s - Select
a - Auto
r - Range
l - Backlight
h - Hold
b - Turn off Bluetooth
d - Delta (Relative)
f - Fequency Hz/Duty
m - Min/Max
n - Normal display
```
You can provide an optional Bluetooth address for the specific multimeter to connect to or the client will otherwise scan for devices and connect to the first multimeter it finds. Scanning and connection can be a bit flaky at times. Note that only one client can connect to the multimeter at a time.
Measurments can be optionally timestamped in actual time or elapsed time since the first measurement was received. Timestamps can be in seconds, milliseconds, or date-time. Note that the multimeter transmits measurements approximately every 600ms.
Output format defaults to space seperated values but can also be output in Comma Seperated Values (CSV) or JSON formats. By default, the measurement unit is output but this can be disabled for feeding applications that can only handle numeric data.
By default, measurements are output in the same scale and resolution as displayed by the multimeter. When using autoranging, this can result in the measurement scale and resolution changing when the multimeter changes ranges. To avoid this, you can optionally lock the measurement scale. However, as the multimeter autoranges, it will change the resolution of the measurement value.
### Interactive Mode
Specifying the `-i` option allows you to interactively control the multimeter remotely from the client. Using these controls, you can change the measurement range, switch between some functions, display min/max/relative/hold values, and turn the backligh on. The interactive controls correspond to the multimeter front panel buttons.
### Offline Recording
The client can be used to initiate offline recording using the `-R` option. With this command, specify the measurement interval in seconds per measurement, and the number of measurements to record. The multimeter has the capacity to store up to 10,000 measurements.
Offline recorded measurements are downloaded using the `-r` option. Recorded measurements are replayed and output in the same way as realtime measurements. Timestamp, format and scale options can be used to control the measurement output.
## Interfacing
The client is designed to inteface into other tools using the normal Unix pipe and redirection mechanisms.
### Files
Measurement values can be written directly to file using redirects:
Write timestamped measurements in CSV format - `owonb35 -c -d > measurements.txt`
The `tee` command can be used to write measurement values to a file and also pipe them to another application.
`owonb35 | tee measurements.txt | next_tool`
### gnuplot
[gnuplot](http://www.gnuplot.info) is a very flexible plotting program. The client can feed measurements to gnuplot in realtime using [feedgnuplot](https://github.com/dkogan/feedgnuplot).
`owonb35 -s -x -b | feedgnuplot --domain --lines --stream --ymin 0 --ylabel 'Volts' --xlabel 'Seconds' --exit`
It is best to lock the measurement unit and scale to prevent them jumping around if the multimeter autoranges during measurement. feedgnuplot doesn't handle non-numeric data in its input, so the output of measurement units need to be disabled. It also cannot handle measurements with less than one second resolution, which means that it can only display elapsed timestamps. Data written to file and loaded into gnuplot can display actual timestamps.
### MQTT
MQTT is a publish/subscribe messaging system frequently used in Internet of Things networks. It allows clients to publish data onto a network for other clients to subscribe to. Data is usually published as single values or in JSON format.
Single value - `omonb35 -x -b | mosquitto_pub -t voltage -l`
JSON format - `omonb35 -T -b -j | mosquitto_pub -t measurement -l`
## Protocol
The multimeter uses the Bluetooth Low Energy Generic Attributes [(BLE GATT)](https://www.bluetooth.com/specifications/gatt/generic-attributes-overview) to transmit measurements.
### Realtime Measurements
Measurement data is output as a BLE notification with a 0xfff4 UUID. The packet consists of three uint16_t numbers.
The first number encodes the function, scale, and decimal places.
```
Overload 1 1 1
Decimal--------------------------------------
| |
DCmV 1 1 1 1 0 0 0 0 0 0 0 1 1 x x x f0 18
DCV 1 1 1 1 0 0 0 0 0 0 1 0 0 x x x f0 20
ACmV 1 1 1 1 0 0 0 0 0 1 0 1 1 x x x f0 58
ACV 1 1 1 1 0 0 0 0 0 1 1 0 0 x x x f0 60
DCuA 1 1 1 1 0 0 0 0 1 0 0 1 0 x x x f0 90
DCmA 1 1 1 1 0 0 0 0 1 0 0 1 1 x x x f0 98
DCA 1 1 1 1 0 0 0 0 1 0 1 0 0 x x x f0 a0
ACuA 1 1 1 1 0 0 0 0 1 1 0 1 0 x x x f0 d0
ACmA
没有合适的资源?快使用搜索试试~ 我知道了~
owonb35:Owon B35万用表的蓝牙客户端
共5个文件
license:1个
makefile:1个
gitignore:1个
5星 · 超过95%的资源 需积分: 23 6 下载量 184 浏览量
2021-05-16
15:14:05
上传
评论
收藏 12KB ZIP 举报
温馨提示
owonb35 适用于Owon B35万用表的蓝牙客户端,适用于具有Semic CS7729CN-001芯片的新型(2017年中后)万用表。 使用Fortune Semiconductor FS9922芯片的较旧万用表应使用 。 系列万用表使用低功耗蓝牙(BLE)将读数传输到智能手机应用程序等远程显示器。 该Linux客户端允许将测量数据捕获到您的计算机上,以记录在文件中或显示在gnuplot或KST等制图软件上。 要求 此客户端需要安装 BLE库。 编译后的软件包可用于安装而无需编译。 安装 下载已或源代码以自己编译。 编译是一个简单的make 。 用法 客户端被设计为简单的测量数据接收器,其输出格式可以通过管道传输到其他工具中进行处理或显示。 owonb35 [-s|-S|-t|-T|-d] [-c|-j] [-n|-u|-m|-b|-k|-M] [-x] [-r] [-q
资源详情
资源评论
资源推荐
收起资源包目录
owonb35-master.zip (5个子文件)
owonb35-master
owonb35.c 23KB
LICENSE 1KB
.gitignore 430B
Makefile 411B
README.md 12KB
共 5 条
- 1
侯戈
- 粉丝: 24
- 资源: 4629
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1