Is it possible to setup Mindeo MP725 scanner via virtual COM port programmatically? - serial-port

Mindeo MP725 scanner manual states that scanner can be adjusted via scanning special barcodes. It also contains example with %NMUGD barcode and says that it is equivalent to command 0x16 0x4D 0x0D 0x25 0x4E 0x4D 0x55 0x47 0x44 0x2E via COM port. Looks like code
serialPort.WriteLine($"{(char)0x16}M\r%NMUGD.\r");
is working. Some special barcodes can be translated into byte commands in similar way, e.g. %%%VER - code
serialPort.WriteLine($"{(char)0x16}M\r%%%VER.");
works flawlessly. But I failed to translate most of other special barcodes like %0503D00%. Scanning of such barcode turns off scanner's beeper but code
serialPort.WriteLine($"{(char)0x16}M\r%0503D00%.\r");
has no effect. Has anyone worked with this scanner via COM port? Is it possible to setup it programmatically without scanning special barcodes? If possible, what am I doing wrong?

It is possible. We should transmit barcodes like %0503D00% without percent chars, i.e.
serialPort.WriteLine($"{(char)0x16}M\r0503D00.\r");

Related

STM32 usb cdc characters sending-receiving understanding

I'm trying to send data from C# app to the one STM32 dev board via USB CDC. I have problem with method SerialPort.Write() because write method send only first character instead of all characters of array or string. Same situation is it with serial terminals (terminte, cutecome,..) when attempt to send string. Can someone explain me how cdc usb really works. Does STM32 send data in same manner, character by character in each frame? I didn't use logic analyzer to see signals but that will be next step maybe.
If anyone has picture of usb cdc frame please share.
When I send string from STM32 dev board to the C# app that works fine. Any idea is welcome
The C# SerialPort.Write function is capable of writing an entire string at once if you call it the right way. The bytes of the string will be passed on to your operating system's USB drivers, which will split it up into packets according to the max packet size for the endpoint specified in your device's USB descriptors. Then those packets will be sent to the device, one packet at a time.
I suspect that there is a bug in your STM32 code, but since you have not posted an MCVE it will be difficult to help you debug any code.

Bluething Board out of sync

I have a Bluething Board from Franzis which I would like to program. It has a ATmega328P processor and in the instructions is written that it has an Arduino Nano board.
The problem I'm having is that as soon as I try to upload any program, it tells me that the connection is not in sync (see this detailed log).
I hope that anyone of you got a similar problem because I could not find anything on the internet. There were some people who had a 0x00-Byte response in which case there is no connection happening between PC and microcontroller. In my case, as you can see in the log file, it attemts to sync ten times but always gets a different byte as a response. Also, the Bluething Board blinks when I try to upload.
PS: I'm using the "AVRISP mkll" programmer, if this is relevant
Edit: There are always the same response-bytes: (attempt 1 to 10)
0x86 0x98 0xf8 0x9e 0x86 0x9e 0x60 0x66 0x9e 0x06
Someone with more knowledge helped me and we found the error: The Bluething Board uses the old ATmega328P bootloader. When I uploaded it with this bootloader selected, everything worked just fine.

Multi-drop bus to rs232 Convert

