Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does d.RESET() actually do? #84

Closed
hichiaty opened this issue Oct 5, 2020 · 21 comments
Closed

What does d.RESET() actually do? #84

hichiaty opened this issue Oct 5, 2020 · 21 comments

Comments

@hichiaty
Copy link

hichiaty commented Oct 5, 2020

Hi,

I just bought a Yardstick one, it was detected fine and working but I kept recieving USB Timeout errors every other command, so I thought I'd try d.RESET(), now it's not detected at all! Have I just deleted the firmware?

Any help is appreciated.

Thanks

@hichiaty
Copy link
Author

hichiaty commented Oct 5, 2020

Ok, an unplug/replug and system reboot seems to have worked, but still wondering what it actually does?

@hichiaty
Copy link
Author

hichiaty commented Oct 5, 2020

Now it broke again, I am unable to even d.ping(), Ping Failed. Timeout waiting for USB response.
anyone know what is happening?

@atlas0fd00m
Copy link
Owner

can you attach a screenshot?

@hichiaty
Copy link
Author

hichiaty commented Oct 5, 2020

Ok, I am using a Raspberry pi zero w and ssh from my windows 10 machine.

image

@hichiaty
Copy link
Author

hichiaty commented Oct 5, 2020

This is my lsusb
image

@hichiaty
Copy link
Author

hichiaty commented Oct 5, 2020

after a reboot, it worked for about 5 seconds then stopped.
image

@hichiaty
Copy link
Author

hichiaty commented Oct 5, 2020

and this is my radio config.... when it works:

In [5]: print(d.reprRadioConfig())
== Hardware ==
Dongle:              YARDSTICKONE
Firmware rev:        0348
Compiler:            Not found! Update needed!
Bootloader:          CC-Bootloader

== Software ==
rflib rev:           603

== Frequency Configuration ==
Frequency:           433924804.687500 hz (0x121488)
Channel:             0
Intermediate freq:   281250 hz
Frequency Offset:    0 +/-
Est. Freq Offset:    245

== Modem Configuration ==
Modulation:          2FSK
DRate:               499511.718750 hz
ChanBW:              93750.000000 hz
DEVIATION:           20507.812500 hz
Sync Mode:           Carrier Detect
Min TX Preamble:     4 bytes
Chan Spacing:        199951.171875 hz
BSLimit:             No data rate offset compensation performed
DC Filter:           enabled
Manchester Encoding: disabled
Fwd Err Correct:     disabled

== Packet Configuration ==
Sync Word:           0xAAAA
Packet Length:       250
Length Config:       Fixed Packet Mode
Configured Address:  0x0
Preamble Quality Threshold: 4 * 0
Append Status:       No
Rcvd Packet Check:   No address check
Data Whitening:      off
Packet Format:       Normal mode
CRC:                 disabled

== AES Crypto Configuration ==
AES Mode:            CBC - Cipher Block Chaining
Crypt RF Input:      off
Crypt RF Output:     off

== Radio Test Signal Configuration ==
TEST2:               0x88
TEST1:               0x31
TEST0:               0x9
VCO_SEL_CAL_EN:      0x0

== Radio State ==
     MARCSTATE:      MARC_STATE_RX (d)
     DONGLE RESPONDING:  mode :d, last error# 1

== Client State ==
========================================================================================================================
     client thread cycles:      326/60
     client errored cycles:     0
     recv_queue:                (0 bytes) ''
     trash:                     (3 blobs) "[128, 142, (1601922839.886627, '')]"
     recv_mbox                  (2 keys)  "['0x42', '0xff']"
       app 0x42 (1 records)
             [0x7]    (0 frames)  "[]"

       app 0xff (5 records)
             [0x88]    (0 frames)  "[]"
             [0x80]    (0 frames)  "[]"
             [0x82]    (0 frames)  "[]"
             [0x86]    (0 frames)  "[]"
             [0x81]    (0 frames)  "[]"


In [6]:```

@atlas0fd00m
Copy link
Owner

can you do a dump from where it works to when it doesn't?

@hichiaty
Copy link
Author

hichiaty commented Oct 8, 2020

@atlas0fd00m I have now dual booted Ubuntu with my windows machine and it seems to work fine on there, I guess the issue was with the raspberry pi, as in issue #52. it's such a shame that it does not work with raspberry pi's, do you have any idea of why that is the case?

@atlas0fd00m
Copy link
Owner

no, i wish i knew. i don't spend enough time on Pi's to meaningfully troubleshoot, but i'm happy to work with someone who can put in the time and effort to track down what's going on.

@maaxxyy
Copy link

maaxxyy commented Nov 2, 2020

Hi atlas0fd00m, i'd be happy to help with YS1 and pi as i am having issues myself. See my other post, it used to work fine on pi 3, but since the pyside2 is unavailable, i've been having loads of issues.

@maaxxyy
Copy link

maaxxyy commented Nov 2, 2020 via email

Repository owner deleted a comment from ma77carpenter Nov 3, 2020
@atlas0fd00m
Copy link
Owner

thank you, @maaxxyy
that's a great set of tools :)
are you very familiar with using the cc debugger?
how about Wireshark for tracing USB?

do you have any understanding of USB?

you should be able to understand a bit of what the code is doing using Wireshark and watching the back-and-forth communication (although it can get a little overwhelming quickly).

can you reproduce the problem behavior?

@maaxxyy
Copy link

maaxxyy commented Nov 3, 2020 via email

@maaxxyy
Copy link

maaxxyy commented Nov 5, 2020 via email

@atlas0fd00m
Copy link
Owner

i'm not sure what the problem us. i don't have any problems on Ubuntu 20.04.
what does your system build look like?

@maaxxyy
Copy link

maaxxyy commented Nov 10, 2020 via email

@atlas0fd00m
Copy link
Owner

atlas@fangorn:~ $ virtualenv /tmp/foo
created virtual environment CPython3.8.5.final.0-64 in 183ms
  creator CPython3Posix(dest=/tmp/foo, clear=False, global=False)
  seeder FromAppData(download=False, pyparsing=latest, contextlib2=latest, setuptools=latest, six=latest, colorama=latest, pytoml=latest, retrying=latest, ipaddr=latest, wheel=latest, distro=latest, progress=latest, packaging=latest, html5lib=latest, urllib3=latest, appdirs=latest, pep517=latest, CacheControl=latest, lockfile=latest, requests=latest, pkg_resources=latest, msgpack=latest, webencodings=latest, chardet=latest, distlib=latest, pip=latest, certifi=latest, idna=latest, via=copy, app_data_dir=/home/atlas/.local/share/virtualenv/seed-app-data/v1.0.1.debian)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
(foo) atlas@fangorn:~ $ pip install --no-cache-dir pyside2
Collecting pyside2
  Downloading PySide2-5.15.1-5.15.1-cp35.cp36.cp37.cp38.cp39-abi3-manylinux1_x86_64.whl (165.8 MB)
     |████████████████████████████████| 165.8 MB 4.7 MB/s 
Requirement already satisfied: shiboken2==5.15.1 in /tmp/foo/lib/python3.8/site-packages (from pyside2) (5.15.1)
Installing collected packages: pyside2
Successfully installed pyside2-5.15.1

seems to work for me at this time. can you send me your output?
that was for python3. i didn't try it for python2

@maaxxyy
Copy link

maaxxyy commented Nov 12, 2020 via email

@maaxxyy
Copy link

maaxxyy commented Nov 13, 2020 via email

@atlas0fd00m
Copy link
Owner

@maaxxyy i'm closing this for now, let me know when you get to a better state to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants