User Tools

Site Tools


packet:bpq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
packet:bpq [2023/11/15 12:28] – Added link to TALK guide on QtTermTCP page m0odzpacket:bpq [2024/04/30 15:24] (current) g7taj
Line 76: Line 76:
 //Todo: Gotta Arduino this so an LED gets lit// //Todo: Gotta Arduino this so an LED gets lit//
  
-Ends+ 
 +===== BPQ on Windows ===== 
 + 
 +With thanks to M0NVK 
 + 
 +=== Information Sources === 
 +A good source of info is here:- 
 +https://www.cantab.net/users/john.wiseman/Documents/BPQ32.html 
 +Note this is hard going and take a significant amount of time to get your head around it 
 + 
 +=== BPQ32 download === 
 +BPQ32 can be downloaded from here:- 
 +https://www.cantab.net/users/john.wiseman/Documents/Downloads.html 
 + 
 +=== BPQ ConfigGen === 
 + 
 +Starting out from fresh 
 +The easiest way to start, due to the complexity, of the setup of BPQ is to use BPQConfigGen which can be found here:- 
 +https://www.cantab.net/users/john.wiseman/Documents/BPQConfigGen.html 
 +For windows use 32bit for Win, but there is also Linux and Pi versions. 
 +This will help you through the steps. 
 + 
 +BPQConfigGen only allows you to create or edit the basic Node identification info and your ports and application definitions  
 + 
 +After downloading and extracting, open BPQConfigGen. 
 +You will be presented with the below screen: 
 + 
 + 
 +{{:packet:bpq32_configgen.jpg?600|}} 
 + 
 +  - Enter your call sign 
 +  - Enter the node alias  - something like three letters for location and the end three letters of your call sign. Example LONABC for London G3ABC 
 +  - Enter your maidenhead locator 
 +  - Enter your Sysop UserName (will be used to login in to your node etc) 
 +  - and your preferred password 
 +  - Click web management (will be used to access your node) 
 +  - Enable BBS and CHAT – if you want local BBS and or CHAT for other to access on your node (leave blank if not sure at this stage) 
 +  - Add your ports*....advise a telnet port (will be auto if clicked BBS and Chat) 
 +  - Add applications** – ie Chat and BBS 
 + 
 + 
 +Once complete Save the config. 
 +The config is saved in the directory you extracted BPQconfigGen to. 
 +This needs to be moved to the main working directory of BPQ32. 
 +Search for BPQ32.cfg and replace that with your file. Call it BPQ32.cfg. 
 + 
 +=== Add Ports === 
 +I have shown Kiss TNC ports and that works for most radios, but other are there like UZ7HO Soundmodem will be needed if using sound cards to drive the radio etc. 
 +select the ones your are going to be using 
 + 
 +=== Add Applications === 
 +Only do this if you are running Chat and or BBS....you will need you call sign and Quality. Suggest  
 +adding you normal call sign and 255 to get you going 
 + 
 +You should now have a working config. 
 +Connect everything to the computer and open BPQ console from the windows button. 
 + 
 +The web interface is here:- 
 +http://192.168.1.97:8080    type this in internet explorer or whatever you are using 
 +your IP address (found from command prompt and typing ipconfig=  IPv4 Address.)  
 +the  HTTPPORT=8080 found in your Port 1 telnet  
 + 
 +===== REST API ===== 
 + 
 +BPQ has a simple and evolving HTTP REST API. 
 +It is used though the HTTPPORT (in this example is port 9122) 
 + 
 +endpoints: (note older versions were prefixed with 'get' (except request_token) 
 + 
 +<code> 
 +/api/request_token 
 +/api/ports 
 +/api/nodes 
 +/api/users 
 +/api/info 
 +/api/links 
 +/api/mheardport/<port#> 
 +</code> 
 + 
 +Requested like so: 
 +<code>curl 127.0.0.1:9122/api/request_token</code> 
 + 
 +Output: 
 +<code>{"access_token":"OSTWFHSGAPKZWMZORFEFWOFIHMOZUMJK", "expires_in":3600, "scope":"create"}</code> 
 + 
 +Example of MH for Port 1: ( >ver 6.0.24.33 ) 
 +<code>curl 127.0.0.1:9122/api/mheardport?1 -H "Authorization: Bearer OSTWFHSGAPKZWMZORFEFWOFIHMOZUMJK"</code> 
 + 
 +Output: 
 +<code>{"callSign": "G7TAJ-15", "port": "1", "packets": 10, "lastHeard": "2024-3-6 17:14:01"  }, 
 +{"callSign": "G7TAJ", "port": "1", "packets": 5, "lastHeard": "2024-3-3 15:46:07"  }</code> 
 + 
 + 
 +===== Events ===== 
 +BPQ can fire an executable on certain events. 
 +  * new message 
 +  * message read 
 +  * user joining chat 
 + 
 +In bpq32.cfg 
 +<code>EnableEvents=1</code> 
 + 
 +For mail events: 
 + 
 +On the web interface, MailMgmt/Configuration enable: 
 +<code>Enable Event Reporting</code> 
 + 
 +This will call the following in the bpq directory (For Windows add .exe to the filename) 
 + 
 +<code>MailNewMsg</code> 
 + 
 +  
 +It will run the following on a message being read: 
 +<code>MailMsgRead</code> 
 + 
 + 
 +The format of the output is as a string of arguments to the program: 
 + 
 +<code>51260 P N 0 G7TAJ G7TAJ 240408 test</code> 
 + 
 + 
 +Chat events: 
 +This needs to be configured on the chat Web interface page. 
 + 
 +<code>ChatNewUser</code> 
 + 
 +Arguments: 
 + 
 +'' 
 +240408-G7TAJ : Steve %%*%%%%*%%%%*%% Joined Chat, Topic General 
 +'' 
 + 
 + 
 + 
 +===== TX/RX cycle ===== 
 +The table below is created from information found at https://tarpn.net/t/faq/faq_csma.html where a lot more detail and good information is available. This table just covers one transmission and the response and the values linbpq pulls from the port config file to determine how long each step should be. 
 + 
 +^ station ^ option   ^ description                                    ^ 
 +| tx      | N/A      | I become ready to transmit                      | 
 +| tx      | slottime | I listen for other tranmitters to make sure the air is clear                                  | 
 +| tx      | persist  | I come up with a random number.                         
 +   >persist:listen again               
 +   <=persist: transmit       
 +|                          
 +| tx      | TX delay | I press the PTT so both ends of the link prepare for the transmission                          | 
 +| tx      | paclen      | I send this many symbols                                    | 
 +| RX      | resptime | I wait for the other station to switch to RX before sending the ACK                               | 
 +| RX      | slottime | Same as above                                   | 
 +| RX      | persist  | Same as above                                   | 
 +| RX      | TX delay | Same as above                                   | 
 +| RX      | N/A      | I send an ACK message                           | 
 +| tx      | frack    | How long will I wait for an ACK before retry?   | 
 + 
 +The goal here is to avoid two stations transmitting into the same space at once, thereby wrecking both transmissions. Some level of collision is unavoidable but with good settings for the local area they can be reduced to a minimum. 5% retry rates is a good outcome. 
 + 
 +There are two fundamental problems: 
 + 
 +One is that once a station has decided to transmit it takes a finite amount of time to actually get on the air between programs running, pressing the PTT and actually transmitting once the PTT has been pressed. Slottime should be about as long as that takes for the slowest radio in the network so that if a station is listening for others on the air, it waits long enough for a station to decide to transmit and actually transmit. 
 + 
 +The other is that frequently some nodes cannot see all the other nodes in the network so no matter how long they listen for they cannot hear particular nodes transmitting so will send data to stations that are already receiving and potentially collide.
  
packet/bpq.1700051314.txt.gz · Last modified: 2023/11/15 12:28 by m0odz