|
Post by AnthroHeart on Mar 24, 2024 21:39:08 GMT
Heres the latest version with many improvements. it no loonger maxes every Core at 100% i made improvements to how the threads sleep. It uses very little CPU now whilst maintaing the same packet sending rate. Your code is giving me all these errors below. It also said you needed to #include <mutex>
I compiled using: g++ -O3 -Wall -static main3.cpp -o main3.exe -lws2_32
main3.cpp:529:29: error: template argument 2 is invalid main3.cpp:537:37: error: request for member 'emplace_back' in 'BroadcastingThreads', which is of non-class type 'int' 537 | BroadcastingThreads.emplace_back(&broadcastThread, i); | ^~~~~~~~~~~~
C:\Repeater\WiFi>g++ -O3 -Wall -static main3.cpp -o main3.exe -lws2_32 main3.cpp: In function 'int main()': main3.cpp:528:10: error: 'jthread' is not a member of 'std' 528 | std::jthread timeKeeperThread(&timeKeeperThreadFunction); | ^~~~~~~ main3.cpp:528:10: note: 'std::jthread' is only available from C++20 onwards main3.cpp:529:10: error: 'jthread' is not a member of 'std' 529 | std::jthread keyInputThread(&keyInputThreadFunction); | ^~~~~~~ main3.cpp:529:10: note: 'std::jthread' is only available from C++20 onwards main3.cpp:530:22: error: 'jthread' is not a member of 'std' 530 | std::vector<std::jthread> BroadcastingThreads; | ^~~~~~~ main3.cpp:530:22: note: 'std::jthread' is only available from C++20 onwards main3.cpp:530:29: error: template argument 1 is invalid 530 | std::vector<std::jthread> BroadcastingThreads; | ^ main3.cpp:530:29: error: template argument 2 is invalid main3.cpp:538:37: error: request for member 'emplace_back' in 'BroadcastingThreads', which is of non-class type 'int' 538 | BroadcastingThreads.emplace_back(&broadcastThread, i);
|
|
|
Post by nathanmyersc on Mar 24, 2024 22:07:55 GMT
Heres the latest version with many improvements. it no loonger maxes every Core at 100% i made improvements to how the threads sleep. It uses very little CPU now whilst maintaing the same packet sending rate. Your code is giving me all these errors below. It also said you needed to #include <mutex>
I compiled using: g++ -O3 -Wall -static main3.cpp -o main3.exe -lws2_32
main3.cpp:529:29: error: template argument 2 is invalid main3.cpp:537:37: error: request for member 'emplace_back' in 'BroadcastingThreads', which is of non-class type 'int' 537 | BroadcastingThreads.emplace_back(&broadcastThread, i); | ^~~~~~~~~~~~
C:\Repeater\WiFi>g++ -O3 -Wall -static main3.cpp -o main3.exe -lws2_32 main3.cpp: In function 'int main()': main3.cpp:528:10: error: 'jthread' is not a member of 'std' 528 | std::jthread timeKeeperThread(&timeKeeperThreadFunction); | ^~~~~~~ main3.cpp:528:10: note: 'std::jthread' is only available from C++20 onwards main3.cpp:529:10: error: 'jthread' is not a member of 'std' 529 | std::jthread keyInputThread(&keyInputThreadFunction); | ^~~~~~~ main3.cpp:529:10: note: 'std::jthread' is only available from C++20 onwards main3.cpp:530:22: error: 'jthread' is not a member of 'std' 530 | std::vector<std::jthread> BroadcastingThreads; | ^~~~~~~ main3.cpp:530:22: note: 'std::jthread' is only available from C++20 onwards main3.cpp:530:29: error: template argument 1 is invalid 530 | std::vector<std::jthread> BroadcastingThreads; | ^ main3.cpp:530:29: error: template argument 2 is invalid main3.cpp:538:37: error: request for member 'emplace_back' in 'BroadcastingThreads', which is of non-class type 'int' 538 | BroadcastingThreads.emplace_back(&broadcastThread, i);
JThreads are a newer addition i think you need c++20 std for it idk. Are you compiler flagging the latest version of c++ that your compiler supports? Jthreads just automatically join after they leave their function. i was having trouble getting the broadcast threads to join after they were done switching them to j threads helped. need at least -std=c++20
|
|
|
Post by AnthroHeart on Mar 24, 2024 23:23:46 GMT
"JThreads are a newer addition i think you need c++20 std for it idk. Are you compiler flagging the latest version of c++ that your compiler supports? Jthreads just automatically join after they leave their function. i was having trouble getting the broadcast threads to join after they were done switching them to j threads helped. need at least -std=c++20"
Thanks, I was able to get it to work with the -std=c++20
Cool. I'm getting 8,819,580 bytes/sec
|
|
|
Post by AnthroHeart on Mar 30, 2024 10:42:54 GMT
I updated to v0.16 of the Intention Repeater WiFi Broadcaster. I used Nathan's code and updated to include command line flags. It also allows a file to be input, and will repeat on the contents of that.
Example:
Intention_Repeater_WiFi_v0.16.exe --compress y --hashing y --file intentions.txt --dur 00:01:00 --multithread y --mult y --remspaces y
Use Intention_Repeater_WiFi.exe --help for help.
|
|
|
Post by AnthroHeart on Apr 2, 2024 23:57:32 GMT
Would this be useful?
To transmit text bytes over WiFi at a rate of 8 MB/sec and simulate a frequency of 528 Hz, you can use a technique called "frequency modulation" (FM). FM is a method of encoding information onto a carrier wave by varying the frequency of the carrier wave in proportion to the amplitude of the information signal.
To simulate a frequency of 528 Hz using FM, you can modulate the carrier wave at a rate of 528 Hz. This means that the frequency of the carrier wave will vary between 528 Hz and a higher frequency, depending on the amplitude of the information signal.
To transmit text bytes over WiFi at a rate of 8 MB/sec, you can use a technique called "packetization". Packetization is the process of dividing a large data stream into smaller packets that can be transmitted over a network.
To transmit text bytes over WiFi at a rate of 8 MB/sec and simulate a frequency of 528 Hz, you can use the following steps:
1. Divide the text bytes into smaller packets. Each packet should contain a fixed number of bytes, such as 1024 bytes. 2. Calculate the frequency deviation for each packet. The frequency deviation is the difference between the carrier frequency and the modulated frequency. It is proportional to the amplitude of the information signal. 3. Modulate the carrier wave using FM. The carrier wave should be modulated at a rate of 528 Hz, with a frequency deviation that is proportional to the amplitude of the information signal. 4. Transmit the modulated carrier wave over WiFi. The modulated carrier wave should be transmitted at a rate of 8 MB/sec, which is equivalent to 1 MB/sec per packet. 5. At the receiver, demodulate the carrier wave using FM. The demodulated carrier wave should be filtered to remove any noise or interference. 6. Extract the information signal from the demodulated carrier wave. The information signal should be extracted by measuring the frequency deviation of the demodulated carrier wave.
By following these steps, you can transmit text bytes over WiFi at a rate of 8 MB/sec and simulate a frequency of 528 Hz using FM. This technique can be used to transmit text or other types of data over a wireless network, and it can be adapted to simulate other frequencies or modulation schemes as needed.
It is worth noting that the actual frequency of the transmitted signal will be higher than 528 Hz, due to the frequency deviation caused by the FM modulation. The actual frequency of the transmitted signal will depend on the amplitude of the information signal and the frequency deviation of the FM modulation.
In summary, to transmit text bytes over WiFi at a rate of 8 MB/sec and simulate a frequency of 528 Hz, you can use a technique called "frequency modulation" (FM). FM is a method of encoding information onto a carrier wave by varying the frequency of the carrier wave in proportion to the amplitude of the information signal. To transmit text bytes over WiFi at a rate of 8 MB/sec and simulate a frequency of 528 Hz using FM, you can divide the text bytes into smaller packets, calculate the frequency deviation for each packet, modulate the carrier wave using FM, transmit the modulated carrier wave over WiFi, demodulate the carrier wave using FM at the receiver, and extract the information signal from the demodulated carrier wave. The actual frequency of the transmitted signal will be higher than 528 Hz, due to the frequency deviation caused by the FM modulation.
|
|