Jump to content

dazer

Active Members
  • Posts

    6
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by dazer

  1. I've been trying to use my YS1 rootless, but I'm having difficulties.

    I've created my entry in /etc/udev/rules.d as described here: https://github.com/ecc1/rfcat/blob/master/etc/udev/rules.d/20-rfcat.rules

    name@host:~ $ cat /etc/udev/rules.d/20-rfcat.rules
    SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="605b" MODE:="0660" SYMLINK+="RFCAT%n", GROUP="dialout"
    

    This matches my YS1   

    name@host:~ $ lsusb
    Bus 001 Device 004: ID 1d50:605b OpenMoko, Inc.
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
    Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    But after running

    sudo udevadm control --r

    (and even after a reboot) I get this:
     

    name@host:~ $ rfcat -r
    Error in resetup():Exception('No Dongle Found.  Please insert a RFCAT dongle.',)
    Error in resetup():Exception('No Dongle Found.  Please insert a RFCAT dongle.',)
    Error in resetup():Exception('No Dongle Found.  Please insert a RFCAT dongle.',)
    ^CTraceback (most recent call last):
      File "/usr/local/bin/rfcat", line 56, in <module>
        interactive(ifo.index, DongleClass=RfCat, intro=intro)
      File "/usr/local/lib/python2.7/dist-packages/rflib/__init__.py", line 190, in interactive
        d = DongleClass(idx=idx)
      File "/usr/local/lib/python2.7/dist-packages/rflib/chipcon_nic.py", line 295, in __init__
        USBDongle.__init__(self, idx, debug, copyDongle, RfMode)
      File "/usr/local/lib/python2.7/dist-packages/rflib/chipcon_usb.py", line 176, in __init__
        self.resetup(copyDongle=copyDongle)
      File "/usr/local/lib/python2.7/dist-packages/rflib/chipcon_usb.py", line 302, in resetup
        time.sleep(1)
    KeyboardInterrupt

    but immediately after that, it still works with the sudo

    name@host:~ $ sudo rfcat -r
    No module named enum
    'RfCat, the greatest thing since Frequency Hopping!'
    
    Research Mode: enjoy the raw power of rflib
    
    currently your environment has an object called "d" for dongle.  this is how
    you interact with the rfcat dongle:
        >>> d.ping()
        >>> d.setFreq(433000000)
        >>> d.setMdmModulation(MOD_ASK_OOK)
        >>> d.makePktFLEN(250)
        >>> d.RFxmit("HALLO")
        >>> d.RFrecv()
        >>> print d.reprRadioConfig()

    Any ideas what I'm doing wrong?

    Many thanks!

  2. So, building off what you wrote, I've got:

    d****@***pi:~ $ cat top2.py
    #!/usr/bin/python
    from rflib import *

    d = RfCat()

    d.setFreq(303808260)
    d.setMdmModulation(MOD_ASK_OOK)
    d.setMdmDRate(3600)
    d.RFxmit("\xb2\xd9\x24\xb2\x58\x00\x00\x00\x00\x00" *10)

    However, when I try to run it, I get:

    d****@***pi:~ $ python top2.py
    Error in resetup():USBError('error sending control message: Operation not permitted',)
    Error in resetup():USBError('error sending control message: Operation not permitted',)
    Error in resetup():USBError('error sending control message: Operation not permitted',)
    Error in resetup():USBError('error sending control message: Operation not permitted',)

     

    If, however, I go into RfCat and paste those same commands, my light turns on.

    HALP, please!

     

  3. I'm very green to this style of programming, but I could use some help please.

    I picked up an RTL-SDR dongle and a YardstickOne this week.  I've figured out the control codes for my 20+ year-old ceiling fan and its lights and can manually transmit them via the YS1.vs Fan 

    My problem now is that while I can paste commands into rfcat running on a centrally located RPI3, I would like to be able to run those at will. Fan Hi, vs Fan Off, vs Up Light On, etc.

    Those sets of rfcat commands work just fine when *I* put them in.

    Can anyone please point me to a way to a) lump my rfcat commands into something I can call collectively, and b) trigger them from outside.

    My ultimate goal is to have Amazon Alexa call these scripts, but I need to learn more first.

    Thanks for any help you can provide or point me to!

     

×
×
  • Create New...