I have a project using MDB (multi-drop bus) for vending machine (VDM).
The VDM has a MDB-RS232.
I'm not sure if it converts 9bit - 8bit (MDB-UART).
How do I read data from VDM in my computer?
Thanks all
MDB (multi-drop bus) is 9 bit, because after the standard 8 data bits (like in standard RS232 UART communication) there is a 9th bit called "mode".
(Wikipedia on MDB: "the mode bit differentiates between ADDRESS and DATA bytes.")
But you can read such data even with regular 8-bit RS232 interfaces, e.g. a plain standard USB-to-RS232 device for PC.
Here is how:
Use 9600 baud, 8 data bits, 1 stop bit, but RS232 parity setting "Space". Make sure you receive the original character value even in case of a Parity Error indication. Any MDB address byte from your VDM will be received with a Parity Error (but still be displayed correctly). Any data byte will be displayed without error.
For sending MDB ADDRESS and DATA bytes using a standard 8-bit RS232 port, you could apply temporary parity changes: Change the parity setting to "Mark" before sending an address byte, then change back to "Space" before sending data bytes.
On Windows, you can do such tricks with our Docklight software (see Docklight and MDB). It's free for basic testing and there is also a related 9-bit example project.
On Linux / Raspberry Pi other users have successfully implemented the parity trick, too, see this stackexchange post about a MDB + Pi.
But also with RealTerm, Teraterm, Termite, Bray, YAT or any other RS232 application you should be able to read the data, as long as it handles "Space" or "Mark" parity settings correctly.
You'll need an adapter which will do all convert operations on-the-fly and in real time. If you want to emulate VMC (master), you'll need MDB-UART master adapter. If you want to emulate MDB peripheral device (such as coin changer, bill validator etc), you'll need this. For two-way "sniffing" MDB bus you'll need a combination of these devices.
Direct connection PC's RS-232 to MDB will not work due to strict MDB timings (delay between VMC command and peripheral response must not exceed 5ms, delays between POLL requests are 50-300ms in general). I mean pretty reliable functioning available for commercial purposes.

Can I read iBeacon data using Arduino?

I am using an HM-10 module and Arduino UNO.
My requirement is to read data from ibeacons near me using Arduino. Is it possible? I have not been able to find any articles on this. All articles talk about connecting your android phone with arduino. Any idea?
Yes, it is possible. I'm using an HM-10 as an iBeacon detector (linksprite.com BLE 4.0 shield), and it is successfully detecting a RadBeacon running in iBeacon mode. Firmware on my HM-10 is version 540.
Before it would detect the RadBeacon, I had to send the HM-10 the following commands:
AT+ROLE1
AT+IMME1
AT+RESET
Then I used the AT-DISI? command, and the serial monitor is showing the broadcast received from the RadBeacon (and one other beacon) as follows (for example):
OK+DISISOK+DISC:4C000215:2G234454CF6D5A0FADF2F4911BA9FFA7:00000001AC:0CF3EE041CCE:-052OK+DISC:00000000:00000000000000000000000000000000:0000000000:B9782E08068C:-071OK+DISCE
In this example, the HM-10 is detecting my RadBeacon which has UUID of 2G234454...with signal strength of -052. It is also detecting another BLE beacon (my AppleTV downstairs) with UUID of B9782E08068C with signal strength of -071.
I'm definitely not very knowledgable about any of this stuff, but it seems to be working for me so far. Next challenge for me will be to figure out how to parse the text data being received. I'm mostly interested in the distance/signal strength data in order to trigger an action when the RadBeacon gets very close to the HM-10.
[Full disclosure: I jumbled some of the UUID numbers above since I'm not sure if any of this information is private or hackable or whatever]
[By the way, the nRF8001 BLE Shield will not do this since it only runs in peripheral mode.]
Yes, you can get the Min and Max number of the nearby iBeacons.
You need to Attach hm-10 to Arduino Uno.
Try using this Library : https://github.com/dinosd/BLE_PROXIMITY
You can configure suitable AT commands if you want to configure it. But it should work with default settings as well.
Use SoftwareSerial to access HM-10.
In firmware version V539 of the HM-10, it adds an AT command to list nearby iBeacons. The command is AT+DISI?. You would simply need to set up the Arduion to send that command over a serial port and parse the data it returns.

Symbol OPOS Implementation OPOS_E_NOHARDWARE error

I have a Symbol/Motorola LS4278 barcode scanner. I've downloaded the Symbol OPOS Driver software from Symbol's support website. I'm trying to Claim the device using the VBDemo.exe app that comes with the Symbol OPOS Driver software. However I am getting the error code OPOS_E_NOHARDWARE. This means that the device is "not connected or is powered off". Yet, the device is indeed connected and working fine. If I scan something with it into Notepad.exe, then the scanned data appears in notepad. Please advise urgently what I am missing.
"If I scan something with it into Notepad.exe, then the scanned data appears in notepad."
This tells me that your scanner is programmed for "Keyboard Emulation" mode, sometimes called HID mode. In the user manual, there will be a programming barcode that you can scan to put it into the proper mode. Typically for Symbol scanners, it is called "IBM USB mode". Once you scan this programming barcode, you should be able to use the scanner with OPOS.

Resources