Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Phantom_Phoenix on OpenCM 9.04...

  1. Re: Phantom_Phoenix on OpenCM 9.04...

    Ok I have the Serial3 on the Cm9.04 connected to an XBee and it's communicating with the other XBee connected to the PC. So I've got a wireless Serial Monitor working which is good. Not sure what the earlier problem was but it's working fine now.
    What I would now like to know if I can upload Arduino sketches wirelessly over the other pair of Xbees I have connected.
    Can I connect a usb cable to the USB port on the Cm9.04 and to the USB port on the XBee board and then upload programs over the XBee connection? Has anyone done this?

  2. #22

    Re: Phantom_Phoenix on OpenCM 9.04...

    My gut tells me, that there may not be any way to update over XBees... I could be wrong... But my gut tells me that their bootloader is setup to work only from USB. Not sure exactly how they trigger it....

    I have updated some microcontrollers like this that are connected to a robot that has another processor in the past wirelessly. That is I download the new hex file to the other processor (UP or RPI...) and then I use a command on that board to update the microcontroller.

    Sometimes I issue a command line directly to do this. Sometimes if I want it automated, I have a script running on the RPI/UP that sees that a file changes and automatically does it and for awhile I had hacked up the Arduino IDE to add an option for download, which I setup to RCP to the remote machine...

    Good luck

  3. Re: Phantom_Phoenix on OpenCM 9.04...

    Thanks for the suggestions. Doesn't sound easy though... I tried using a DFRobot Xbee USB adaptor with a Micro B to Micro B cable from that to the CM 9.04 USB but the upload won't work. I was hoping the Xbees could act as a USB extender but it doesn't look like it's a valid setup. I've heard that you may be able to use a BT 210 connected to the comms port on the 9.04 and do updates via Bluetooth. However that would tie up a UART that I need for the Commander and the serial monitor. So I might have to be content to continue wired programming via the USB.

  4. #24

    Re: Phantom_Phoenix on OpenCM 9.04...

    My guess (as well as the answer up on Robotis forum) is that there may be special code that runs on the system that does a couple of things toward reprogramming the board.

    First it needs to get the board into programming mode (some way to get to the bootloader).

    Then the bootloader needs some form of handshaking, between the download program and the hardware. Not exactly sure what all it does here. But possibly(probably) includes the software then waiting for a USB device to show up that has some certain information in it's USB descriptor (Like vendor ID, Product ID). Which of course your XBee adapter (USB to serial) will not have, so the code will likely timeout.

    If you got past that hurdle, then you might run into the next hurdle that the USB code may not use standard USB Serial protocol to download the code, maybe it uses RAW HID or some other... Again which the XBees don't know anything about.

    As I mentioned in other response I was looking at different approach and that was to have small linux box on the Robot to handle this and other things. Right now I have UP board on one Robot, but on others may be RPI 3, but for real simple stuff, maybe an RPI0w.

    There currently is still an issue running Arduino on Linux ARM for OpenCM boards: https://github.com/ROBOTIS-GIT/OpenCM9.04/issues/27

    But my guess is that they use: DFU_UTIL for downloading....
    So probably not hard to find/build a version of that utility for RPI, that could install the HEX file that you can send using WIFI to the RPI board and then use something like PuTTy window to reprogram your OpenCM board.

    Update: Actually not sure if they use dfu util or not, that picture was for another board shown in the wiki. But if they did you could on the RPI install the dfu util program by: sudo apt-get dfu-util

    So then would need to find sources for their uploader...
    Last edited by KurtEck; 11-07-2018 at 10:09 AM.

  5. Re: Phantom_Phoenix on OpenCM 9.04...

    Hi Kurt,
    Thanks for all that info. I've had some success using a RPI 3 with Arduino 1.8.7 installed and the patch supplied by OpusK in your post to Robotis. As he said it's not reliable but after a few tries I've successfully uploaded the Phoenix OpenCM code and it seems to work ok.
    So it's not ideal but usable. I've also heard its possible to upload code via bluetooth using a BT-210 adaptor. Have you tried this? I can't find any doco on it but my local robot supplier claims to have done it.
    Regards,
    John

  6. #26

    Re: Phantom_Phoenix on OpenCM 9.04...

    Good to hear that it is at least partially working. Currently I am not working on that part of the code so have not tried it.

    As for Bluetooth, I have not tried. But there might be some special bootloader mode that looks at some serial port... But again never tried.

    Right now trying to make a new version of the OpenCM code work reliably, with some upgrades.

    In particular I have SerialX.write(...) working where the writes don't block. That is currently on OpenCM, if you do something like:
    Serial2.println("Hello World");

    That call won't return until the complete string has been output over the serial port... My update makes it work like most other Arduino code bases and will put the data into a FIFO queue and return... With these changes need additional changes as for example make DXL buss work as you need to wait until the last part of a message is output before you change the IO pin controlling the direction of communications....

    Working pretty good. But now also working to migrate the latest version of the Dynamixel SDK (different project) into the SDK code included in the Arduino builds, and fixing a few issues.

  7. Re: Phantom_Phoenix on OpenCM 9.04...

    I've got a RPI Zero W mounted on the Hexapod now and I can VNC into and upload an Arduino Sketch reasonably reliably (see below) The code works fine on the Hexapod once loaded but it takes several mins to compile the first time. So I was wondering if it's valid to use the opencm9.04_ld command shown below to upload a hex file compiled on my Windows server and copied to the PI. You mentioned DFU-Util elsewhere but it looks like Robotis use opencm9.04_ld to do the upload? Does that make sense to you? I'm a bit wary about experimenting too much in case I overwrite the bootloader which I believe is in flash.
    I've also got the Pixy2 mounted and connected to the OpenCM 9.04 via the SPI1 interface and can see the object tracking data so making some progress there too.

    Sketch uses 103560 bytes (88%) of program storage space. Maximum is 116736 bytes.
    Global variables use 10728 bytes of dynamic memory.
    /home/pi/.arduino15/packages/OpenCM904/tools/opencm_tools/0.0.2/linux/opencm9.04_ld /dev/ttyACM0 57600 /tmp/arduino_build_601453/Phantom_Phoenix_OpenCM.ino.bin 1 opencm
    Enter bootloader
    stm32ld ver 1.0.1
    OpenCM Download Ver 1.0.4 2015.06.16
    Board Name : CM-904
    Ready To download
    Flash : 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
    Write Size : 103856


    Flash OK
    CheckSum : Success..
    Go Application

  8. #28

    Re: Phantom_Phoenix on OpenCM 9.04...

    Sounds good, yes they have their own download program. You should be able to build on pc copy down binary file and then use ...

    i mostly use use my own fork with develop branch, which has several updates including serial objects not blocking on writes, some memory reductions...

    info to on how to do this is up at https://community.robotsource.org/t/...equests/1474/7

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. OpenCM 9.04 iwdg
    By lpala in forum Arbotix, Microcontrollers, Arduino
    Replies: 0
    Last Post: 07-28-2017, 01:32 PM
  2. OpenCM 9.04, best way to beep?
    By jwatte in forum DYNAMIXEL & Robot Actuators
    Replies: 10
    Last Post: 04-09-2017, 01:11 PM
  3. Question(s) Is my OpenCM 9.04 dead? Or do are my AX-12A servos?
    By corot in forum DYNAMIXEL & Robot Actuators
    Replies: 4
    Last Post: 10-31-2016, 05:54 PM
  4. Acceleration implementation on OpenCM?
    By jomo in forum DYNAMIXEL & Robot Actuators
    Replies: 4
    Last Post: 05-19-2016, 08:18 AM
  5. OpenCM IDE (Ubuntu 14.04)
    By rasheinstein in forum Arbotix, Microcontrollers, Arduino
    Replies: 2
    Last Post: 04-12-2016, 01:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •