element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Connect2Pi Dongle - Python & Debian Commands?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 2 replies
  • Subscribers 675 subscribers
  • Views 325 views
  • Users 0 members are here
  • lprs;
  • connect2pi;
  • python
  • er_cmd;
  • raspberry_pi
  • debian;
  • linux;
Related

Connect2Pi Dongle - Python & Debian Commands?

Former Member
Former Member over 12 years ago

I acquired a Connect2Pi Dongle for use with my Raspberry Pi.

 

I discovered the ER Companion Software for the Dongle is not Linux/Debian compatible.

 

I've been advised by LPRS who supply the Dongle that I should be able to issue Commands to check the default setup of the Dongle and reconfigure Channels it uses.

 

I've been directed to the following Commands: ER_CMD#C? (query Channels), ER_CMD#P? (query Ports) ER_CMD#B? (query Bandwidth). Similarly ER_CMD#C9 would set the Channel to CH9... and so on.

 

I'm developing a little Python Program to monitor the Dongle for Message Data from other Wireless Nodes. Program functionality is not a problem but trying to issue Commands from within the Python Program to execute any of

the above Commands is proving more difficult that LPRS suggested it would be... possibly being a complete Novice when it comes to Linux/Debian abd Python might not be helping.

 

I have the following embedded in my Python Program:

 

import commands

def foundChannels():

     return commands.getoutput("sudo ER_CMD#C?")

print "Dongle Channels found:"

for name in foundChannels(): print name

 

I get the following Output:

 

Dongle Channels found:

s

h

:

 

l

:

 

s

u

d

o

:

 

n

o

t

 

f

o

u

n

d

 

(sh: l: sudo: not found)

This suggests to me that the ER_CMD commands are not available to my Linux/Debian installation on my Raspberry Pi.

I was under the impression from LPRS that once the Dongle was installed and their Driver loaded, their Commands would be available ?

 

Any ideas anybody ? I really need to be able to inspect the installed Dongles settings asap and to at least change the Channel to something I want to use in order to monitor Signals from other Nodes ?

 

Regards - Andy

  • Sign in to reply
  • Cancel
Parents
  • swmcdonnell
    swmcdonnell over 12 years ago

    Hi Andy,

     

    1) Where are the commands located? A command is just an executable file or script that's in the default search path. You should have installed something that put a file named ER_CMD somewhere on your PI. That's the "command." If it's in the current directory, prefix it with ./ or the full path, for example,

     

    sudo ./ER_CMD

    or

    sudo /var/www/myprog/ER_CMD

     

    If the file isn't in your path, the command won't be found.

     

    2) You're only getting "sh:" because there's an error. When the command runs correctly, you won't get that anymore.

     

    3) "sudo" is what you prefix a command by in Linux to execute it as the root user with full privileges (provided it's installed and you've configured the user to be able to sudo).. When the command exeutes correctly you won't get that anymore either.

     

    4) You don't need Python to test this out. All your Python script is doing is shelling out to the operating system, running the command you provided and then passing the output back to your Python script. Just type whatever you're going to pass through Python on the command line until you get it right. You'll see the output on the screen that will be passed back to your Python script.

     

    I hope this helped.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to swmcdonnell

    Thanks for your feedback. I suspect the issue is that the ER_CMDs are not actually available at all, as the Vendor advised they would/should be.

     

    They definitely don't work from the Command Line.

     

    It's embedded in some Python currently because of what I want that Program to do overall, i.e.

        

         Check the config of the Connect2Pi Dongle and report/print it out to the Console

         Amend the config of the Connect2Pi Dongle and report/print it out to the Console

         Enter main Program to read Message Data from the Connect2Pi and process it "in whatever way"

     

    So, the initial steps aren't working, although I think a "Write" to the Dongle to change the Channel is possibly working but the ER_CMD to check if that's true fails ?!!!

     

    I have thought I should perhaps rely on some other native Linux/Debian Command to perhaps inspect the Device's config from the dev/ttyUSB0 perspective... this is how the RPi sees the Dongle. I've found no help at all anywhere for what sort of Command to issue to find the Config for ttyUSB0

     

    Andy

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 12 years ago in reply to swmcdonnell

    Thanks for your feedback. I suspect the issue is that the ER_CMDs are not actually available at all, as the Vendor advised they would/should be.

     

    They definitely don't work from the Command Line.

     

    It's embedded in some Python currently because of what I want that Program to do overall, i.e.

        

         Check the config of the Connect2Pi Dongle and report/print it out to the Console

         Amend the config of the Connect2Pi Dongle and report/print it out to the Console

         Enter main Program to read Message Data from the Connect2Pi and process it "in whatever way"

     

    So, the initial steps aren't working, although I think a "Write" to the Dongle to change the Channel is possibly working but the ER_CMD to check if that's true fails ?!!!

     

    I have thought I should perhaps rely on some other native Linux/Debian Command to perhaps inspect the Device's config from the dev/ttyUSB0 perspective... this is how the RPi sees the Dongle. I've found no help at all anywhere for what sort of Command to issue to find the Config for ttyUSB0

     

    Andy

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube