Servers by jDrones

AP_Periph 1.0.0 stable released

I’ve just released the first stable release of AP_Periph, version 1.0.0. AP_Periph is a framework for creating UAVCAN peripheral firmwares. I started it as a project as I wanted to make the use of UAVCAN in ArduPilot much more widespread, and the difficulty of creating a high quality UAVCAN firmware for a new device was holding back vendors from creating new devices.
The key idea of AP_Periph is that it leverages the existing technology in ArduPilot. Specifically, it uses the existing ArduPilot sensor libraries which immediately brings a rich set of well tested sensor drivers to the project. It also uses the ArduPilot HAL (Hardware Abstraction Layer), allowing for new peripheral designs to be specified using the hwdef.dat system that has been so successful for ArduPilot over the last couple of years.
You can read more about AP_Periph here:

The key information for the 1.0.0 release is:

  • supports GPS (including RTK), baro, magnetometer, rangefinder, airspeed, ADSB, LEDs, safety switch and buzzers
  • supports 4 different MCUs, with more added easily via hwdef.dat
  • dynamic or static CAN node allocation
  • firmware upload
  • automatically generated bootloader
  • parameter storage in flash
  • easy bootloader update
  • high resiliance features using watchdog, CRC and board checks
  • firmware update via MissionPlanner or uavcan-gui-tool

AP_Periph is targeted both at vendors who are looking to create a UAVCAN peripheral, and at end users who want to buy one of the convenient CAN nodes from mRo or jDrones and use those nodes to convert their existing I2C or serial periphals into UAVCAN peripherals.
The mRo nodes and jDrones gen.nodes already ship with the AP_Periph bootloader, so loading one of the prebuilt firmwares off is easy. There are prebuilt firmwares for GPS, ADSB, RangeFinder and Airspeed.
I hope that AP_Periph will help to bring UAVCAN to a lot more users.
Finally, I’d like to thank @olliw42 for his great work on UC4H which led to the creation of the generic CAN nodes. While AP_Periph doesn’t share any code with UC4H, the concept of a generic CAN node that can be converted into many types of UAVCAN peripherals is brilliant and was really the inspiration for this project.
Cheers, Tridge


I’m also in the process of adding support for moving baseline RTK to AP_Periph. This will allow you to use two UAVCAN GPS modules to provide yaw for the vehicle without a compass. This will be useful for vehicles that operate in difficult magnetic environments.


jDrones Gen.Nodes are also shipped with AP_Periph bootloader and Gen.Nodes can be used for GPS, Serial, Servos etc operations.

Thanks Jani! I’ve added that to the article

1 Like

Which GPS chips do support this then? I guess we can not use the normal M8N for that, or?

You can the M8N, as well as lots of other GPS modules. You won’t get RTK support with a M8N of course, as it can’t do that, but it will give you a UAVCAN GPS.

That question was related to the “heading from GPS” :slight_smile:

ahh, sorry. That will work only for u-blox F9 GPS modules, or NMEA GPS modules that can provide yaw.


Have used a few of these but seem to have some trouble when trying to update to a different firmware seems as though MP won’t open the slcan.

Also note the Mrobotics has just released the above node and it is available for preorder and should ship within a week. also $5 from the purchase of these boards will be donated to ardupilot which is pretty cool.

great, the f303 is a nice improvement, and you should get one if you can.

@hwurzburg is working on documenting how to use the SLCAN mode in MissionPlanner for this. It is a bit tricky.

1 Like

I also sent a PM to help him. I have helped a few others that had old bootloaders and pre-stable firmware. Anyone else with CANNode issues feel free to reach out to me.

1 Like

Already ordered a couple!!! Love these little can nodes!

where did you folks find this fella he has been kicking a** on the wiki and really whipping it into shape thanks @hwurzburg appreciate the work you are putting into the wiki, its really showing!!!

@pkocmoud thanks for reaching out really appreciate that immensely!!! Hopefully we can chat and you can help me then I hopefully can help others with their issues. These can nodes have awesome potential and are really quite nice!!!


Thanks…it appreciated

Had a very nice hour long chat with @pkocmoud tonight from mrobotics and he graciously helped me learn more about these can nodes and updating firmware as well as the bootloader. I didn’t have much luck using MP but did when using the UAVCAN GUI. One thing we noticed on these older version of the f103 can nodes was without something plugged into the input side such as a gps, that mission planner would not recognize the can node, but once you plugged in a gps you could get the node to show up in the UAVCAN node 1 setting, and had the ability to play with parameters in MP. Because this can node was one of the earlier version of the f103 I was unable to update the firmware initially using MP because it was on software version 1.0.0, but after getting the bootloader and the software version updated I now have the ability to update firmware via MP. Here are a few screenshots of the UAVCAN gui and settings we had used to make it work, although its kind of finicky just like MP is. can2
This will be the same com port you connect to whatever flight controller you use, the rest are default.

