-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Bluetooth support for Raspberry Pi Zero W #224
Comments
Try I don't use BLE, but I've been told that people have gotten it working. Some people modify the |
I don't understand |
I'm glad it's working! Let's not change anything. :) Here's the story on the UART. There are two UARTs on the Raspberry Pis, Unless you run into performance issues with whatever you're doing with Bluetooth, I'd stick with |
I'm adding more information here to support #227 using An example scanner to collect Manufacturer Specific Data. Raspberry Pi Zero W results: iex(1)> {:ok, pid} = BlueHeronScan.start_link(:uart, %{device: "ttyS0"})
{:ok, #PID<0.10860.0>}
iex(2)> state = :sys.get_state(pid)
%{
ctx: #BlueHeron.Context<0.10861.0>,
devices: %{
4753574963174 => %{
272 => <<64, 10, 1, 0>>,
:name => "Bose AE2 SoundLink",
:time => ~U[2021-09-27 14:48:25.778174Z]
},
48660401950223 => %{
784 => <<64, 16, 2, 48>>,
:name => "LE-Bose Revolve SoundLink",
:time => ~U[2021-09-27 14:48:25.658670Z]
},
110946934216995 => %{
117 => <<66, 4, 1, 128, 102, 100, 231, 216, 154, 89, 35, 102, 231, 216,
154, 89, 34, 1, 62, 0, 0, 0, 0, 0>>,
:time => ~U[2021-09-27 14:48:25.873323Z]
},
181149778439893 => %{
1 => <<1, 1, 4, 28, 196, 90>>,
:name => "GVH5102_EED5",
:time => ~U[2021-09-27 14:48:26.032518Z]
},
181149781445015 => %{
name: "ihoment_H6182_C997",
time: ~U[2021-09-27 14:48:26.059225Z]
},
246390811914386 => %{
60552 => <<0, 97, 10, 12, 22, 100, 2>>,
:name => "Govee_H5074_F092",
:time => ~U[2021-09-27 14:48:24.429195Z]
}
},
ignore_cids: [6, 76],
working: true
}
iex(3)> BlueHeronScan.ignore_cids(pid, MapSet.new([6, 76, 117, 784]))
{:ok, #MapSet<[6, 76, 117, 784]>}
iex(4)> BlueHeronScan.clear_devices(pid)
:ok
iex(5)> state = :sys.get_state(pid)
%{
ctx: #BlueHeron.Context<0.10861.0>,
devices: %{
4753574963174 => %{
272 => <<64, 10, 1, 0>>,
:name => "Bose AE2 SoundLink",
:time => ~U[2021-09-27 14:48:46.192324Z]
},
181149778439893 => %{
1 => <<1, 1, 4, 28, 196, 90>>,
:name => "GVH5102_EED5",
:time => ~U[2021-09-27 14:48:46.287562Z]
},
181149781445015 => %{
name: "ihoment_H6182_C997",
time: ~U[2021-09-27 14:48:47.139443Z]
},
246390811914386 => %{
60552 => <<0, 94, 10, 11, 22, 100, 2>>,
:name => "Govee_H5074_F092",
:time => ~U[2021-09-27 14:48:45.477457Z]
}
},
ignore_cids: #MapSet<[6, 76, 117, 784]>,
working: true
}
iex(6)> BleAdMfgData.print(state.devices)
[
["26.5˚C 56.4% RH 100%🔋", "Govee_H5074_F092"],
["27.0˚C 50.8% RH 90%🔋", "GVH5102_EED5"]
]
iex(7)> BlueHeronScan.disable(pid)
:ok
iex(8)> BlueHeronScan.clear_devices(pid)
:ok
iex(9)> state = :sys.get_state(pid)
%{
ctx: #BlueHeron.Context<0.10861.0>,
devices: %{},
ignore_cids: #MapSet<[6, 76, 117, 784]>,
working: true
}
iex(10)> BlueHeronScan.enable(pid)
:ok
iex(11)>
|
Environment
elixir -v
):mix nerves.env --info
)may help
NA
Current behavior
There is no UART for Bluetooth.
Expected behavior
https://hexdocs.pm/blue_heron_transport_uart/readme.html
https://hexdocs.pm/nerves_system_rpi0/readme.html#linux-kernel-configuration-notes
The text was updated successfully, but these errors were encountered: