Posts

Showing posts with the label Serial

Tweaks for the Bearmock with USB serial adapter and USB null modem adapter

Image
https://techcoderadio.blogspot.com/2025/04/bearmock-for-python-3.html .. and generally for anykind of serial based dev emulator written in Python. Python 3.14/.15 with JIT tends to work a bit better than older versions $env:PYTHON_JIT=1 USB serial adapter: USB selective suspend off.   USB null modem adapter: try different Latency Timer values.  

More ActiveGPS inspection with Python/Wireshark/Ghidra

Image
Python, Wireshark, ActiveGPS.exe, Ghidra My ActiveGPS device, purchased maybe 15 years ago (no more produced)  Hardware used: https://techcoderadio.blogspot.com/2025/04/some-activegps-pymocking.html Enhanced version of the PyMock for the ActiveGPS (due to hw setup many retries required when running with sleep or flush .... maybe com0com would work better?). B = b'0303 ... firmware version, 3.6 is the latest version import serial import time A = b'00' B = b'03036F72AD18F8BF4B07DA01120B3215AF00' C = b'00000' D = b'00' E = b'00' J = [      b'18F8BF4B07DA01120B3215AFFFFFFFFF',      b'409CA961000050124EF175426C73AE41',      b'14060D0907DB5B58421D474A4A00FFFF',      b'FFFFFFF133FB33FB33FA33FA33FA33FA',      b'33FA33FA33FA33FA33FA33FA33FA33FA',      b'33FA33FFFFFFFFFFFFFFFFFFFFFFFFFF',      b'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',      b'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000'...

Some ActiveGPS PyMocking

