serial-port

How to get the SIM number (ICCID) of a modem using AT commands

我与影子孤独终老i 提交于 2021-02-07 06:51:17
问题 I'm trying to get the SIM number (ICCID, not IMSI) of my 3G Huawei E5830 modem using AT commands (also called Hayes command set ). Unfortunately, it's not specified in the modem formal documentation. 回答1: for sim900 AT+CCID gives CCID. e.g.89912200000280775659 The first two digits (89 in the example) refers to the Telecom Id. The next two digits (91 in the example) refers to the country code (91-India). The next two digits (22 in the example(MNC of IDEA)) refers to the network code. 回答2: Try

Python serial port listener

自闭症网瘾萝莉.ら 提交于 2021-02-06 09:25:20
问题 I've begun writing some code using PySerial to send and receive data to a serial device. Up until now I've only been working on initiating a transaction from a terminal and receiving a response from the serial device. pseudo: main: loop: message = get_message() send_to_serial(message) time_delay(1 second) read_response() Now I'd like to implement a listener on that port in the case that the serial device is the one initiating the communication. Also to remove the time_delay which could end up

Python serial port listener

纵饮孤独 提交于 2021-02-06 09:24:47
问题 I've begun writing some code using PySerial to send and receive data to a serial device. Up until now I've only been working on initiating a transaction from a terminal and receiving a response from the serial device. pseudo: main: loop: message = get_message() send_to_serial(message) time_delay(1 second) read_response() Now I'd like to implement a listener on that port in the case that the serial device is the one initiating the communication. Also to remove the time_delay which could end up

Reading from serial port affecting values

独自空忆成欢 提交于 2021-02-04 20:47:28
问题 I'm having a little headache trying to read properly from the SerialPort class. If I use the blocking method ReadLine or ReadExisting the aplication works like charm, but some of my values get affected because of the string conversion. I.e: the 0xFC byte shows as 0x3F ("?"). My guess is that any value outside of the ASCII scope will get lost too. I tried using the Read(byte[] buffer,int offset,int count) method using the SerialPort.ReadBufferSize to see how many bytes I was supposed to read,

Find USB serial port with Python script

烂漫一生 提交于 2021-01-29 18:40:08
问题 I am trying to write a script in python so I can find in 1 sec the COM number of the USB serial adapter I have plugged to my laptop. What I need is to isolate the COMx port so I can display the result and open putty with that specific port. Can you help me with that? Until now I have already written a script in batch/powershell and I am getting this information but I havent been able to separate the text of the COMx port so I can call the putty program with the serial parameter. I have also

C program to send and receive serial(UART) data using COM ports

孤人 提交于 2021-01-29 15:03:04
问题 I want to communicate between an Embedded device and my PC using C codes for serial-port. Anyone can suggest me how can I send and receive Serial or UART data using COM ports of my computer in Windows Environment(Windows7 or Windows8 64bit). Please give me any link or any codes for suggestion ... Thanks ... 回答1: To connect to the COM port, use CreateFile(): http://support.microsoft.com/kb/115831 Then use ReadFile() or WriteFile() to access the port. 来源: https://stackoverflow.com/questions

Console does not show the entire answar from serial port

纵然是瞬间 提交于 2021-01-29 11:17:04
问题 I am working with BC66 modem from Quectel. On my program when I type some AT commands to the modem it can not show the entire response from the modem, but instead the reply of the AT command. see figur below: Instead using an terminal program and type the AT commands i got the status of my request. See figure below: This is what I am expecting in my program, but unfortunately not happened. The code snip: static void Main(string[] args) { if (InitPort() == true) { Console.WriteLine("Port

Button Click to stop a test

三世轮回 提交于 2021-01-29 04:41:46
问题 I have a Test Engine that executes multiple tests, until all tests have been executed. Each test object has an Execute and Resume method. These methods return a status: Waiting for reply from COM port Waiting for button click from User Testing completed. In the GUI, the User starts the Test Engine by clicking a button. In other words, the click event for the button calls the Test Engine's start method. Next, a test may send a message through the COM port and must suspend until a message is

How to find out what instruments is behind a FTDI adapter on Windows?

泪湿孤枕 提交于 2021-01-28 23:55:31
问题 I am currently developing a Python tool for Windows that is able to lookup all devices connected to a windows pc. It already supports ethernet devices and by now I'm trying to add support for USB and serial devices. For those devices I want to read out their vendor id, product id, serial number and of course the address/port which is needed to connect to the device. Simple USB devices can be easily detected with PyUSB or PyWin32. Unfortunately, many devices say that its vendor is FTDI, which

Sending DATA to FPGA

谁说胖子不能爱 提交于 2021-01-28 10:31:47
问题 I am working on a project which requires data to be sent FROM PC TO FPGA,which processes the data and sends it BACK TO PC. The board I am using is Atlys™ Spartan-6 FPGA Development Board. The data is to be sent as 1 byte , because 1 byte is processed at each rising edge of the clock. Could you please suggest me ways of sending data to FPGA ? Thanks 回答1: Pick some method of communication that you have access to IP (intellectual property) cores for. For example, if you can readily access a UDP