At the top of the UAVCAN GUI you will see local node ID: with 127 grayed out make sure you uncheck the check next to it before you start so it looks like the way the picture is. In the online nodes you can double click the node and it will open the node properties like in the picture to the right top. Next you can either upload firmware using the upload firmware button and you can find the ap_periph firmware here (note when downloading firmware select the bin file not the apj or the other only file needed is the .bin) this will allow you to update firmware. Next to update the bootloader you need to fetch all which will bring up the parameters for the can node under param 3 (flash_bootloader) double click and you will get the window at the bottom right. Change the value from 0 to 1 and hit send. you can now exit out or change other params as needed. to confirm you flashed the bootloader look at the log messages in the photo to the left and it shows flash bootloader OK. Again I’d like to thank @pkocmoud for his help! Connection on can is still kind of finicky so be patient and try many different ways. We managed to get UAVCAN GUI to work in a weird way by finding the node in MP then getting the UAVCAN GUI pulled up to where we could click connect then disconnecting from MP and clicking connect on UAVCAN GUI. This is one of the first CAN nodes they released so the new ones should be much better as they will hopefully have newer firmware on them. I can confirm that many different gps units have worked.

Google Photos
One connection 2 GPS units and 1 Rangefinder (still having a bit of trouble with the rangefinder node haven’t had any luck getting a lidar lite v2 or v3HP to work, going to try a tf mini and plus see how they work). These little nodes are quite awesome, will continue to work through the issues with the rangefinder but any gps unit I have connected has worked. @tridge would the RTK support also work on emlid products (ERB) or is it specifically tied to the new F9P unit mrobotics has come out with? I had the nodes connected to uavcan and never saw any rangefinder messages coming out of the bus monitor only gps fix msgs, and can confirm these range finders work on the I2C bus when connected via that but not on the I2C bus of the can node. I also have major issues getting more than one range finder to work even when changing the address so each have their own.

You can do RTK with any RTK capable u-blox. The new moving baseline support will need a F9P however.

that is odd. Did you set the RNFND_TYPE via the CAN parameters? Do you happen to own a logic analyser so you can look at the I2C traffic?

do you mean two rangefinders on one CAN node, or two CAN nodes? We don’t support two on one node yet

yes parameters are set to correct range finder (21 for v3HP and 3 or 15 can’t remember which my old lidar lite was) in can node param’s, honestly haven’t had much luck with any range finder using the new ap_rangefinder f103 can node bin file. I don’t have a LA at the moment but could after the holiday break.

no I am using two different nodes with each node set to a different node ID (115, and 117) never get any range finder to work at all (Lidar Lite V3HP or V2) I have also never gotten two of them to work on the regualr I2C bus even when changing the address for each so they are different. I have only ever gotten 1 range finder to work at a time never more than one on I2C (different topic different time!) Currently I get zero readings from any of my range finders using the ap_rangefinder file here, parameters are set correctly on the can node to what range finder is connected but never get any sonar data in MP nor does the UAVCAN gui bus monitor show anything connected or any range finder msgs.

Let me make a video that shows the issues, latest beta of MP has helped in connecting to these can nodes more reliably but still hit or miss. I prefer using the UAVCAN GUI when I can get it to connect.

Hey @tridge
I was thinking to use F0 processor with lower flash for AP_Periph for fixed sensors with less than 5 sensor type count. I was thinking to remove all the sensor drivers which are not required and reduce flash requirement for F0. what do you suggest? And I also want to know insights on removing code and consequences of it.
Thank you.

you won’t fit the AP_HAL into a F0. I deliberately chose to use a larger flash footprint so we can share common code with the rest of ArduPilot. We’d lose that with the F0

1 Like


I have been working with these nodes a bit more trying various settings without much luck when trying any range finder or my emlid reack RTK gps set to ERB. You had asked for some logic analyzer outputs from various things before, do you recommend a fairly nice one for under 80 dollars USD, then I won’t have to drag all this stuff to campus to check them. I will say that MP UAVCAN is getting much better thanks @Michael_Oborne for the work you and whoever else have put into that!! I have attached a screen shot of the inspector under the UAVCAN section Node 119 is just some random cheap M8N
I had laying around and it connects and works properly. Node 124 is the emlid reach rtk gps that within node 124 I have set the gps_type to 13 (ERB) I can confirm the gps is functioning properly and the out put on the UART is set to ERB 38400 just like it needs to be when using serial connection, and have confirmed that it does connect via a normal serial port and configures properly and shows the proper fix status, I have also tried ERB @57600,115200, as well as NEMA output at 38400, 57600,115200 making sure the correct CAN node is set to either 5 (NEMA) or 13 (ERB) depending on the output chosen. I cannot for the life of me get it working on the can node. I have managed to (soon) get my hands on one of mrobotics new F9P gps units should be here in a couple weeks that I can test the RTK gps with. I got a wild hair and switched the CAN nodes to make sure they both at least functioned with the normal GPS and it does both 119 and 124 work with the M8N ( i think thats what it is)

1 Like
Servers by jDrones