Image
23.1.2025 Some ActiveGPS PyMocking Far from complete. By using USB to serial converter + USB serial null modem adapter it is possbile to mimick more or less serial controlled devices without SW virtual serial ports. Wireshark used for analyzing USB serial traffic with ActiveGPS Windows software and my (really old) ActiveGPS device.   import serial A = b'00' B = b'06036F72AD18F8BF4B07DA01120B3215AF00' C = b'0000' D = b'00' E = b'00' J = [      b'18F8BF4B07DA01120B3215AFFFFFFFFF',      b'409CA961000050124EF175426C73AE41',      b'14060D0907DB5B58421D474A4A00FFFF',      b'FFFFFFF133FB33FB33FA33FA33FA33FA',      b'33FA33FA33FA33FA33FA33FA33FA33FA',      b'33FA33FFFFFFFFFFFFFFFFFFFFFFFFFF',      b'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',      b'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000',     ] ser = serial.Serial('COM19', 9600...

Var systems BT BLE

Image
 8.9.2024 Var systems BT BLE Some fast food restaurants use digital spread spectrum FHSS 2.4 GHz drive-thru systems with Bluetooth connectivity. and LED systems with Bluetooth   Management system in shopping centre area (Serial, CAN, BT ...) https://play.google.com/store/apps/dev?id=6884634465415948252&hl=en   Connectable with e.g. serial bluetooth terminal app.

Inspecting Uniden UBC-125XLT

Image
 perjantai, 4. lokakuu 2024 Inspecting Uniden UBC-125XLT

Uniden BCD996T remote commands

  6.12.2023 Uniden BCD996T remote commands Found by inspecting firmware key  sts  pof  mdl  ver  prg  epg  oms  clr  pri  blt  bkl  kbp  bsv  sct sih  sit  qsl  qgl  csy  dsy  cps  sin  trn  ast  sif  mbp  abp  tfq  agc agt  dgr  gin  acc  act  dch  cin  tin  gli  uli  rev  fwd  rmb mem  lct  lih  lit  cla  dla  lin  sco  glf  ulf  lof  clc  csg  csp wxs  sqp   win  bav   qsh  gid  loi  agv  ssp  ton  air  vol  sql  bbs shk  cnt  dud  glg  sli  mmm  fwm  scn  gdo  gga  rmc   com mrd  mwr  sum  pdi  esn  gcm  fsc  ewp  jpm  mnu

Uniden UBC-3500XLT remote commands

Image
  23.9.2023 Uniden UBC-3500XLT remote commands Uniden remote control/programming commands which work also on the UBC-3500XLT. Jump to mode: JMP, mode mode = CC_MODE, SCN_MODE, FTO_MODE, CTM_MODE, SVC_MODE Menu mode: MNU, menu_index menu_index = SVC_MENU, WX_MENU, CCBAND_MENU, SCR_OPT_MENU, GL_LIST_MENU, SETTING_MENU Scanner option settings, works only in programming mode (PRG, SCN, EPG): SCN Simple Python code for finding Uniden control/programming commands which response is something else than b'ERR\r' import serial ser = serial.Serial('COM3', '115200', timeout=2) print(ser.name) #ser.write(b'PRG\r') #s = ser.read(32) #print(s) i = 65 j = 91 cnt = 0 print("start") try:     for x in range(i, j):         for y in range(i, j):             for z in range(i, j):                 k = chr(x) + chr(y) + chr(z) + ...

UBC-3500XLT remote commands found with Python script

  27.9.2023 UBC-3500XLT remote commands found with Python script Programming mode OFF b'ABS,NG\r' b'ACC,NG\r' b'AGC,NG\r' b'AGV,NG\r' b'BAV,596\r' b'BBS,NG\r' b'BLT,NG\r' b'BPL,NG\r' b'BSV,NG\r' b'CIN,NG\r' b'CLC,NG\r' b'CLR,NG\r' b'CNT,NG\r' b'CPS,NG\r' b'CSG,NG\r' b'CSP,NG\r' b'CSY,NG\r' b'DCH,NG\r' b'DGR,NG\r' b'DSY,NG\r' b'FWD,NG\r' b'GIN,NG\r' b'GLF,-1\r' b'GLG,,,,,,,,,\r' b'KBP,NG\r' b'LOF,NG\r' b'MDL,UBC3500XLT\r' b'MEM,NG\r' b'MWR,NG\r' b'OMS,NG\r' b'PRI,NG\r' b'QGL,NG\r' b'QSL,NG\r' b'REV,NG\r' b'RMB,NG\r' b'SCN,NG\r' b'SCO,NG\r' b'SCT,NG\r' b'SIH,NG\r' b'SIN,NG\r' b'SIT,NG\r' b'SQL,4\r' b'SSP,NG\r' b'STS,011000,     ' b'      ...

Uniden UBC-125XLT USB serial port

Image
  20.11.2023 Uniden UBC-125XLT USB serial port Uniden UBC-125XLT USB serial port support 128 000 bps speed. 230 400 bps setting can be also used, it seems maybe a bit faster than 115 200 bps.   import serial import pandas as pd import matplotlib.pyplot as plt import csv from datetime import datetime ser = serial.Serial('COM11', '128000', timeout = 0.5) print(ser.name) serialCmd = b'PWR\r' readSize = 19 loop = True freq = "" win = 0 data = [] log_data = [] cols = ['Frequency', 'RSSI', 'Timestamp'] plt.xlabel("Frequency") plt.ylabel("RSSI") try:     while (loop == True):         ser.write(serialCmd)         result = ser.read(readSize)         res = str(result)         if (len(res) > 15):             i = res.find(",")         ...

Uniden UBC125XLT remote commands

  9.11.2023 Uniden UBC125XLT remote commands Firmware version 1.02.03 BAV BLT BPL BSV CIN CLC CLR CNT COM CSG CSP DBC DCH EPG ESN FWM GLF GLG KBP KEY LOF MDL MMM MWR PDI POF PRG PRI PWR SCG SCO SQL SSG STS TST VER VOL WIN WXS UBC125XLT firmware update mode First press simultaneously 6+LO+POWER ON, after that connect USB cable *VER b'BOOT 0.01\r' *MDL b'UBC125XLT\r' *REG b'REG 01\r' *APP b'Version 1.02.03 \r'

Uniden window voltage band scope

Image
  13.10.2023 Uniden window voltage band scope import serial import pandas as pd import matplotlib.pyplot as plt ser = serial.Serial('COM3', '115200', timeout = 0.5) print(ser.name) serialCmd = b'WIN\r' readSize = 17 loop = True freq = "" win = 0 data = [] plt.xlabel("Frequency") plt.ylabel("Window voltage") try:     while (loop == True):         ser.write(serialCmd)         result = ser.read(readSize)         res = str(result)         if (len(res) > 15):             i = res.find(",")             j = res.find(",", i + 1)             if ((i != -1) and (j != -1)):                 freq = res[j +...

Collecting Uniden window voltage/frequency data

Image
  11.10.2023 Collecting Uniden window voltage/frequency data with Python, pandas and matplotlib import serial import pandas as pd import matplotlib.pyplot as plt ser = serial.Serial('COM4', '115200', timeout = 0.5) print(ser.name) serialCmd = b'WIN\r' readSize = 17 loop = True freq = "" win = 0 data = [] try:     while (loop == True):         ser.write(serialCmd)         result = ser.read(readSize)         res = str(result)         if (len(res) > 15):             i = res.find(",")             j = res.find(",", i + 1)             if ((i != -1) and (j != -1)):                 freq = res[j + 1:...

GNU Radio serial port source

Image
  6.8.2023 GNU Radio serial port source GNU Radio Companion 3.10.4.0 (Windows - Radioconda installer) Uniden Bearcat UBC-3500XLT PySerial 3.5 + Python 3.11.4 I copied pyserial-3.5.dist-info and serial folders from Python 3.11.4 to C:\Users\<user>\radioconda\Lib\site-packages Embedded Python block Embedded Python block code: import numpy as np import serial from gnuradio import gr class blk(gr.sync_block):  # other base classes are basic_block, decim_block, interp_block     def __init__(self, comPort='COM4', comSpeed=19200.0, timeout=2):         gr.sync_block.__init__(             self,             name='window voltage',             in_sig=None,             out_sig=[np.float32]     ...

Old ActiveGPS device ... Bobrikloader

Image
 5.6.2020 Old ActiveGPS device ... Bobrikloader Ad-Teknik AB's Bobrikloader software works with really old ActiveGPS device. Firmware upgrade and traffic camera positions loading into device works ok. https://www.adteknik.se/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO.Ports; using System.IO; namespace ActiveGPStest {     class Program     {         static void Main(string[] args)         {             SerialPort ser = new SerialPort("COM5");             ser.BaudRate = 9600;             ser.Parity = Parity.None;             ser.StopBits = StopBits.One;     ...