I have connected Huawei USB UMTS modem (E220) to my Linux box, i.e. RaspberryPi.
Now I get 2 ttyUSB port available to communicate to it, where I use ttyUSB0 to establish mobile Internet connection and ttyUSB1 for other tasks, like sending and receiving SMSes, checking status and error codes, make modem configurations, etc.
At regular intervals (2secs) I get this AT command on port ttyUSB1:
^DSFLOWRPT:n,n,n,n,n,n,n
which I fully understand (link: thanks to the user user ginggs from http://mybroadband.co.za). Less frequently I also get ^BOOT command, looking like this:
^BOOT:12659389,0,0,0,58
Can someone explain what those numbers in ^BOOT mean? Can I make notifications/warnings in ^DSFLOWRPT and ^BOOT be less/more verbose (something like "errors on/off")?
[edit]
Added link for understanding the ^DSFLOWRPT command.
In AT Command Interface Specification, Huawei mention that ^BOOT unsolicited command only for the Huawei specified client, nothing specific.
You can disable all unsolicited result by the following AT command:
AT^CURC=0
To enable it back just change 0 to 1:
AT^CURC=1
Related
First post! Full disclosure, I have a very limited programming / pi background.
I'm working on a project to communicate with a Chroma Bi-Directional power supply (Model #: 62180D-1200) using LXI / SCPI communication. There's more I hope to do in the future, but for the time being I'm simply trying to establish a working communication channel using the "*IDN?" identify command. I have a raspberry pi connected to the same network as the power supply, which I am using to communicate to the 62180D.
Before beginning any of this testing, I have been able to establish that I can communicate with the device via http (web browser). The web page for the device even includes an scpi query tool -- which works!
Successful HTTP communication
To query the device from the pi I have used PuTty to log in to my pi and issue the following command:
lxi scpi -a <device ip address> "*IDN?"
I am expecting to see the same result as shown in the image above (Model No. , Serial No., Firmware Version), but instead I'm receiving the following:
Error: Read error (timeout)
Error: Failed to receive message
I was under the impression that this protocol is fairly plug and play. I have other LXI enabled devices on the same network that I am able to communicate with them using this same approach. Is there some obvious thing I'm missing here?
I am running a BLE beacon in bluez5.52 on a linux machine(ubuntu 14.04) using the default gatt-service and the beacon using the btmgmt provided in the tools folder. Following are the commands I run to setup the beacon:
Terminal 1:
./gatt-service
Terminal 2
sudo ./btmgmt
add-adv -u 180d -u 180f -d 080954657374204C45 1
I am easily able to connect and disconnect with the beacon using BLE scanner app in android.
What I would like to do is setup a password for the beacon so that I am the only one who can connect to it. So far I have been unable to find any resources online that could help set that up. I have a decent understanding of the btmgmt and gatt-service code. I am looking for direction on what part of bluez code to look for to set up the password protection. Any leads, pseudo-code or partial code would help a lot.
Emil already mentioned pairing and bonding in the comments. This would definetly serve your purpose as you would be able to control who could connect to your peripheral.
A BLE characteristic can ask a connected device to authenticate before reading or writing which would result in a 'insufficient authentication error' if the device is not paired to your peripheral. A Android app is able to handle this error by displaying a pairing popup depending on the used pairing method.
So it is possible to have characteristics without security right next to one's that require pairing.
In case you still want to implement something like your mentioned password safety you should look into a 'authorized read'.
A characteristic which requires authorization first receives a read request and you can allow or deny it based on your own requirements. That means you can authorize yourself by sending a password to one characteristic and afterwards allow a read request on another characteristic. This would be even easier if you only accept one connection at a time.
I am using a BeagleBone Black board (kernel 4.14.108-ti-r104) to create USB gadget using configfs/functionfs. I compose my gadget (using gadgettool) providing details about device configuration (function, vendor id, product id and ton of other params), run my userspace program that writes descriptors and strings to ep0 and connect the device to host. All works fine, I get BIND (when binding device to UDC) and ENABLE (when actually host is connected) events and my device can read from ep2 and write to ep1. Using wireshark I see the communication looks good, device and configuration descriptors as well as strings are exchanged.
The problem starts when I connect the device to another host. Unfortunately I have almost no control over that host, in particular I cannot run wireshark there, I don't even know the OS. The only thing I can do is to plug/unplug device, optionally see a message that device was detected and optionally a restart. What I see on the gadget side is that following BIND and ENABLE events I immediately get SUSPEND event and read on ep2 fails with 108 (ESHUTDOWN). Now the question is how to track the problem down.
I tried usbmon, but it seems it does not listen to traffic when device is in gadget mode. I have also seen https://github.com/torvalds/linux/blob/master/drivers/usb/gadget/udc/trace.h file which seems to define some udc trace points, but I am not really sure how they can be used.
So the final question is simple: how do I get any information about traffic on USB bus having access only to gadget side? I don't need full trace, but al least some information which packets were exchanged would be super useful. Did it fail while exchanging device descriptors, configuration/interface/endpoint descriptors or strings or something totally different?
Small update:
The whole thing is about Android Open Accessory Protocol and I am trying to write a gadget that would connect to this accessory.
I have changed my gadget composition somewhat and now I know the gadget is being identified by host (it displays manufacturer/model) so I suppose the issue is not in device descriptor and strings. I have used two additional flags in descriptors (FUNCTIONFS_ALL_CTRL_RECIP | FUNCTIONFS_CONFIG0_SETUP) and when connecting to my computer I get setup event (request 51 as expected), but when connecting to my accessory I still get SUSPEND/ESHUTDOWN. This time though it looks like the time between ENABLE and SUSPEND is much greater (over 10 seconds) which looks to me as if the host send some message, but this message was not processed by my gadget and then the host timeout out and disabled usb device. Still don't know how to find out if the accessory sent anything to gadget and what it was...
We have a custom embedded device that uses Roving Networks' RN240 bluetooth adapter on an RS232 port to communicate with another device via bluetooth. It is working well, but I am attempting to "bulletproof" the management of the bluetooth connection as there is an occasional hiccup and I need to handle these circumstances.
In the flow I'm working on, I put the adapter into Command mode and get back the proper response:
> CMD
< $$$
I am then able to issue commands to it to Get or Set information. One of the things we do is specify which bluetooth device to pair to using these commands. The device may already have a valid pairing, and is set to Auto Master mode. When the device powers up, it may automatically connect to our other bluetooth device (as designed). I need to know if the dongle has paired when I am attempting to perform certain functions.
The command set specification specifically says that when the Get command
> GK
< 1
is sent to the device (to obtain current connection status), it will respond with a "0" for "Not Connected" or "1" for "Connected"
I am occasionally getting a "4" when the device is either connecting or connected, and I've been unable to isolate why. Once I start getting a "4", I keep getting a "4" every time I inquire after that. I have to power down the dongle (ie: reset my test scenario) to get a different behavior.
I've poked through other Advanced User Guides on Roving Networks' website, and googled as many variations as I can think of to find what this status means. It seems when I get back "4", I can no longer control the Bluetooth Adapter as I need to. I would like to know what "4" means, and what I can do to recover the device so I can make it do what I want to!
Thanks! I appreciate any help.
(For reference, here's the page for this adapter, along with links for downloading the command set: Roving Networks RN240 Bluetooth Adapter)
EDIT: I have heard back from Microchip Engineering Support. Their answer was that "4" is an undocumented state, as it shouldn't be visible to the user. "4" means the chip in in a connecting state, and that if the module is getting into this state, it is recommended that the module be rebooted (with the "R,1" command).
I have an issue where i have connected my linux server to a serial port. There is a continous flow of data from serial port which comes through epabx.
In Minicom i get first call's data and from second call it goes offline.
I dont see any data.
Can some one help me on this.
Thanks for all the help given by you. Finally i have got the error solved.
God knows how i started getting the data.
But still i am listing the steps i performed to get correct data.
Sometimes data from serial port wont be capturing in the processing form application.
It may be because of the following issues.
1.Serial port not connected properly.
2.Serial port cable not working.
3.Some pins on serial port are damaged or connection lost.
Note: For above all reasons contact the client person or person in charge of epabx systems.
4.Data not getting displayed on hypertiminal.
This is a common issue in linux which uses minicom as hyperterminal.
Sol: Check the version of the minicom before running it on linux. If the version is minocom 2.1 then some process would be blocking the incoming data.
Uninstall minicom 2.1 and reinstall minicom 2.0
It is said that gate 8 process would block the incoming data.
minicom may be responding to control characters in your data. I'd recommend something simple but effective like
od -t x1 -t a /dev/ttySomething
to dump your data in both hex and as text.
You should also check that your port settings are correct i.e. bitrate, parity, stop bits, flow-control. Sometimes, when your settings are not correct, you will end up with weird results. Also, you need to check that your protocol is only sending texts as Carl mentioned.