RS-232 Radio Scanner

I have a Radio Scanner that I had built a VB.NET application in windows to send commands to the scanner via a USB to RS-232 on the radio. I would like to have the same ability on the MAC using Swift. Is this even possible? in VB.NET is was pretty easy and a fun project. I have been searching for 2 days and have found nothing. Newb to Swift and programming on the MAC.


The following would be the same as hitting the scan button on the radio.


2 = STX

15 = Code for the scan Key

3 = ETX

5D = sum not including STX


    Private Sub KEYPAD_SCAN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KEYPAD_SCAN.Click

        D = 0

        Dim TARRANT() As Byte = New Byte() {2, &H4B, 15, 3, &H5D}

        mySerialPort.Write(TARRANT, 0, 5)

    End Sub

Powered by WPeMatico


You may also like...

Comments are closed.