leetronics / infnoise

The world's easiest TRNG to get right
Creative Commons Zero v1.0 Universal
122 stars 25 forks source link

Error: USB read failed #35

Open TrustExecutor opened 5 months ago

TrustExecutor commented 5 months ago

After ~10 or so generated entropy "chunks" I get the USB read failed. Is this a common problem or something that can affect the entropy pool? When I execute the command a second time it seems to be up and running (as the systemctl status suggest), but generates an error again after some time.

root@host:~# infnoise --debug --no-output
Generated 1048576 bits.  OK to use data.  Estimated entropy per bit: 0.877488, estimated K: 1.837174
num1s:50.563373%, even misfires:0.111168%, odd misfires:0.160576%
Generated 2097152 bits.  OK to use data.  Estimated entropy per bit: 0.875540, estimated K: 1.834695
num1s:50.465626%, even misfires:0.096236%, odd misfires:0.176725%
Generated 3145728 bits.  OK to use data.  Estimated entropy per bit: 0.874526, estimated K: 1.833406
num1s:50.508445%, even misfires:0.094330%, odd misfires:0.165837%
Generated 4194304 bits.  OK to use data.  Estimated entropy per bit: 0.875321, estimated K: 1.834417
num1s:50.586397%, even misfires:0.102284%, odd misfires:0.152080%
Generated 5242880 bits.  OK to use data.  Estimated entropy per bit: 0.875370, estimated K: 1.834479
num1s:50.569753%, even misfires:0.100282%, odd misfires:0.156254%
Generated 6291456 bits.  OK to use data.  Estimated entropy per bit: 0.875522, estimated K: 1.834672
num1s:50.529542%, even misfires:0.112720%, odd misfires:0.151589%
Generated 7340032 bits.  OK to use data.  Estimated entropy per bit: 0.874715, estimated K: 1.833645
num1s:50.593377%, even misfires:0.128267%, odd misfires:0.143259%
Generated 8388608 bits.  OK to use data.  Estimated entropy per bit: 0.875771, estimated K: 1.834988
num1s:50.497163%, even misfires:0.137012%, odd misfires:0.153046%
Generated 9437184 bits.  OK to use data.  Estimated entropy per bit: 0.875672, estimated K: 1.834863
num1s:50.494457%, even misfires:0.110128%, odd misfires:0.167135%
Generated 10485760 bits.  OK to use data.  Estimated entropy per bit: 0.875675, estimated K: 1.834866
num1s:50.545596%, even misfires:0.107083%, odd misfires:0.168273%
Generated 11534336 bits.  OK to use data.  Estimated entropy per bit: 0.875495, estimated K: 1.834637
num1s:50.426698%, even misfires:0.119628%, odd misfires:0.176682%
Error: USB read failed
root@host:~# systemctl status infnoise.service 
● infnoise.service - Wayward Geek InfNoise TRNG driver
     Loaded: loaded (/lib/systemd/system/infnoise.service; enabled; preset: enabled)
     Active: active (running) since Sun 2024-02-11 20:04:51 CET; 5min ago
       Docs: man:infnoise.service(8)
    Process: 494226 ExecStart=/usr/sbin/infnoise --dev-random --daemon --pidfile /var/run/infnoise.pid (code=exited, status=0/SUCCESS)
   Main PID: 494227 (infnoise)
      Tasks: 1 (limit: 9302)
     Memory: 596.0K
        CPU: 59ms
     CGroup: /system.slice/infnoise.service
             └─494227 /usr/sbin/infnoise --dev-random --daemon --pidfile /var/run/infnoise.pid

Feb 11 20:04:51 host systemd[1]: Starting infnoise.service - Wayward Geek InfNoise TRNG driver...
Feb 11 20:04:51 host systemd[1]: Started infnoise.service - Wayward Geek InfNoise TRNG driver.

Host is Proxmox 8.1 based on Debian 12. Infnoise installed from Debian bookworm repository.

wagnercmelo commented 4 months ago

I am seeing the same errors on a Raspberry Pi 4 running Ubuntu 22.04. Was wondering the exact same thing. @TrustExecutor did you find any additional clue since opening this issue?

NSHenry commented 1 month ago

I'm also seeing the same sort of error running Ubuntu 24.04 on a Raspberry Pi 5. I purchased the TRNG last week.

TrustExecutor commented 1 month ago

I am seeing the same errors on a Raspberry Pi 4 running Ubuntu 22.04. Was wondering the exact same thing. @TrustExecutor did you find any additional clue since opening this issue?

No I haven't found any clues. Still getting the USB read failures.

I'm also seeing the same sort of error running Ubuntu 24.04 on a Raspberry Pi 5. I purchased the TRNG last week.

I ordered from leetronics a month ago but haven't received anything. When did you order yours?

NSHenry commented 1 month ago

@TrustExecutor @wagnercmelo

I think I figured it out! The ReadMe in the software subdirectory says "To run the infnoise application manually, make sure the systemd service is stopped. Otherwise it will restart the daemon and disrupt you."

Once I stopped the service with systemctl stop infnoise I was able to run infnoise --debug --no-output without any problems. I only let it run for a minute or so.

I ordered from leetronics a month ago but haven't received anything. When did you order yours?

I bought mine from Crowd Supply, and I believe Mouser Electronics fulfilled the order based on tracking information.