Should mm_get_devices_list work on a beacon? Or only on modem?

Frequent questions asked online, offline, in forums are answered here
Post Reply
Posts: 10
Joined: Wed Oct 23, 2019 7:53 am

Should mm_get_devices_list work on a beacon? Or only on modem?

Post by theRoboticist »

I am trying to write some code for a raspberry pi with 2 mini-tx beacons attached (in paired mode). I am trying to get the list of devices to verify that the beacons I expect to be connected to the pi are indeed present and ready for operation. I am able to connect to a device and get the USB connection info with mm_get_device_version_and_id (following the example_source included in the API folder) but then trying to list devices fails repeatedly. Is this expected?

Note that I can open the dashboard and see all of my devices just fine so it seems to be something in my handling of the API that is causing the problem.

(Side note - mm_open_port_by_name also fails for me when providing the port name such as "/dev/ttyACM0", but mm_open_port works correctly so I think it will work okay to only connect to a single hedge with the pi since they will be in paired mode and I can just read the paired position and angle. Please correct me if that is an invalid assumption)

Posts: 370
Joined: Sat Feb 06, 2016 4:03 pm

Re: Should mm_get_devices_list work on a beacon? Or only on modem?

Post by smoker77 »


mm_get_devices_list should work only with modem, beacons don't know list of the devices.
API is mostly intended for work with modem, not with beacons.

For reading streaming data from mobile beacons you can use another library:
In future updates we will integrate its functionality into API library, but currently it is separate software.

'mm_open_port' connects to first found Marvelmind device, so if you connect two hedgehogs to USB, you can't select what of them will be connected.
But you can connect one hedge by normal USB cable and second hedge by 'power-only' USB cable, so only one hedge will be detected by Raspberry.
One hedgehog can send locations of all hedgehogs in the system, see setting 'Locations of other hedgehogs' in 'Interfaces' section in dashboard.

Post Reply