Open ademasi opened 1 year ago
@ademasi Thanks for submitting this issue. Unfortunately without the device I can't help much. It is odd to me that the Magene L508 would have a different UUID because it is supposedly able to pair with common cycling computers.
I think you may be right. It is probable that the UUID is correct (6a4e3203-...), however the current firmware does not support outputting radar data via Bluetooth. The devices compatible with the L508 are all ANT+.
I have contacted Magene support to get information about the next firmware upgrade.
@ademasi That makes some sense. Good luck and keep us posted!
The answer of Magene is as follows:
Thank you for writing back. I am sorry that there is no specific timetable for when the radar info will be available via Bluetooth now, and I have feedback your needs again to the radar tail light team.
So, wait and see, I will keep trying with each firmware update.
I encountered the same problem.
What I found is that the iOS app "Magene Utility" supports reading the radar information via BLE, so maybe they are using some customized protocol to communicate with the radar?
@Elfsong I think we have two options:
Hope this helps, Zach
@zacharyedwardbull Thank you for your prompt reply! I will try both.
I tried to capture the Bluetooth packets today and found the app sent two "write" commands to enable the radar data transmission:
Nice work! Good luck with the rest of the implementation :)
@zacharyedwardbull @ademasi I've contacted the Magene team, but they've not replied yet.
I will try to reverse-engineering this protocol then. Since it may be a long run, I will keep you guys updated once I complete it. Thank you!
Excellent, thanks for looking into this!
Hey folks, This is for Magene L508 using ANT+, I am getting data in this format data: array('B', [81, 255, 12, 1, 105, 26, 215, 13, 128, 21, 136, 40, 5]) where the first 9 values I am not understanding and last 4 are values are for device number, type and transmission type. Last 5 values are always fixed so what this 128 is and what are first 8 values? which ones are range and speed? if you have any idea what are these could you please help?
Hi @mamtasiyak thank you for reaching out. I can't help directly, but the definitive resource for you is probably the ANT+ protocol documentation, which I have downloaded and attached for your convenience.
Is it only for me or Magene L508 is not detecting objects for everyone else as well?
I did some experiments with the device in all the modes and It is not detecting objects and even when for once I detected something, the data is incorrect. Is it possible that the device is defected or they are not able to detect objects?
If not Magene then which cheap LiDAR you will recommend which detects objects accurately?
@mamtasiyak Hi, I can recommend Garmin RVR315. That's the Radar device that the pycycling code was first tested on. LiDAR is a related but different technology (3D and high-resolution but requires lots of postprocessing)
Thank you so much @tensorturtle for your prompt response. Why I am asking LiDAR recommendation is because I want to do object classification. Is object classification possible with Radar without integrating it with camera?
@mamtasiyak I see. The cycling radar devices (that pycycling supports) doesn't really differentiate between objects and its postprocessing algorithm is hidden from us. The device calculates that internally and returns to us just the distance and speed of each object. LiDAR, which returns 3D point clouds and requires 3D object detection neural network for postprocessing is very much outside the scope of this project. LiDAR is in general not a 'cheap' technology. Most of them are for cars & robots, and I don't believe there is a cycling-specific LiDAR product on the market.
Understood. Thanks @tensorturtle :)
Does Garmin RVR315 only detect cars or it detect cycles, humans or any other object?
Does Garmin RVR315 only detect cars or it detect cycles, humans or any other object?
Basically it's good at detecting human-or-larger sized objects approaching it at above 10km/h or so. It's pretty good at detecting motorcycles and fast-approaching cyclists. Bad for regular cyclists and people.
Folks my Garmin RVR315 is not able to identify objects coming from left and write, it always says for all the objects approaching from behind even if it is coming from left or right.
@mamtasiyak I don't think this github issue is the appropriate place for discussion regarding specifics of Garmin radar performance-perhaps try official Garmin or related forums?
Hi,
Thanks for your project and the inclusion of the rearview radar support.
I have been trying to get the radar data from the Magene L508. I can get battery and other information, however the radar information are not coming.
The characteristic id from https://github.com/zacharyedwardbull/pycycling/blob/57184db1a8d39e14775990854e13ae6db3996ba1/pycycling/rear_view_radar.py#L22 is unavailable on the Magene.
By running a service discovery with bleak, I found what I think is the good id for this data (8ce5cc03-0a4d-11e9-ab14-d663bd873d93), see below.
When replacing with the possible good id, I can use the read gatt on it. When I try to subscribe to the notification for this characteristic, pycycling reply with:
If I am using bleak directly, I am not getting anything when cars are coming
Maybe @tensorturtle will have more information on this topic.
I can also provide a Wireshark Bluetooth packet capture of the radar messages if needed.
Regards, Alex.