Sending commands via serial

M1 Support Forum Sending commands via serial

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4411
    M1 Installer

    I want to send a command via serial port so I can turn an OUTPUT to ON or OFF I tried using different serial software and I am able to connect to my M1 Gold. I can see updates being displayed on the screen. However, I tried sending a command such as turning OFF output 9, but looks like my M1 is not receiving it. Is there something I need to enable on the M1 so that I’ll be able send via serial connection?

    Thanks, Neil

    #4533
    ELK Tech Support

    Also, do I press Enter key to send the command or do I also include (CR-LF)? Or do I use the hex string 0x0D at the end of the command?

    #4534
    M1 Installer

    I got it working by adding \r\n at the end but it’s intermittent. I used this command to turn on output 9 0Ecn0090000000D1\r\n from the 2009 serial documentation, the checksum was D8. Someone from a forum told me to use D1 Now, I’m trying to turn off output 9 but this command fails 09cf00900DC\r\n

    #4536
    M1 Installer

    I got it working. I learned that checksum needs to be calculated. 🙂 I wrote a function in Javascript that will calculate checksum of the string we are planning to send. I’m sharing the code so people can use it too https://goo.gl/UKIiZs

    #4537
    ELK Tech Support

    You can also use the M1SDK Software Developers Tool to calculate the Check Sum. The Software Developers Tool is available under the Support Tools page.

    #4538
    M1 Installer

    And for the Python folk: http://pastebin.com/vuT8JsCj

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Scroll to Top